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

#include <painter_effect_brush.hpp>

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

Public Member Functions

PainterEffectBrushParamsapply_matrix (const float2x2 &m)
 
PainterEffectBrushParamsapply_rotate (float angle)
 
PainterEffectBrushParamsapply_shear (float sx, float sy)
 
PainterEffectBrushParamsapply_translate (const vec2 &p)
 
PainterEffectBrushParamscolor (const vec4 &v)
 
PainterEffectBrushParamslinear_gradient (const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &start_p, const vec2 &end_p, enum PainterBrush::spread_type_t spread)
 
PainterEffectBrushParamsno_gradient (void)
 
PainterEffectBrushParamsno_repeat_window (void)
 
PainterEffectBrushParamsno_transformation (void)
 
PainterEffectBrushParamsno_transformation_matrix (void)
 
PainterEffectBrushParamsno_transformation_translation (void)
 
PainterEffectBrushParamsradial_gradient (const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &start_p, float start_r, const vec2 &end_p, float end_r, enum PainterBrush::spread_type_t spread)
 
PainterEffectBrushParamsradial_gradient (const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &p, float r, enum PainterBrush::spread_type_t spread)
 
PainterEffectBrushParamsrepeat_window (const vec2 &pos, const vec2 &size, enum PainterBrush::spread_type_t x_mode=PainterBrush::spread_repeat, enum PainterBrush::spread_type_t y_mode=PainterBrush::spread_repeat)
 
PainterEffectBrushParamssweep_gradient (const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &p, float theta, float F, enum PainterBrush::spread_type_t spread)
 
PainterEffectBrushParamssweep_gradient (const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &p, float theta, enum PainterEnums::screen_orientation orientation, enum PainterEnums::rotation_orientation_t rotation_orientation, float F, enum PainterBrush::spread_type_t spread)
 
PainterEffectBrushParamssweep_gradient (const reference_counted_ptr< const ColorStopSequence > &cs, const vec2 &p, float theta, enum PainterEnums::screen_orientation orientation, enum PainterEnums::rotation_orientation_t rotation_orientation, enum PainterBrush::spread_type_t spread)
 
PainterEffectBrushParamstransformation (const vec2 &p, const float2x2 &m)
 
PainterEffectBrushParamstransformation_matrix (const float2x2 &m)
 
PainterEffectBrushParamstransformation_translate (const vec2 &p)
 

Friends

class PainterEffectBrush
 

Detailed Description

The PainterEffectParams derived object for PainterEffectBrush

Definition at line 58 of file painter_effect_brush.hpp.

Member Function Documentation

◆ apply_matrix()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::apply_matrix ( const float2x2 m)
inline

Apply a shear to the transformation of the brush.

Parameters
mmatrix to which to apply

Definition at line 243 of file painter_effect_brush.hpp.

◆ apply_rotate()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::apply_rotate ( float  angle)
inline

Apply a rotation to the transformation of the brush.

Parameters
anglein radians by which to rotate

Definition at line 266 of file painter_effect_brush.hpp.

◆ apply_shear()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::apply_shear ( float  sx,
float  sy 
)
inline

Apply a shear to the transformation of the brush.

Parameters
sxscale factor in x-direction
syscale factor in y-direction

Definition at line 255 of file painter_effect_brush.hpp.

◆ apply_translate()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::apply_translate ( const vec2 p)
inline

Apply a translation to the transformation of the brush.

Definition at line 276 of file painter_effect_brush.hpp.

◆ color()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::color ( const vec4 v)
inline

Set the modulate color, default value is (1, 1, 1, 1), i.e. no modulation.

Definition at line 66 of file painter_effect_brush.hpp.

◆ linear_gradient()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::linear_gradient ( const reference_counted_ptr< const ColorStopSequence > &  cs,
const vec2 start_p,
const vec2 end_p,
enum PainterBrush::spread_type_t  spread 
)
inline

Sets the brush to have a linear gradient.

Parameters
cscolor stops for gradient. If handle is invalid, then sets brush to not have a gradient.
start_pstart position of gradient
end_pend position of gradient.
spreadspecifies the gradient spread type

Definition at line 81 of file painter_effect_brush.hpp.

◆ no_gradient()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::no_gradient ( void  )
inline

Sets the brush to not have a gradient.

Definition at line 210 of file painter_effect_brush.hpp.

◆ no_repeat_window()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::no_repeat_window ( void  )
inline

Sets the brush to not have a repeat window

Definition at line 345 of file painter_effect_brush.hpp.

◆ no_transformation()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::no_transformation ( void  )
inline

Sets the brush to have no transformation.

Definition at line 319 of file painter_effect_brush.hpp.

◆ no_transformation_matrix()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::no_transformation_matrix ( void  )
inline

Sets the brush to have no matrix in its transformation.

Definition at line 309 of file painter_effect_brush.hpp.

◆ no_transformation_translation()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::no_transformation_translation ( void  )
inline

Sets the brush to have no translation in its transformation.

Definition at line 299 of file painter_effect_brush.hpp.

