FastUIDraw
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
fastuidraw::PainterDashedStrokeParams Class Reference

Class to specify dashed stroking parameters, data is packed as according to PainterDashedStrokeParams::stroke_data_offset_t. Data for dashing is packed [TODO describe]. More...

#include <painter_dashed_stroke_params.hpp>

Inheritance diagram for fastuidraw::PainterDashedStrokeParams:
Inheritance graph
[legend]

Classes

class  DashPatternElement
 A DashPatternElement is an element of a dash pattern. It specifies how long to draw then how much space to emit before the next DashPatternElement. More...
 

Public Types

enum  stroke_data_offset_t {
  stroke_radius_offset, stroke_miter_limit_offset, stroking_units_offset, stroke_dash_offset_offset,
  stroke_total_length_offset, stroke_first_interval_start_offset, stroke_first_interval_start_on_looping_offset, stroke_number_intervals_offset,
  stroke_static_data_size
}
 Enumeration that provides offsets for the stroking parameters. The dashed pattern is packed in the next block of the data store. More...
 

Public Member Functions

 PainterDashedStrokeParams (void)
 
 PainterDashedStrokeParams (const PainterDashedStrokeParams &obj)
 
float dash_offset (void) const
 
PainterDashedStrokeParamsdash_offset (float f)
 
c_array< const DashPatternElementdash_pattern (void) const
 
PainterDashedStrokeParamsdash_pattern (c_array< const DashPatternElement > v)
 
unsigned int data_size (void) const override
 
float miter_limit (void) const
 
PainterDashedStrokeParamsmiter_limit (float f)
 
PainterDashedStrokeParamsoperator= (const PainterDashedStrokeParams &obj)
 
void pack_data (c_array< uvec4 > dst) const override
 
float radius (void) const
 
PainterDashedStrokeParamsradius (float f)
 
enum PainterStrokeParams::stroking_units_t stroking_units (void) const
 
PainterDashedStrokeParamsstroking_units (enum PainterStrokeParams::stroking_units_t)
 
void swap (PainterDashedStrokeParams &obj)
 
float width (void) const
 
PainterDashedStrokeParamswidth (float f)
 
- Public Member Functions inherited from fastuidraw::PainterShaderData
virtual unsigned int number_resources (void) const
 
virtual void save_resources (c_array< reference_counted_ptr< const resource_base > > dst) const
 

Static Public Member Functions

static reference_counted_ptr< const StrokingDataSelectorBasestroking_data_selector (bool pixel_arc_stroking_possible)
 

Detailed Description

Class to specify dashed stroking parameters, data is packed as according to PainterDashedStrokeParams::stroke_data_offset_t. Data for dashing is packed [TODO describe].

Definition at line 38 of file painter_dashed_stroke_params.hpp.

Member Enumeration Documentation

◆ stroke_data_offset_t

Enumeration that provides offsets for the stroking parameters. The dashed pattern is packed in the next block of the data store.

Enumerator
stroke_radius_offset 

offset to dashed stroke radius (packed as float)

stroke_miter_limit_offset 

offset to dashed stroke miter limit (packed as float)

stroking_units_offset 

Offset to stroking units (packed as uint)

stroke_dash_offset_offset 

offset to dash offset value for dashed stroking (packed as float)

stroke_total_length_offset 

offset to total legnth of dash pattern (packed as float)

stroke_first_interval_start_offset 

offset to value recording the start of the first interval (packed as float)

stroke_first_interval_start_on_looping_offset 

offset to value recording the start of the first interval on looping (packed as float)

stroke_number_intervals_offset 

offset to value giving the number of intervals (packed as uint)

stroke_static_data_size 

size of static data for dashed stroking

Definition at line 47 of file painter_dashed_stroke_params.hpp.

Constructor & Destructor Documentation

◆ PainterDashedStrokeParams() [1/2]

fastuidraw::PainterDashedStrokeParams::PainterDashedStrokeParams ( void  )

Ctor.

◆ PainterDashedStrokeParams() [2/2]

