PCL
pcl::LinearGradientBrush Class Reference

Linear gradient brush. More...

#include <Brush.h>

+ Inheritance diagram for pcl::LinearGradientBrush:

Public Types

using spread_mode = GradientBrush::spread_mode
 
using stop_list = GradientBrush::stop_list
 
- Public Types inherited from pcl::GradientBrush
using spread_mode = GradientSpreadMode::value_type
 
using stop_list = Array< Stop >
 
- Public Types inherited from pcl::Brush
using style = BrushStyle::value_type
 

Public Member Functions

 LinearGradientBrush (const DRect &r, const stop_list &stops=stop_list(), spread_mode spread=GradientSpreadMode::Pad)
 
 LinearGradientBrush (const LinearGradientBrush &b)
 
 LinearGradientBrush (const Rect &r, const stop_list &stops=stop_list(), spread_mode spread=GradientSpreadMode::Pad)
 
 LinearGradientBrush (double x1, double y1, double x2, double y2, const stop_list &stops=stop_list(), spread_mode spread=GradientSpreadMode::Pad)
 
 LinearGradientBrush (LinearGradientBrush &&x)
 
void GetParameters (double &x1, double &y1, double &x2, double &y2) const
 
LinearGradientBrushoperator= (const LinearGradientBrush &b)
 
LinearGradientBrushoperator= (LinearGradientBrush &&x)
 
DRect Parameters () const
 
- Public Member Functions inherited from pcl::GradientBrush
bool IsGradient () const override
 
spread_mode SpreadMode () const
 
stop_list Stops () const
 
- Public Member Functions inherited from pcl::Brush
 Brush (Brush &&x)
 
 Brush (const Bitmap &bmp)
 
 Brush (const Brush &b)
 
 Brush (RGBA color=0xff000000, style=BrushStyle::Solid)
 
 ~Brush () override
 
RGBA Color () const
 
bool IsEmpty () const
 
bool IsSolid () const
 
bool IsStippled () const
 
bool IsTransparent () const
 
Brushoperator= (Brush &&x)
 
Brushoperator= (const Brush &b)
 
void SetColor (RGBA)
 
void SetStipple (const Bitmap &)
 
void SetStyle (style)
 
Bitmap Stipple () const
 
style Style () const
 
- Public Member Functions inherited from pcl::UIObject
virtual ~UIObject () noexcept(false)
 
virtual void EnsureUnique ()
 
bool IsAlias () const
 
bool IsGarbage () const
 
bool IsNull () const
 
bool IsSameObject (const UIObject &o) const
 
bool IsUnique () const
 
String ObjectId () const
 
IsoString ObjectType () const
 
bool operator< (const UIObject &o) const
 
bool operator== (const UIObject &o) const
 
size_type RefCount () const
 
void SetObjectId (const String &id)
 

Additional Inherited Members

- Static Public Member Functions inherited from pcl::Brush
static BrushNull ()
 
- Static Public Member Functions inherited from pcl::UIObject
static UIObjectNull ()
 
- Protected Member Functions inherited from pcl::UIObject
 UIObject ()=default
 
 UIObject (const UIObject &x)
 
 UIObject (UIObject &&x)
 
UIObjectoperator= (const UIObject &x)
 
UIObjectoperator= (UIObject &&x)
 

Detailed Description

TODO: Write a detailed description for LinearGradientBrush.

See also
Brush, GradientBrush, RadialGradientBrush, ConicalGradientBrush

Definition at line 449 of file Brush.h.

Member Typedef Documentation

◆ spread_mode

using pcl::LinearGradientBrush::spread_mode = GradientBrush::spread_mode

Represents a gradient spread mode. Supported values are defined in the GradientSpreadMode namespace.

Definition at line 457 of file Brush.h.

◆ stop_list

Represents a list of gradient stops.

Definition at line 462 of file Brush.h.

Constructor & Destructor Documentation

◆ LinearGradientBrush() [1/5]

pcl::LinearGradientBrush::LinearGradientBrush ( double  x1,
double  y1,
double  x2,
double  y2,
const stop_list stops = stop_list(),
spread_mode  spread = GradientSpreadMode::Pad 
)

Constructs a LinearGradientBrush object.

Parameters
x1,y1Coordinates of the gradient's starting point.
x2,y2Coordinates of the gradient's end point.
stopsReference to a list of gradient stops. If an empty list is specified (as by default), two stops will be generated automatically: {0.0,0x00000000} and {1.0,0xFF000000}.
spreadGradient spread mode. Supported spread modes are defined in the GradientSpreadMode namespace. The default is GradientSpreadMode::Pad.

◆ LinearGradientBrush() [2/5]

pcl::LinearGradientBrush::LinearGradientBrush ( const DRect r,
const stop_list stops = stop_list(),
spread_mode  spread = GradientSpreadMode::Pad 
)

Constructs a LinearGradientBrush object.

This is an overloaded constructor, provided for convenience. It behaves like the preceding constructor, except the linear gradient parameters are specified as a rectangle r using floating point coordinates.

◆ LinearGradientBrush() [3/5]

pcl::LinearGradientBrush::LinearGradientBrush ( const Rect r,
const stop_list stops = stop_list(),
spread_mode  spread = GradientSpreadMode::Pad 
)

Constructs a LinearGradientBrush object.

This is an overloaded constructor, provided for convenience. It behaves like the preceding constructor, except the linear gradient parameters are specified as a rectangle r using integer coordinates.

◆ LinearGradientBrush() [4/5]

pcl::LinearGradientBrush::LinearGradientBrush ( const LinearGradientBrush b)
inline

Copy constructor. This object will reference the same server-side brush as the specified instance b.

Definition at line 509 of file Brush.h.

◆ LinearGradientBrush() [5/5]

pcl::LinearGradientBrush::LinearGradientBrush ( LinearGradientBrush &&  x)
inline

Move constructor.

Definition at line 517 of file Brush.h.

Member Function Documentation

◆ GetParameters()

void pcl::LinearGradientBrush::GetParameters ( double &  x1,
double &  y1,
double &  x2,
double &  y2 
) const

Retrieves the linear gradient parameters of this object.

Parameters
[out]x1,y1Coordinates of the gradient's starting point.
[out]x2,y2Coordinates of the gradient's end point.
See also
Parameters()

◆ operator=() [1/2]

LinearGradientBrush& pcl::LinearGradientBrush::operator= ( const LinearGradientBrush b)
inline

Copy assignment operator. Returns a reference to this object.

Makes this object reference the same server-side brush as the specified instance b. If the previous brush becomes unreferenced, it will be garbage-collected by the PixInsight core application.

Definition at line 529 of file Brush.h.

◆ operator=() [2/2]

LinearGradientBrush& pcl::LinearGradientBrush::operator= ( LinearGradientBrush &&  x)
inline

Move assignment operator. Returns a reference to this object.

Definition at line 538 of file Brush.h.

◆ Parameters()

DRect pcl::LinearGradientBrush::Parameters ( ) const
inline

Returns the linear gradient parameters of this object as a DRect object.

See also
GetParameters( double&, double&, double&, double& )

Definition at line 560 of file Brush.h.

References pcl::GenericRectangle< T >::x0, pcl::GenericRectangle< T >::x1, pcl::GenericRectangle< T >::y0, and pcl::GenericRectangle< T >::y1.


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