iPlug2 - C++ Audio Plug-in Framework
|
Used to store pattern information for gradients. More...
#include <IGraphicsStructs.h>
Public Member Functions | |
IPattern (EPatternType type) | |
Create an IPattern. More... | |
IPattern (const IColor &color) | |
Create an IPattern with a solid color fill. More... | |
int | NStops () const |
const IColorStop & | GetStop (int idx) const |
Get the IColorStop at a particular index (will crash if out of bounds) More... | |
void | AddStop (IColor color, float offset) |
Add an IColorStop to the IPattern. More... | |
void | SetTransform (float xx, float yx, float xy, float yy, float tx, float ty) |
Set the affine transform for the IPattern with values. More... | |
void | SetTransform (const IMatrix &transform) |
Set the affine transform for the IPattern with an IMatrix. More... | |
Static Public Member Functions | |
static IPattern | CreateLinearGradient (float x1, float y1, float x2, float y2, const std::initializer_list< IColorStop > &stops={}) |
Create a linear gradient IPattern. More... | |
static IPattern | CreateLinearGradient (const IRECT &bounds, EDirection direction, const std::initializer_list< IColorStop > &stops={}) |
Create a linear gradient IPattern across a rectangular area. More... | |
static IPattern | CreateRadialGradient (float x1, float y1, float r, const std::initializer_list< IColorStop > &stops={}) |
Create a radial gradient IPattern. More... | |
static IPattern | CreateSweepGradient (float x1, float y1, const std::initializer_list< IColorStop > &stops={}, float angleStart=0.f, float angleEnd=360.f) |
Create a sweep gradient IPattern (SKIA only) More... | |
Public Attributes | |
EPatternType | mType |
EPatternExtend | mExtend |
IColorStop | mStops [16] |
int | mNStops |
IMatrix | mTransform |
Used to store pattern information for gradients.
Definition at line 2145 of file IGraphicsStructs.h.
|
inline |
Create an IPattern.
type | The type of pattern, one of EPatternType |
Definition at line 2155 of file IGraphicsStructs.h.
|
inline |
Create an IPattern with a solid color fill.
color | The color for the single stop |
Definition at line 2161 of file IGraphicsStructs.h.
|
inline |
Add an IColorStop to the IPattern.
color | The IColor |
offset | The offset |
Definition at line 2294 of file IGraphicsStructs.h.
Referenced by CreateLinearGradient(), CreateRadialGradient(), CreateSweepGradient(), TestShadowGradientControl::Draw(), IGraphics::DrawRotatedSVG(), and TestColorControl::OnResize().
|
inlinestatic |
Create a linear gradient IPattern.
x1 | The start x position |
y1 | The start y position |
x2 | The end x position |
y2 | The end y position |
stops | An initializer list of IColorStops for the stops |
Definition at line 2174 of file IGraphicsStructs.h.
References AddStop(), and SetTransform().
Referenced by TestShadowGradientControl::Draw(), IWheelControl::Draw(), IVDisplayControl::DrawWidget(), TestColorControl::OnResize(), and TestGradientControl::OnResize().
|
inlinestatic |
Create a linear gradient IPattern across a rectangular area.
bounds | The rectangular area |
direction | If the gradient should be horizontal or vertical |
stops | An initializer list of IColorStops for the stops |
Definition at line 2207 of file IGraphicsStructs.h.
References IRECT::B, IRECT::L, IRECT::MH(), IRECT::MW(), IRECT::R, and IRECT::T.
|
inlinestatic |
Create a radial gradient IPattern.
x1 | The x position of the centre |
y1 | The y position of the centre |
r | The radius of the gradient |
stops | An initializer list of IColorStops for the stops |
Definition at line 2233 of file IGraphicsStructs.h.
References AddStop(), and SetTransform().
Referenced by TestMaskControl::Draw(), ILEDControl::Draw(), and TestGradientControl::OnResize().
|
inlinestatic |
Create a sweep gradient IPattern (SKIA only)
x1 | The x position of the centre |
y1 | The y position of the centre |
stops | An initializer list of IColorStops for the stops |
angleStart | the start angle of the sweep at in degrees clockwise where 0 is up |
angleEnd | the end angle of the sweep at in degrees clockwise where 0 is up |
Definition at line 2254 of file IGraphicsStructs.h.
References AddStop(), and SetTransform().
|
inline |
Get the IColorStop at a particular index (will crash if out of bounds)
idx | The index of the stop |
Definition at line 2286 of file IGraphicsStructs.h.
Referenced by IGraphicsCanvas::PathFill(), IGraphicsNanoVG::PathFill(), and IGraphicsNanoVG::PathStroke().
|
inline |
Definition at line 2278 of file IGraphicsStructs.h.
Referenced by IGraphicsCanvas::PathFill().
|
inline |
Set the affine transform for the IPattern with values.
xx | xx component of the affine transformation |
yx | yx component of the affine transformation |
xy | xy component of the affine transformation |
yy | yy component of the affine transformation |
tx | X translation component of the affine transformation |
ty | Y translation component of the affine transformation |
Definition at line 2309 of file IGraphicsStructs.h.
Referenced by CreateLinearGradient(), CreateRadialGradient(), CreateSweepGradient(), and IGraphics::DrawRotatedSVG().
|
inline |
Set the affine transform for the IPattern with an IMatrix.
transform | The affine transform matrix |
Definition at line 2316 of file IGraphicsStructs.h.