fastuidraw::PainterDashedStrokeParams::PainterDashedStrokeParams ( const PainterDashedStrokeParams obj)

Copy ctor.

Member Function Documentation

◆ dash_offset() [1/2]

float fastuidraw::PainterDashedStrokeParams::dash_offset ( void  ) const

The dashed offset, i.e. the starting point of the dash pattern to start dashed stroking.

◆ dash_offset() [2/2]

PainterDashedStrokeParams& fastuidraw::PainterDashedStrokeParams::dash_offset ( float  f)

Set the value of dash_offset(void) const

◆ dash_pattern() [1/2]

c_array<const DashPatternElement> fastuidraw::PainterDashedStrokeParams::dash_pattern ( void  ) const

Returns the dash pattern for stroking.

◆ dash_pattern() [2/2]

PainterDashedStrokeParams& fastuidraw::PainterDashedStrokeParams::dash_pattern ( c_array< const DashPatternElement v)

Set the value return by dash_pattern(void) const.

Parameters
vdash pattern; the values are -copied-.

◆ data_size()

unsigned int fastuidraw::PainterDashedStrokeParams::data_size ( void  ) const
overridevirtual

To be implemented by a derived class to return the number of uvec4 blocks needed to pack the data.

Implements fastuidraw::PainterShaderData.

◆ miter_limit() [1/2]

float fastuidraw::PainterDashedStrokeParams::miter_limit ( void  ) const

The miter limit for miter joins

◆ miter_limit() [2/2]

PainterDashedStrokeParams& fastuidraw::PainterDashedStrokeParams::miter_limit ( float  f)

Set the value of miter_limit(void) const value is clamped to be non-negative.

◆ operator=()

PainterDashedStrokeParams& fastuidraw::PainterDashedStrokeParams::operator= ( const PainterDashedStrokeParams obj)

Assignment operator.

Parameters
objvalue from which to copy

◆ pack_data()

void fastuidraw::PainterDashedStrokeParams::pack_data ( c_array< uvec4 dst) const
overridevirtual

To be implemented by a derived class to pack the data.

Parameters
dstlocation to which to pack the data

Implements fastuidraw::PainterShaderData.

◆ radius() [1/2]

float fastuidraw::PainterDashedStrokeParams::radius ( void  ) const

The stroking radius, equivalent to

width() * 0.5

◆ radius() [2/2]

PainterDashedStrokeParams& fastuidraw::PainterDashedStrokeParams::radius ( float  f)

Set the value of radius(void) const, equivalent to

width(2.0 * f)

◆ stroking_data_selector()

static reference_counted_ptr<const StrokingDataSelectorBase> fastuidraw::PainterDashedStrokeParams::stroking_data_selector ( bool  pixel_arc_stroking_possible)
static

Returns a StrokingDataSelectorBase suitable for PainterDashedStrokeParams.

Parameters
pixel_arc_stroking_possibleif true, will inform that arc-stroking width in PainterStrokeParams::pixel_stroking_units is possible.

◆ stroking_units() [1/2]

enum PainterStrokeParams::stroking_units_t fastuidraw::PainterDashedStrokeParams::stroking_units ( void  ) const

Returns the units of the stroking, default value is PainterStrokeParams::path_stroking_units

◆ stroking_units() [2/2]

PainterDashedStrokeParams& fastuidraw::PainterDashedStrokeParams::stroking_units ( enum PainterStrokeParams::stroking_units_t  )

Set the value of stroking_units(void) const, values are clamped to be non-negative.

◆ swap()

void fastuidraw::PainterDashedStrokeParams::swap ( PainterDashedStrokeParams obj)

Swap operation

Parameters
objobject with which to swap

◆ width() [1/2]

float fastuidraw::PainterDashedStrokeParams::width ( void  ) const

The stroking width

◆ width() [2/2]

PainterDashedStrokeParams& fastuidraw::PainterDashedStrokeParams::width ( float  f)

Set the value of width(void) const, values are clamped to be non-negative.


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