FastUIDraw
|
Class to specify stroking parameters, data is packed as according to PainterStrokeParams::stroke_data_offset_t. More...
#include <painter_stroke_params.hpp>
Public Types | |
enum | stroke_data_offset_t { stroke_radius_offset, stroke_miter_limit_offset, stroking_units_offset, stroke_data_size } |
Enumeration that provides offsets for the stroking parameters. More... | |
enum | stroking_units_t { path_stroking_units, pixel_stroking_units } |
Enumeration to specify the units of the stroking radius. More... | |
Public Member Functions | |
PainterStrokeParams (void) | |
PainterStrokeParams (const PainterStrokeParams &obj) | |
unsigned int | data_size (void) const override |
float | miter_limit (void) const |
PainterStrokeParams & | miter_limit (float f) |
PainterStrokeParams & | operator= (const PainterStrokeParams &obj) |
void | pack_data (c_array< uvec4 > dst) const override |
float | radius (void) const |
PainterStrokeParams & | radius (float f) |
enum stroking_units_t | stroking_units (void) const |
PainterStrokeParams & | stroking_units (enum stroking_units_t) |
void | swap (PainterStrokeParams &obj) |
float | width (void) const |
PainterStrokeParams & | width (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 StrokingDataSelectorBase > | stroking_data_selector (bool pixel_arc_stroking_possible) |
Class to specify stroking parameters, data is packed as according to PainterStrokeParams::stroke_data_offset_t.
Definition at line 36 of file painter_stroke_params.hpp.
Enumeration that provides offsets for the stroking parameters.
Definition at line 62 of file painter_stroke_params.hpp.
Enumeration to specify the units of the stroking radius.
Enumerator | |
---|---|
path_stroking_units | Indicates that the stroking units is in local coordinates of the Path being stroking |
pixel_stroking_units | Indicates that the stroking units are in pixels |
Definition at line 43 of file painter_stroke_params.hpp.
fastuidraw::PainterStrokeParams::PainterStrokeParams | ( | void | ) |
Ctor.
fastuidraw::PainterStrokeParams::PainterStrokeParams | ( | const PainterStrokeParams & | obj | ) |
Copy ctor.
|
overridevirtual |
To be implemented by a derived class to return the number of uvec4 blocks needed to pack the data.
Implements fastuidraw::PainterShaderData.
float fastuidraw::PainterStrokeParams::miter_limit | ( | void | ) | const |
The miter limit for miter joins. Default value is 15.0.
PainterStrokeParams& fastuidraw::PainterStrokeParams::miter_limit | ( | float | f | ) |
Set the value of miter_limit(void) const; value is clamped to be non-negative.
PainterStrokeParams& fastuidraw::PainterStrokeParams::operator= | ( | const PainterStrokeParams & | obj | ) |
Assignment operator.
obj | value from which to copy |
To be implemented by a derived class to pack the data.
dst | location to which to pack the data |
Implements fastuidraw::PainterShaderData.
float fastuidraw::PainterStrokeParams::radius | ( | void | ) | const |
PainterStrokeParams& fastuidraw::PainterStrokeParams::radius | ( | float | f | ) |
Set the value of radius(void) const, equivalent to
|
static |
Returns a StrokingDataSelectorBase suitable for PainterStrokeParams.
pixel_arc_stroking_possible | if true, will inform that arc-stroking width in pixel_stroking_units is possible. |
enum stroking_units_t fastuidraw::PainterStrokeParams::stroking_units | ( | void | ) | const |
Returns the units of the stroking, default value is path_stroking_units
PainterStrokeParams& fastuidraw::PainterStrokeParams::stroking_units | ( | enum | stroking_units_t | ) |
Set the value of stroking_units(void) const
void fastuidraw::PainterStrokeParams::swap | ( | PainterStrokeParams & | obj | ) |
Swap operation
obj | object with which to swap |
float fastuidraw::PainterStrokeParams::width | ( | void | ) | const |
The stroking width, always non-negative. Default value is 2.0.
PainterStrokeParams& fastuidraw::PainterStrokeParams::width | ( | float | f | ) |
Set the value of width(void) const, values are clamped to be non-negative.