◆ radial_gradient() [1/2]

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::radial_gradient ( const reference_counted_ptr< const ColorStopSequence > &  cs,
const vec2 start_p,
float  start_r,
const vec2 end_p,
float  end_r,
enum PainterBrush::spread_type_t  spread 
)
inline

Sets the brush to have a radial gradient.

Parameters
cscolor stops for gradient. If handle is invalid, then sets brush to not have a gradient.
start_pstart position of gradient
start_rstarting radius of radial gradient
end_pend position of gradient.
end_rending radius of radial gradient
spreadspecifies the gradient spread type

Definition at line 100 of file painter_effect_brush.hpp.

◆ radial_gradient() [2/2]

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::radial_gradient ( const reference_counted_ptr< const ColorStopSequence > &  cs,
const vec2 p,
float  r,
enum PainterBrush::spread_type_t  spread 
)
inline

Sets the brush to have a radial gradient. Provided as a conveniance, equivalent to

radial_gradient(cs, p, 0.0f, p, r, repeat);
Parameters
cscolor stops for gradient. If handle is invalid, then sets brush to not have a gradient.
pstart and end position of gradient
rending radius of radial gradient
spreadspecifies the gradient spread type

Definition at line 122 of file painter_effect_brush.hpp.

◆ repeat_window()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::repeat_window ( const vec2 pos,
const vec2 size,
enum PainterBrush::spread_type_t  x_mode = PainterBrush::spread_repeat,
enum PainterBrush::spread_type_t  y_mode = PainterBrush::spread_repeat 
)
inline

Sets the brush to have a repeat window

Parameters
poslocation of repeat window
sizeof repeat window
x_modespread mode for x-coordinate
y_modespread mode for y-coordinate

Definition at line 333 of file painter_effect_brush.hpp.

◆ sweep_gradient() [1/3]

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::sweep_gradient ( const reference_counted_ptr< const ColorStopSequence > &  cs,
const vec2 p,
float  theta,
float  F,
enum PainterBrush::spread_type_t  spread 
)
inline

Sets the brush to have a sweep gradient (directly).

Parameters
cscolor stops for gradient. If handle is invalid, then sets brush to not have a gradient.
pposition of gradient
thetastart angle of the sweep gradient, this value should be in the range [-PI, PI]
Fthe repeat factor applied to the interpolate, the sign of F is used to determine the sign of the sweep gradient.
spreadspecifies the gradient spread type

Definition at line 142 of file painter_effect_brush.hpp.

◆ sweep_gradient() [2/3]

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::sweep_gradient ( const reference_counted_ptr< const ColorStopSequence > &  cs,
const vec2 p,
float  theta,
enum PainterEnums::screen_orientation  orientation,
enum PainterEnums::rotation_orientation_t  rotation_orientation,
float  F,
enum PainterBrush::spread_type_t  spread 
)
inline

Sets the brush to have a sweep gradient where the sign is determined by a PainterEnums::screen_orientation and a PainterEnums::rotation_orientation_t.

Parameters
cscolor stops for gradient. If handle is invalid, then sets brush to not have a gradient.
pposition of gradient
thetaangle of the sweep gradient, this value should be in the range [-PI, PI]
Fthe repeat factor applied to the interpolate, a negative reverses the orientation of the sweep.
orientationorientation of the screen
rotation_orientationorientation of the sweep
spreadspecifies the gradient spread type

Definition at line 166 of file painter_effect_brush.hpp.

◆ sweep_gradient() [3/3]

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::sweep_gradient ( const reference_counted_ptr< const ColorStopSequence > &  cs,
const vec2 p,
float  theta,
enum PainterEnums::screen_orientation  orientation,
enum PainterEnums::rotation_orientation_t  rotation_orientation,
enum PainterBrush::spread_type_t  spread 
)
inline

Sets the brush to have a sweep gradient with a repeat factor of 1.0 and where the sign is determined by a PainterEnums::screen_orientation and a PainterEnums::rotation_orientation_t. Equivalent to

sweep_gradient(cs, p, theta, orientation, rotation_orientation, 1.0f, repeat);
Parameters
cscolor stops for gradient. If handle is invalid, then sets brush to not have a gradient.
pposition of gradient
thetaangle of the sweep gradient, this value should be in the range [-PI, PI]
orientationorientation of the screen
rotation_orientationorientation of the sweep
spreadspecifies the gradient spread type

Definition at line 195 of file painter_effect_brush.hpp.

◆ transformation()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::transformation ( const vec2 p,
const float2x2 m 
)
inline

Sets the brush to have a matrix and translation in its transformation

Parameters
ptranslation value for brush transformation
mmatrix value for brush transformation

Definition at line 289 of file painter_effect_brush.hpp.

◆ transformation_matrix()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::transformation_matrix ( const float2x2 m)
inline

Sets the brush to have a matrix in its transformation.

Parameters
mmatrix value for brush transformation

Definition at line 232 of file painter_effect_brush.hpp.

◆ transformation_translate()

PainterEffectBrushParams& fastuidraw::PainterEffectBrushParams::transformation_translate ( const vec2 p)
inline

Sets the brush to have a translation in its transformation.

Parameters
ptranslation value for brush transformation

Definition at line 221 of file painter_effect_brush.hpp.


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