FastUIDraw
|
Namespace to encompass packing values and functions of path data for stroking using StrokedPoint. More...
Classes | |
class | packing_size |
Template class taking as argument a PainterEnums::join_style or cap_type_t which defines two enumerations: More... | |
Enumerations | |
enum | cap_type_t { flat_cap, square_cap, adjustable_cap, rounded_cap } |
Functions | |
enum cap_type_t | cap_type (enum PainterEnums::cap_style cp, bool for_dashed_stroking) |
void | pack_cap (enum cap_type_t cp, const TessellatedPath::cap &cap, unsigned int depth, c_array< PainterAttribute > dst_attribs, c_array< PainterIndex > dst_indices, unsigned int index_adjust) |
void | pack_join (enum PainterEnums::join_style js, const TessellatedPath::join &join, unsigned int depth, c_array< PainterAttribute > dst_attribs, c_array< PainterIndex > dst_indices, unsigned int index_adjust) |
void | pack_rounded_cap_size (float thresh, unsigned int *num_attributes, unsigned int *num_indices) |
void | pack_rounded_join_size (const TessellatedPath::join &join, float thresh, unsigned int *num_attributes, unsigned int *num_indices) |
void | pack_segment_chain (c_array< const TessellatedPath::segment_chain > chains, unsigned int depth_start, c_array< PainterAttribute > dst_attribs, c_array< PainterIndex > dst_indices, unsigned int index_adjust) |
void | pack_segment_chain (const TessellatedPath::segment_chain &chain, unsigned int depth_start, c_array< PainterAttribute > dst_attribs, c_array< PainterIndex > dst_indices, unsigned int index_adjust) |
void | pack_segment_chain_size (c_array< const TessellatedPath::segment_chain > chains, unsigned int *depth_range_size, unsigned int *num_attributes, unsigned int *num_indices) |
void | pack_segment_chain_size (const TessellatedPath::segment_chain &chain, unsigned int *depth_range_size, unsigned int *num_attributes, unsigned int *num_indices) |
Namespace to encompass packing values and functions of path data for stroking using StrokedPoint.
Enumeration to specify how to pack attribute and index data for a cap.
Enumerator | |
---|---|
flat_cap | Pack cap for stroking cap with the style PainterEnums::flat_caps with non-dashed stroking. |
square_cap | Pack cap for stroking cap with the style PainterEnums::square_caps with non-dashed stroking. |
adjustable_cap | Pack cap for stroking cap with dashed stroking (regardless of PainterEnums::cap_style). |
rounded_cap | Pack cap for stroking cap with the style PainterEnums::rounded_caps with non-dashed stroking. |
Definition at line 597 of file stroked_point.hpp.
enum cap_type_t fastuidraw::StrokedPointPacking::cap_type | ( | enum PainterEnums::cap_style | cp, |
bool | for_dashed_stroking | ||
) |
Returns the value for cap_type_t given a PainterEnums::cap_style value
cp | PainterEnums::cap_style value |
for_dashed_stroking | if true, return a cap-value suitable for dashed stroking. |
void fastuidraw::StrokedPointPacking::pack_cap | ( | enum cap_type_t | cp, |
const TessellatedPath::cap & | cap, | ||
unsigned int | depth, | ||
c_array< PainterAttribute > | dst_attribs, | ||
c_array< PainterIndex > | dst_indices, | ||
unsigned int | index_adjust | ||
) |
Pack a cap into attribute data and index data realized with StrokedPoint.
cp | join style to pack for |
cap | cap data to pack |
depth | the value for StrokedPoint::depth() of the packed StrokedPoint values |
dst_attribs | location to which to place the attributes, when cp is rounded_cap, the size of dst_attribs must be as indicated by pack_rounded_cap_size(). |
dst_indices | location to which to place the indices, when cp is rounded_cap, the size of dst_indices must be as indicated by pack_rounded_cap_size(). |
index_adjust | value by which to increment the written index values |
void fastuidraw::StrokedPointPacking::pack_join | ( | enum PainterEnums::join_style | js, |
const TessellatedPath::join & | join, | ||
unsigned int | depth, | ||
c_array< PainterAttribute > | dst_attribs, | ||
c_array< PainterIndex > | dst_indices, | ||
unsigned int | index_adjust | ||
) |
Pack a join into attribute data and index data realized with StrokedPoint.
js | join style to pack for |
join | join data to pack |
depth | the value for StrokedPoint::depth() of the packed StrokedPoint values |
dst_attribs | location to which to place the attributes, when js is PainterEnums::rounded_joins, the size of dst_attribs must be as indicated by pack_rounded_join_size(). |
dst_indices | location to which to place the indices, when js is PainterEnums::rounded_joins, the size of dst_indices must be as indicated by pack_rounded_join_size(). |
index_adjust | value by which to increment the written index values |
void fastuidraw::StrokedPointPacking::pack_rounded_cap_size | ( | float | thresh, |
unsigned int * | num_attributes, | ||
unsigned int * | num_indices | ||
) |
Returns the number of attributes realized with StrokedPoint needed to pack a rounded cap.
thresh | the maximum distance allowed from the approximation of the rounded cap realized as triangles when the cap is stroked with a stroking width of one. |
num_attributes | location to which to write the needed number of attributes |
num_indices | location to which to write the needed number of indices |
void fastuidraw::StrokedPointPacking::pack_rounded_join_size | ( | const TessellatedPath::join & | join, |
float | thresh, | ||
unsigned int * | num_attributes, | ||
unsigned int * | num_indices | ||
) |
Returns the number of attributes realized with StrokedPoint needed to pack a rounded join.
join | join to realize a packed data |
thresh | the maximum distance allowed from the approximation of the rounded join realized as triangles when the join is stroked with a stroking width of one. |
num_attributes | location to which to write the needed number of attributes |
num_indices | location to which to write the needed number of indices |
void fastuidraw::StrokedPointPacking::pack_segment_chain | ( | c_array< const TessellatedPath::segment_chain > | chains, |
unsigned int | depth_start, | ||
c_array< PainterAttribute > | dst_attribs, | ||
c_array< PainterIndex > | dst_indices, | ||
unsigned int | index_adjust | ||
) |
Pack an array of segments chains realized as StrokedPoint
chains | segment chain to pack |
depth_start | value the lowest depth value for the attributes; the packed StrokedPoint values will have depth_start <= StrokedPoint::depth() and StrokedPoint::depth() < depth_start + depth_range_size where depth_range_size is as indicated by pack_segment_chain_size(). |
dst_attribs | location to which to place the attributes, the size of dst_attribs must be as indicated by pack_segment_chain_size(). |
dst_indices | location to which to place the indices, the size of dst_indices must be as indicated by pack_segment_chain_size(). |
index_adjust | value by which to increment the written index values |
void fastuidraw::StrokedPointPacking::pack_segment_chain | ( | const TessellatedPath::segment_chain & | chain, |
unsigned int | depth_start, | ||
c_array< PainterAttribute > | dst_attribs, | ||
c_array< PainterIndex > | dst_indices, | ||
unsigned int | index_adjust | ||
) |
Pack a single segment chain realized as StrokedPoint
chain | segment chain to pack |
depth_start | value the lowest depth value for the attributes; the packed StrokedPoint values will have depth_start <= StrokedPoint::depth() and StrokedPoint::depth() < depth_start + depth_range_size where depth_range_size is as indicated by pack_segment_chain_size(). |
dst_attribs | location to which to place the attributes, the size of dst_attribs must be as indicated by pack_segment_chain_size(). |
dst_indices | location to which to place the indices, the size of dst_indices must be as indicated by pack_segment_chain_size(). |
index_adjust | value by which to increment the written index values |
void fastuidraw::StrokedPointPacking::pack_segment_chain_size | ( | c_array< const TessellatedPath::segment_chain > | chains, |
unsigned int * | depth_range_size, | ||
unsigned int * | num_attributes, | ||
unsigned int * | num_indices | ||
) |
Computes the number of indices and attributes necessary to pack an array of TessellatedPath::segment_chain values. Each TessellatedPath::segment of each TessellatedPath::segment_chain must have that TessellatedPath::segment::m_type is the value TessellatedPath::line_segment.
chains | segment chain to query amount room needed to pack realized by StrokedPoint |
depth_range_size | location to which to write the depth range needed to pack the segment chain. |
num_attributes | location to which to write the needed number of attributes |
num_indices | location to which to write the needed number of indices |
void fastuidraw::StrokedPointPacking::pack_segment_chain_size | ( | const TessellatedPath::segment_chain & | chain, |
unsigned int * | depth_range_size, | ||
unsigned int * | num_attributes, | ||
unsigned int * | num_indices | ||
) |
Computes the number of indices and attributes necessary to pack a single TessellatedPath::segment_chain value. The TessellatedPath::segment of the TessellatedPath::segment_chain must have that TessellatedPath::segment::m_type is the value TessellatedPath::line_segment.
chain | segment chain to query amount room needed to pack realized by StrokedPoint |
depth_range_size | location to which to write the depth range needed to pack the segment chain. |
num_attributes | location to which to write the needed number of attributes |
num_indices | location to which to write the needed number of indices |