FastUIDraw
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
fastuidraw::FilledPath::Subset Class Reference

A Subset represents a handle to a portion of a FilledPath. The handle is invalid once the FilledPath from which it comes goes out of scope. Do not save these handle values without also saving a handle of the FilledPath from which they come. More...

#include <filled_path.hpp>

Public Types

enum  aa_fuzz_type_t { aa_fuzz_type_on_path, aa_fuzz_type_on_boundary, aa_fuzz_type_on_boundary_miter }
 

Public Member Functions

const PainterAttributeDataaa_fuzz_painter_data (void) const
 
const Rectbounding_box (void) const
 
const Pathbounding_path (void) const
 
const PainterAttributeDatapainter_data (void) const
 
c_array< const int > winding_numbers (void) const
 

Static Public Member Functions

static unsigned int aa_fuzz_chunk_from_winding_number (int w)
 
static unsigned int fill_chunk_from_fill_rule (enum PainterEnums::fill_rule_t fill_rule)
 
static unsigned int fill_chunk_from_winding_number (int w)
 

Friends

class FilledPath
 

Detailed Description

A Subset represents a handle to a portion of a FilledPath. The handle is invalid once the FilledPath from which it comes goes out of scope. Do not save these handle values without also saving a handle of the FilledPath from which they come.

Definition at line 64 of file filled_path.hpp.

Member Enumeration Documentation

◆ aa_fuzz_type_t

Enumeration to specify type for an attribute of aa_fuzz_painter_data().

Enumerator
aa_fuzz_type_on_path 

Point is a point on the path.

aa_fuzz_type_on_boundary 

Point is a point on the boundary of the aa-fuzz

aa_fuzz_type_on_boundary_miter 

Point is a point on the boundary of the aa-fuzz as a miter-join point.

Definition at line 71 of file filled_path.hpp.

Member Function Documentation

◆ aa_fuzz_chunk_from_winding_number()

static unsigned int fastuidraw::FilledPath::Subset::aa_fuzz_chunk_from_winding_number ( int  w)
static

Returns the chunk to pass PainterAttributeData::index_data_chunk() and PainterAttributeData::attribute_data_chunk() on the PainterAttributeData returned by aa_fuzz_painter_data(). NOTE that this value is NOT the same as returned by fill_chunk_from_winding_number(int).

Parameters
wwinding number

◆ aa_fuzz_painter_data()

const PainterAttributeData& fastuidraw::FilledPath::Subset::aa_fuzz_painter_data ( void  ) const

Returns the PainterAttributeData to draw the anti-alias fuzz for the portion of the FilledPath the Subset represents. The aa-fuzz is drawn as a quad (of two triangles) per edge of the boudnary of a filled component. The attribute data is packed as follows:

◆ bounding_box()

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

Returns the bounding box of the Subset.

◆ bounding_path()

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

Returns the bounding box realized as a Path.

◆ fill_chunk_from_fill_rule()

static unsigned int fastuidraw::FilledPath::Subset::fill_chunk_from_fill_rule ( enum PainterEnums::fill_rule_t  fill_rule)
static

Returns what chunk to pass PainterAttributeData::index_data_chunk() called on the PainterAttributeData returned by painter_data() to get the triangles of a specified fill rule.

◆ fill_chunk_from_winding_number()

static unsigned int fastuidraw::FilledPath::Subset::fill_chunk_from_winding_number ( int  w)
static

Returns what chunk to pass PainterAttributeData::index_data_chunk() called on the PainterAttributeData returned by painter_data() to get the triangles of a specified winding number. The same attribute chunk, 0, is used regardless of which winding number.

Parameters
wwinding number

◆ painter_data()

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

Returns the PainterAttributeData to draw the triangles for the portion of the FilledPath the Subset represents. The attribute data is packed as follows:

◆ winding_numbers()

c_array<const int> fastuidraw::FilledPath::Subset::winding_numbers ( void  ) const

Returns an array listing what winding number values there are triangle in this Subset. To get the indices for those triangle with winding number N, use the chunk computed from chunk_from_winding_number(N). The same attribute chunk, 0, is used regardless of which index chunk.


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