FastUIDraw
Enumerations | Functions
fastuidraw::ArcStrokedPointPacking Namespace Reference

Namespce to encompass packing values and functions of path data for stroking using ArcStrokedPoint. More...

Enumerations

enum  { arcs_per_cap = 4, num_attributes_per_cap = 3 * arcs_per_cap + 2, num_indices_per_cap = 9 * arcs_per_cap }
 

Functions

void pack_cap (const TessellatedPath::cap &cap, unsigned int depth, c_array< PainterAttribute > dst_attribs, c_array< PainterIndex > dst_indices, unsigned int index_adjust)
 
void pack_join (const TessellatedPath::join &join, unsigned int depth, c_array< PainterAttribute > dst_attribs, c_array< PainterIndex > dst_indices, unsigned int index_adjust)
 
void pack_join_size (const TessellatedPath::join &join, 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)
 

Detailed Description

Namespce to encompass packing values and functions of path data for stroking using ArcStrokedPoint.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
num_attributes_per_cap 

Number of attributes needed for realizing a rounded cap with packed ArcStrokedPoint values.

num_indices_per_cap 

Number of indices needed for realizing a rounded cap with packed ArcStrokedPoint values.

Definition at line 424 of file arc_stroked_point.hpp.

Function Documentation

◆ pack_cap()

void fastuidraw::ArcStrokedPointPacking::pack_cap ( 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 ArcStrokedPoint.

Parameters
capcap data to pack
depththe value for ArcStrokedPoint::depth() of the packed ArcStrokedPoint values
dst_attribslocation to which to place the attributes, the size of dst_attribs must be num_attributes_per_cap
dst_indiceslocation to which to place the indices, the size of dst_indices must be num_indices_per_cap.
index_adjustvalue by which to increment the written index values

◆ pack_join()

void fastuidraw::ArcStrokedPointPacking::pack_join ( 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 ArcStrokedPoint.

Parameters
joinjoin data to pack
depththe value for ArcStrokedPoint::depth() of the packed ArcStrokedPoint values
dst_attribslocation to which to place the attributes, the size of dst_attribs must be as indicated by pack_join_size().
dst_indiceslocation to which to place the indices, the size of dst_indices must be as indicated by pack_join_size().
index_adjustvalue by which to increment the written index values

◆ pack_join_size()

void fastuidraw::ArcStrokedPointPacking::pack_join_size ( const TessellatedPath::join join,
unsigned int *  num_attributes,
unsigned int *  num_indices 
)

Returns the number of attributes realized with ArcStrokedPoint needed to pack a join (to be drawn with he join style PainterEnums::rounded_joins).

Parameters
joinjoin to realize a packed data
num_attributeslocation to which to write the needed number of attributes
num_indiceslocation to which to write the needed number of indices

◆ pack_segment_chain() [1/2]

void fastuidraw::ArcStrokedPointPacking::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 ArcStrokedPoint

Parameters
chainssegment chain to pack
depth_startvalue the lowest depth value for the attributes; the packed ArcStrokedPoint values will have depth_start <= ArcStrokedPoint::depth() and ArcStrokedPoint::depth() < depth_start + depth_range_size where depth_range_size is as indicated by pack_segment_chain_size().
dst_attribslocation to which to place the attributes, the size of dst_attribs must be as indicated by pack_segment_chain_size().
dst_indiceslocation to which to place the indices, the size of dst_indices must be as indicated by pack_segment_chain_size().
index_adjustvalue by which to increment the written index values

◆ pack_segment_chain() [2/2]

void fastuidraw::ArcStrokedPointPacking::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 ArcStrokedPoint

Parameters
chainsegment chain to pack
depth_startvalue 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_attribslocation to which to place the attributes, the size of dst_attribs must be as indicated by pack_segment_chain_size().
dst_indiceslocation to which to place the indices, the size of dst_indices must be as indicated by pack_segment_chain_size().
index_adjustvalue by which to increment the written index values

◆ pack_segment_chain_size() [1/2]

void fastuidraw::ArcStrokedPointPacking::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.

Parameters
chainssegment chain to query amount room needed to pack realized by ArcStrokedPoint
depth_range_sizelocation to which to write the depth range needed to pack the segment chain.
num_attributeslocation to which to write the needed number of attributes
num_indiceslocation to which to write the needed number of indices

◆ pack_segment_chain_size() [2/2]

void fastuidraw::ArcStrokedPointPacking::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.

Parameters
chainsegment chain to query amount room needed to pack realized by StrokedPoint
depth_range_sizelocation to which to write the depth range needed to pack the segment chain.
num_attributeslocation to which to write the needed number of attributes
num_indiceslocation to which to write the needed number of indices