FastUIDraw
|
Represents segment of a tessellated or arc-tessellated path. More...
#include <tessellated_path.hpp>
Public Member Functions | |
enum split_t | compute_split (float split, segment *dst_before_split, segment *dst_after_split, int splitting_coordinate) const |
enum split_t | compute_split_x (float x_split, segment *dst_before_split, segment *dst_after_split) const |
enum split_t | compute_split_y (float y_split, segment *dst_before_split, segment *dst_after_split) const |
vec2 | enter_segment_normal (void) const |
vec2 | leaving_segment_normal (void) const |
void | split_segment (float t, segment *dst_0_t, segment *dst_t_1) const |
Public Attributes | |
range_type< float > | m_arc_angle |
vec2 | m_center |
bool | m_continuation_with_predecessor |
unsigned int | m_contour_id |
float | m_contour_length |
float | m_distance_from_contour_start |
float | m_distance_from_edge_start |
unsigned int | m_edge_id |
float | m_edge_length |
vec2 | m_end_pt |
vec2 | m_enter_segment_unit_vector |
bool | m_first_segment_of_edge |
bool | m_last_segment_of_edge |
vec2 | m_leaving_segment_unit_vector |
float | m_length |
float | m_radius |
vec2 | m_start_pt |
enum segment_type_t | m_type |
Represents segment of a tessellated or arc-tessellated path.
Definition at line 178 of file tessellated_path.hpp.
enum split_t fastuidraw::TessellatedPath::segment::compute_split | ( | float | split, |
segment * | dst_before_split, | ||
segment * | dst_after_split, | ||
int | splitting_coordinate | ||
) | const |
Compute the splitting splitting of this segment against a horizontal or vertical line with the given coordinate. Provided as a conveniance, equivalent to
split | x-coordinate or y-coordinate of splitting line |
dst_before_split | location to which to write the portion of the segment that comes before the splitting line |
dst_after_split | location to which to write the portion of the segment that comes after the splitting line |
splitting_coordinate | determines if to split by a vertical line or a horizontal line. |
enum split_t fastuidraw::TessellatedPath::segment::compute_split_x | ( | float | x_split, |
segment * | dst_before_split, | ||
segment * | dst_after_split | ||
) | const |
Compute the splitting splitting of this segment against a vertical line with the given x-coordinate
x_split | x-coordinate of vertical splitting line |
dst_before_split | location to which to write the portion of the segment that comes before the splitting line |
dst_after_split | location to which to write the portion of the segment that comes after the splitting line |
enum split_t fastuidraw::TessellatedPath::segment::compute_split_y | ( | float | y_split, |
segment * | dst_before_split, | ||
segment * | dst_after_split | ||
) | const |
Compute the splitting splitting of this segment against a horizontal line with the given y-coordinate
y_split | y-coordinate of horizontal splitting line |
dst_before_split | location to which to write the portion of the segment that comes before the splitting line |
dst_after_split | location to which to write the portion of the segment that comes after the splitting line |
|
inline |
Returns the normal vector to the path at the start of the segment.
Definition at line 300 of file tessellated_path.hpp.
|
inline |
Returns the normal vector to the path at the end of the segment.
Definition at line 310 of file tessellated_path.hpp.
void fastuidraw::TessellatedPath::segment::split_segment | ( | float | t, |
segment * | dst_0_t, | ||
segment * | dst_t_1 | ||
) | const |
Split this segment at a time t where the start of the segment is at t = 0 and the end of the segment is t = 1.
range_type<float> fastuidraw::TessellatedPath::segment::m_arc_angle |
Only valid if m_type is arc_segment; gives the angle range of the arc.
Definition at line 206 of file tessellated_path.hpp.
vec2 fastuidraw::TessellatedPath::segment::m_center |
Only valid if m_type is arc_segment; gives the center of the arc.
Definition at line 200 of file tessellated_path.hpp.
bool fastuidraw::TessellatedPath::segment::m_continuation_with_predecessor |
If true, indicates that the arc is a continuation of its predecessor. This happens when TessellatedPath breaks a segment into smaller pieces to make its angle smaller, to make it monotonic or if it is the second portion of a split segment as calculated from compute_split_x() or compute_split_y().
Definition at line 264 of file tessellated_path.hpp.
unsigned int fastuidraw::TessellatedPath::segment::m_contour_id |
The contour from which the segment originates, i.e. the segment originates from the PathContour::interpolator_base PathContour::interpolator(m_edge_id) of the PathContour of Path::contour(m_contour_id).
Definition at line 273 of file tessellated_path.hpp.
float fastuidraw::TessellatedPath::segment::m_contour_length |
Gives the length of the contour on which this segment lies. This value is the same for all segments along a fixed contour.
Definition at line 244 of file tessellated_path.hpp.
float fastuidraw::TessellatedPath::segment::m_distance_from_contour_start |
Gives the distance of the start of segment to the start of the -contour-.
Definition at line 229 of file tessellated_path.hpp.
float fastuidraw::TessellatedPath::segment::m_distance_from_edge_start |
Gives the distance of the start of the segment from the start of the edge (i.e PathContour::interpolator_base).
Definition at line 223 of file tessellated_path.hpp.
unsigned int fastuidraw::TessellatedPath::segment::m_edge_id |
The edge from which the segment originates, i.e. the segment originates from the PathContour::interpolator_base PathContour::interpolator(m_edge_id) of the PathContour of Path::contour(m_contour_id).
Definition at line 282 of file tessellated_path.hpp.
float fastuidraw::TessellatedPath::segment::m_edge_length |
Gives the length of the edge (i.e. PathContour::interpolator_base) on which the segment lies. This value is the same for all segments along a fixed edge.
Definition at line 237 of file tessellated_path.hpp.
vec2 fastuidraw::TessellatedPath::segment::m_end_pt |
Gives the end point on the path of the segment.
Definition at line 194 of file tessellated_path.hpp.
vec2 fastuidraw::TessellatedPath::segment::m_enter_segment_unit_vector |
Gives the unit-vector of the path entering the segment.
Definition at line 249 of file tessellated_path.hpp.
bool fastuidraw::TessellatedPath::segment::m_first_segment_of_edge |
Indicates the this segment is the first segment of an edge
Definition at line 288 of file tessellated_path.hpp.
bool fastuidraw::TessellatedPath::segment::m_last_segment_of_edge |
Indicates the this segment is the last segment of an edge
Definition at line 294 of file tessellated_path.hpp.
vec2 fastuidraw::TessellatedPath::segment::m_leaving_segment_unit_vector |
Gives the unit-vector of the path leaving the segment.
Definition at line 254 of file tessellated_path.hpp.
float fastuidraw::TessellatedPath::segment::m_length |
Gives the length of the segment.
Definition at line 217 of file tessellated_path.hpp.
float fastuidraw::TessellatedPath::segment::m_radius |
Only valid if m_type is arc_segment; gives the radius of the arc.
Definition at line 212 of file tessellated_path.hpp.
vec2 fastuidraw::TessellatedPath::segment::m_start_pt |
Gives the start point on the path of the segment.
Definition at line 189 of file tessellated_path.hpp.
enum segment_type_t fastuidraw::TessellatedPath::segment::m_type |
Specifies the segment type.
Definition at line 184 of file tessellated_path.hpp.