An TessellatedPath represents the tessellation of a Path into line segments and arcs.
More...
#include <tessellated_path.hpp>
An TessellatedPath represents the tessellation of a Path into line segments and arcs.
A single contour of a TessellatedPath is constructed from a single PathContour of the source Path. Each edge of a contour of a TessellatedPath is contructed from a single PathContour::interpolator_base of the source PathContour. The ordering of the contours of a TessellatedPath is the same ordering as the source PathContour objects of the source Path. Also, the ordering of edges within a contour is the same ordering as the PathContour::interpolator_base objects of the source PathContour. In particular, for each contour of a TessellatedPath, if an edge is closed, the closing edge is the last edge.
Definition at line 62 of file tessellated_path.hpp.
◆ segment_type_t
Enumeration to identify the type of a segment.
Enumerator |
---|
arc_segment | Indicates that the segment is an arc segment, i.e. it connects two point via an arc of a circle
|
line_segment | Indicates that the segment is a line segment i.e. it connects two point via a line.
|
Definition at line 70 of file tessellated_path.hpp.
◆ split_t
Enumeration to describe if a segment is split
Enumerator |
---|
segment_completey_before_split | Indicates that entire segment is before the split value
|
segment_completey_after_split | Indicates that entire segment is after the split value
|
segment_split_start_before | indicates that the segment was split with the segment starting before the split point.
|
segment_split_start_after | indicates that the segment was split with the segment starting after the split point.
|
Definition at line 89 of file tessellated_path.hpp.
◆ TessellatedPath()
Ctor. Construct a TessellatedPath from a Path
- Parameters
-
input | source path to tessellate |
P | parameters on how to tessellate the source Path |
ref | if non-NULL, construct a Refiner object and return the value via upading the value of ref. |
◆ bounding_box()
const Rect& fastuidraw::TessellatedPath::bounding_box |
( |
void |
| ) |
const |
Returns the bounding box of the tessellation.
◆ cap_data()
c_array<const cap> fastuidraw::TessellatedPath::cap_data |
( |
void |
| ) |
const |
◆ contour_chains()
c_array<const segment_chain> fastuidraw::TessellatedPath::contour_chains |
( |
unsigned int |
contour | ) |
const |
Returns the array of segment_chain objects of a contour.
- Parameters
-
◆ contour_closed()
bool fastuidraw::TessellatedPath::contour_closed |
( |
unsigned int |
contour | ) |
const |
Returns true if the named contour was closed
- Parameters
-
◆ contour_range()
range_type<unsigned int> fastuidraw::TessellatedPath::contour_range |
( |
unsigned int |
contour | ) |
const |
Returns the range into segment_data() for the named contour.
- Parameters
-
◆ contour_segment_data()
c_array<const segment> fastuidraw::TessellatedPath::contour_segment_data |
( |
unsigned int |
contour | ) |
const |
Returns the segment data of the named contour. Provided as a conveniance equivalent to
- Parameters
-
◆ edge_range()
range_type<unsigned int> fastuidraw::TessellatedPath::edge_range |
( |
unsigned int |
contour, |
|
|
unsigned int |
edge |
|
) |
| const |
Returns the range into segment_data(void) for the named edge of the named contour.
- Parameters
-
contour | which path contour to query, must have that 0 <= contour < number_contours() |
edge | which edge of the contour to query, must have that 0 <= edge < number_edges(contour) |
◆ edge_segment_chain()
segment_chain fastuidraw::TessellatedPath::edge_segment_chain |
( |
unsigned int |
contour, |
|
|
unsigned int |
edge |
|
) |
| const |
◆ edge_segment_data()
c_array<const segment> fastuidraw::TessellatedPath::edge_segment_data |
( |
unsigned int |
contour, |
|
|
unsigned int |
edge |
|
) |
| const |
Returns the segment data of the named edge of the named contour, provided as a conveniance, equivalent to
- Parameters
-
contour | which path contour to query, must have that 0 <= contour < number_contours() |
edge | which edge of the contour to query, must have that 0 <= edge < number_edges(contour) |
◆ edge_type()
enum PathEnums::edge_type_t fastuidraw::TessellatedPath::edge_type |
( |
unsigned int |
contour, |
|
|
unsigned int |
edge |
|
) |
| const |
Returns the edge type of the named edge of the named contour of the source Path.
- Parameters
-
contour | which path contour to query, must have that 0 <= contour < number_contours() |
edge | which edge of the contour to query, must have that 0 <= edge < number_edges(contour) |
◆ filled() [1/2]
const FilledPath& fastuidraw::TessellatedPath::filled |
( |
float |
thresh | ) |
const |
Returns this TessellatedPath filled. If this TessellatedPath has arcs will return the fill associated to the linearization() of this TessellatedPath. If a non-positive value is passed, returns the fill of the linearization where arc-segments are tessellated into very few line segments.
- Parameters
-
thresh | threshhold at which to linearize arc-segments. |
◆ filled() [2/2]
const FilledPath& fastuidraw::TessellatedPath::filled |
( |
void |
| ) |
const |
Provided as a conveniance, returns the starting point tessellation. Equivalent to
◆ has_arcs()
bool fastuidraw::TessellatedPath::has_arcs |
( |
void |
| ) |
const |
◆ join_data()
c_array<const join> fastuidraw::TessellatedPath::join_data |
( |
void |
| ) |
const |
Returns all the join data
◆ linearization() [1/2]
const TessellatedPath& fastuidraw::TessellatedPath::linearization |
( |
float |
thresh | ) |
const |
Returns this TessellatedPath where any arcs are realized as segments. If this TessellatedPath has no arcs, returns this object. If a non-positive value is passed, returns a linearization where arc-segments are tessellated into very few line segments.
- Parameters
-
thresh | threshhold at which to linearize arc-segments. |
◆ linearization() [2/2]
const TessellatedPath& fastuidraw::TessellatedPath::linearization |
( |
void |
| ) |
const |
Provided as a conveniance, returns the starting point tessellation. Equivalent to
◆ max_distance()
float fastuidraw::TessellatedPath::max_distance |
( |
void |
| ) |
const |
Returns the maximum across all edges of all contours of the distance between the tessellation and the actual path.
◆ max_recursion()
unsigned int fastuidraw::TessellatedPath::max_recursion |
( |
void |
| ) |
const |
Returns the maximum recursion employed by any edge
◆ number_contours()
unsigned int fastuidraw::TessellatedPath::number_contours |
( |
void |
| ) |
const |
Returns the number of contours
◆ number_edges()
unsigned int fastuidraw::TessellatedPath::number_edges |
( |
unsigned int |
contour | ) |
const |
Returns the number of edges for the named contour
- Parameters
-
◆ partitioned()
◆ segment_chain_data()
◆ segment_data()
c_array<const segment> fastuidraw::TessellatedPath::segment_data |
( |
void |
| ) |
const |
Returns all the segment data of the entire path.
◆ stroked()
const StrokedPath& fastuidraw::TessellatedPath::stroked |
( |
void |
| ) |
const |
◆ tessellation_parameters()
const TessellationParams& fastuidraw::TessellatedPath::tessellation_parameters |
( |
void |
| ) |
const |
Returns the tessellation parameters used to construct this TessellatedPath.
The documentation for this class was generated from the following file: