FastUIDraw
Public Member Functions | Friends | List of all members
fastuidraw::StrokedPath::Subset Class Reference

A Subset represents a handle to a portion of a StrokedPath. The handle is invalid once the StrokedPath from which it comes goes out of scope. Do not save these handle values without also saving a handle of the StrokedPath from which they come. The region of a Subset is the exact same region as a PartitionedTessellatedPath::Subset object. Also, the ID() value for a Subset is the same value as PartitionedTessellatedPath::Subset::ID() as well. More...

#include <stroked_path.hpp>

Public Member Functions

 Subset (void)
 
const Rectbounding_box (void) const
 
const Pathbounding_path (void) const
 
int cap_chunk (void) const
 
c_array< const TessellatedPath::capcaps (void) const
 
vecN< Subset, 2 > children (void) const
 
bool has_children (void) const
 
unsigned int ID (void) const
 
int join_chunk (void) const
 
c_array< const TessellatedPath::joinjoins (void) const
 
 operator unspecified_bool_type () const
 
const PainterAttributeDatapainter_data (void) const
 
c_array< const TessellatedPath::segment_chainsegment_chains (void) const
 

Friends

class StrokedPath
 

Detailed Description

A Subset represents a handle to a portion of a StrokedPath. The handle is invalid once the StrokedPath from which it comes goes out of scope. Do not save these handle values without also saving a handle of the StrokedPath from which they come. The region of a Subset is the exact same region as a PartitionedTessellatedPath::Subset object. Also, the ID() value for a Subset is the same value as PartitionedTessellatedPath::Subset::ID() as well.

Definition at line 61 of file stroked_path.hpp.

Constructor & Destructor Documentation

◆ Subset()

fastuidraw::StrokedPath::Subset::Subset ( void  )
inline

Ctor to initialize value to "null" handle.

Definition at line 70 of file stroked_path.hpp.

Member Function Documentation

◆ bounding_box()

const Rect& fastuidraw::StrokedPath::Subset::bounding_box ( void  ) const

Returns the bounding box.

◆ bounding_path()

const Path& fastuidraw::StrokedPath::Subset::bounding_path ( void  ) const

Returns the bounding box realized as a Path.

◆ cap_chunk()

int fastuidraw::StrokedPath::Subset::cap_chunk ( void  ) const

Return the join chunk to feed the PainterAttributeData returned by adjustable_caps(), square_caps() rounded_caps(), flat_caps(), arc_rounded_caps() to get the attribute and index data representing the caps within this subset. A return value of -1 indicates that there are no caps within this Subset.

◆ caps()

c_array<const TessellatedPath::cap> fastuidraw::StrokedPath::Subset::caps ( void  ) const

Returns the caps within this Subset

◆ children()

vecN<Subset, 2> fastuidraw::StrokedPath::Subset::children ( void  ) const

Returns the children of this Subset. It is an error to call this if has_children() returns false.

◆ has_children()

bool fastuidraw::StrokedPath::Subset::has_children ( void  ) const

Returns true if this Subset has child Subset

◆ ID()

unsigned int fastuidraw::StrokedPath::Subset::ID ( void  ) const

Returns the ID of this Subset, i.e. the value to feed to StrokedPath::subset() to get this Subset.

◆ join_chunk()

int fastuidraw::StrokedPath::Subset::join_chunk ( void  ) const

Return the join chunk to feed the PainterAttributeData returned by bevel_joins(), miter_clip_joins() miter_bevel_joins(), miter_joins(), rounded_joins() or arc_rounded_joins() to get the attribute and index data representing the joins within this subset. A return value of -1 indicates that there are no joins within this Subset.

◆ joins()

c_array<const TessellatedPath::join> fastuidraw::StrokedPath::Subset::joins ( void  ) const

Returns the joins within this Subset

◆ operator unspecified_bool_type()

fastuidraw::StrokedPath::Subset::operator unspecified_bool_type ( ) const
inline

Allows one to legally write to test if Subset is a null-handle:

if (p)
{
// p does refers to data
}
if (!p)
{
// p does not referr to any data
}

Definition at line 91 of file stroked_path.hpp.

◆ painter_data()

const PainterAttributeData& fastuidraw::StrokedPath::Subset::painter_data ( void  ) const

Returns the PainterAttributeData to draw the triangles for the portion of the StrokedPath the Subset represents. Note: the data is packed with ArcStrokedPoint::pack() if StrokedPath::has_arcs() returns true, otherwise the data is packed with StrokedPoint::pack(). There is only one chunk of the returned object, chunk 0.

◆ segment_chains()

c_array<const TessellatedPath::segment_chain> fastuidraw::StrokedPath::Subset::segment_chains ( void  ) const

Returns the segments that are within this Subset


The documentation for this class was generated from the following file: