PCL
pcl::Brush Class Reference

Client-side interface to a PixInsight Brush object. More...

#include <Brush.h>

+ Inheritance diagram for pcl::Brush:

Public Types

using style = BrushStyle::value_type
 

Public Member Functions

 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
 
virtual bool IsGradient () 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)
 

Static Public Member Functions

static BrushNull ()
 
- Static Public Member Functions inherited from pcl::UIObject
static UIObjectNull ()
 

Additional Inherited Members

- 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 Brush.

See also
GradientBrush, LinearGradientBrush, RadialGradientBrush, ConicalGradientBrush

Definition at line 157 of file Brush.h.

Member Typedef Documentation

◆ style

using pcl::Brush::style = BrushStyle::value_type

Represents the brush style. Supported values are defined in the BrushStyle namespace.

Definition at line 165 of file Brush.h.

Constructor & Destructor Documentation

◆ Brush() [1/4]

pcl::Brush::Brush ( RGBA  color = 0xff000000,
style  = BrushStyle::Solid 
)

Constructs a brush with the specified color and style.

◆ Brush() [2/4]

pcl::Brush::Brush ( const Bitmap bmp)

Constructs a stippled brush with the specified bitmap pattern bmp.

◆ Brush() [3/4]

pcl::Brush::Brush ( const Brush b)
inline

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

Definition at line 181 of file Brush.h.

◆ Brush() [4/4]

pcl::Brush::Brush ( Brush &&  x)
inline

Move constructor.

Definition at line 189 of file Brush.h.

◆ ~Brush()

pcl::Brush::~Brush ( )
inlineoverride

Destroys a Brush object. If this object references an existing brush in the PixInsight core application, its reference count is decremented. If it becomes unreferenced, it will be garbage-collected.

Definition at line 199 of file Brush.h.

Member Function Documentation

◆ Color()

RGBA pcl::Brush::Color ( ) const

Returns the current color of this brush.

◆ IsEmpty()

bool pcl::Brush::IsEmpty ( ) const
inline

Returns true iff this brush is empty (or transparent), i.e. if its current style is BrushStyle::Empty. An empty brush produces transparent shapes.

Definition at line 260 of file Brush.h.

◆ IsGradient()

virtual bool pcl::Brush::IsGradient ( ) const
inlinevirtual

Returns true iff this object is a gradient brush.

Reimplemented in pcl::GradientBrush.

Definition at line 311 of file Brush.h.

◆ IsSolid()

bool pcl::Brush::IsSolid ( ) const
inline

Returns true iff this brush is solid, i.e. if its current style is BrushStyle::Solid.

Definition at line 251 of file Brush.h.

◆ IsStippled()

bool pcl::Brush::IsStippled ( ) const
inline

Returns true iff this brush is stippled, i.e. if its current style is BrushStyle::Stippled. A stippled brush draws a regular pattern consisting of multiple, adjacent copies of a Bitmap image.

Definition at line 279 of file Brush.h.

◆ IsTransparent()

bool pcl::Brush::IsTransparent ( ) const
inline

Returns true iff this brush is transparent. This function is a synonym for IsEmpty().

Definition at line 269 of file Brush.h.

◆ Null()

static Brush& pcl::Brush::Null ( )
static

Returns a reference to a null brush. A null Brush object does not correspond to an existing brush object in the PixInsight core application.

◆ operator=() [1/2]

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

Move assignment operator. Returns a reference to this object.

Definition at line 219 of file Brush.h.

◆ operator=() [2/2]

Brush& pcl::Brush::operator= ( const Brush 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 210 of file Brush.h.

◆ SetColor()

void pcl::Brush::SetColor ( RGBA  )

Sets the color of this brush.

◆ SetStipple()

void pcl::Brush::SetStipple ( const Bitmap )

Sets the current stipple for this brush. This function implicitly forces the style of this brush to be BrushStyle::Stippled.

◆ SetStyle()

void pcl::Brush::SetStyle ( style  )

Sets the style of this brush.

Gradient styles (BrushStyle::LinearGradient, BrushStyle::RadialGradient and BrushStyle::ConicalGradient) cannot be set with this function, since gradient brushes are implemented as separate PCL classes (LinearGradientBrush, RadialGradientBrush and ConicalGradientBrush, respectively).

◆ Stipple()

Bitmap pcl::Brush::Stipple ( ) const

Returns the current stipple of this brush. If the current style of this brush is not BrushStyle::Stippled, a null Bitmap object is returned.

◆ Style()

style pcl::Brush::Style ( ) const

Returns the current style of this brush.


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