FastUIDraw
|
A PartitionedTessellatedPath represents partitioning a TessellatedPath for quick computation of what TessellatedPath::segment intersect a region. More...
#include <partitioned_tessellated_path.hpp>
Classes | |
class | Subset |
A Subset represents a handle to a portion of a PartitionedTessellatedPath. The handle is invalid once the PartitionedTessellatedPath from which it comes goes out of scope. Do not save these handle values without also saving a handle of the PartitionedTessellatedPath from which they come. More... | |
class | SubsetSelection |
Public Types | |
typedef TessellatedPath::cap | cap |
typedef TessellatedPath::join | join |
typedef TessellatedPath::segment | segment |
typedef TessellatedPath::segment_chain | segment_chain |
Public Member Functions | |
PartitionedTessellatedPath (c_array< const segment_chain > chains, c_array< const join > joins, c_array< const cap > caps) | |
c_array< const cap > | caps (void) const |
bool | has_arcs (void) const |
c_array< const join > | joins (void) const |
unsigned int | number_subsets (void) const |
Subset | root_subset (void) const |
void | select_subsets (c_array< const vec3 > clip_equations, const float3x3 &clip_matrix_local, const vec2 &one_pixel_width, c_array< const float > geometry_inflation, bool select_miter_joins, SubsetSelection &dst) const |
Subset | subset (unsigned int I) const |
Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter > | |
reference_counted_base (void) | |
Friends | |
class | TessellatedPath |
Additional Inherited Members | |
Static Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter > | |
static void | add_reference (const reference_counted_base< T, Counter > *p) |
static void | remove_reference (const reference_counted_base< T, Counter > *p) |
A PartitionedTessellatedPath represents partitioning a TessellatedPath for quick computation of what TessellatedPath::segment intersect a region.
The partitioning creates reectangular regions of the source TessellatedPath that are disjoint. One side effect of that is that a TessellatedPath::segment value from the source TessellatedPath may be split into multiple TessellatedPath::segment values.
Definition at line 50 of file partitioned_tessellated_path.hpp.
A cap is the same as found in TessellatedPath
Definition at line 72 of file partitioned_tessellated_path.hpp.
A join is the same as found in TessellatedPath
Definition at line 67 of file partitioned_tessellated_path.hpp.
A segment is the same as found in TessellatedPath
Definition at line 57 of file partitioned_tessellated_path.hpp.
A segment_chain is the same as found in TessellatedPath
Definition at line 62 of file partitioned_tessellated_path.hpp.
fastuidraw::PartitionedTessellatedPath::PartitionedTessellatedPath | ( | c_array< const segment_chain > | chains, |
c_array< const join > | joins, | ||
c_array< const cap > | caps | ||
) |
Constuct a PartitionedTessellatedPath from arrays of segment_chain, join and caps values. Values are -COPIED- from the passed arrays.
chains | segment chain values to copy and partition |
joins | join values to copy and partition |
caps | cap values to copy and partition |
Returns the caps of the path.
bool fastuidraw::PartitionedTessellatedPath::has_arcs | ( | void | ) | const |
Returns true if any of the segment values of any of the segment_chain values of any of the Subset::segment_chains() has segment::m_type equal to TessellatedPath::arc_segment.
Returns the joins of the path.
unsigned int fastuidraw::PartitionedTessellatedPath::number_subsets | ( | void | ) | const |
Returns the number of Subset objects of the StrokedPath.
Subset fastuidraw::PartitionedTessellatedPath::root_subset | ( | void | ) | const |
Returns the root-subset of the StrokedPath, this is the Subset that includes the entire StrokedPath.
void fastuidraw::PartitionedTessellatedPath::select_subsets | ( | c_array< const vec3 > | clip_equations, |
const float3x3 & | clip_matrix_local, | ||
const vec2 & | one_pixel_width, | ||
c_array< const float > | geometry_inflation, | ||
bool | select_miter_joins, | ||
SubsetSelection & | dst | ||
) | const |
Given a set of clip equations in clip coordinates and a tranformation from local coordiante to clip coordinates, compute what Subset are not completely culled by the clip equations.
clip_equations | array of clip equations | |
clip_matrix_local | 3x3 transformation from local (x, y, 1) coordinates to clip coordinates. | |
one_pixel_width | holds the size of a single pixel in normalized device coordinates | |
geometry_inflation | amount path geometry is inflated, array is indexed by the enumeration PathEnums::path_geometry_inflation_index_t | |
select_miter_joins | if true, when selecting what joins are in the area, enlarge the join footprint for if the joins are stroked as a type of miter join. | |
[out] | dst | location to which to write the subset-selection. |
Subset fastuidraw::PartitionedTessellatedPath::subset | ( | unsigned int | I | ) | const |
Return the named Subset object of the StrokedPath.