PCL
pcl::Pen Class Reference

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

#include <Pen.h>

+ Inheritance diagram for pcl::Pen:

Public Types

using cap = PenCap::value_type
 
using join = PenJoin::value_type
 
using style = PenStyle::value_type
 

Public Member Functions

 Pen (const Pen &p)
 
 Pen (RGBA color=0xff000000, float width=0, style s=PenStyle::Solid, cap c=PenCap::Square, join j=PenJoin::Miter)
 
 ~Pen () override
 
pcl::Brush Brush () const
 
cap Cap () const
 
RGBA Color () const
 
pcl::Brush GetBrush () const
 
bool IsEmpty () const
 
bool IsSolid () const
 
join Join () const
 
Penoperator= (const Pen &p)
 
void SetBrush (const pcl::Brush &brush)
 
void SetCap (cap c)
 
void SetColor (RGBA color)
 
void SetJoin (join j)
 
void SetStyle (style)
 
void SetWidth (float w)
 
style Style () const
 
float Width () 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 PenNull ()
 
- 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 Pen.

Definition at line 162 of file Pen.h.

Member Typedef Documentation

◆ cap

using pcl::Pen::cap = PenCap::value_type

Represents a pen cap style.

Definition at line 174 of file Pen.h.

◆ join

using pcl::Pen::join = PenJoin::value_type

Represents a pen join style.

Definition at line 179 of file Pen.h.

◆ style

using pcl::Pen::style = PenStyle::value_type

Represents a pen drawing style.

Definition at line 169 of file Pen.h.

Constructor & Destructor Documentation

◆ Pen() [1/2]

pcl::Pen::Pen ( RGBA  color = 0xff000000,
float  width = 0,
style  s = PenStyle::Solid,
cap  c = PenCap::Square,
join  j = PenJoin::Miter 
)

Constructs a Pen object with the specified color, width in pixels, and drawing, cap and join styles.

◆ Pen() [2/2]

pcl::Pen::Pen ( const Pen p)
inline

Copy constructor. This object will reference the same server-side pen as the specified instance p.

Definition at line 192 of file Pen.h.

◆ ~Pen()

pcl::Pen::~Pen ( )
inlineoverride

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

Definition at line 201 of file Pen.h.

Member Function Documentation

◆ Brush()

pcl::Brush pcl::Pen::Brush ( ) const

Returns the current pen brush.

See also
SetBrush()

◆ Cap()

cap pcl::Pen::Cap ( ) const

Returns the current pen cap style.

See also
SetCap()

◆ Color()

RGBA pcl::Pen::Color ( ) const

Returns the pen color as a 32-bit AARRGGBB pixel color value.

See also
SetColor()

◆ GetBrush()

pcl::Brush pcl::Pen::GetBrush ( ) const
inline

Returns the current pen brush.

Deprecated:
Use Pen::Brush() in newly produced code.
See also
SetBrush()

Definition at line 337 of file Pen.h.

◆ IsEmpty()

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

Returns true iff this pen draws no strokes, i.e. if the current pen drawing style is PenStyle::Empty.

See also
IsSolid(), Style()

Definition at line 284 of file Pen.h.

◆ IsSolid()

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

Returns true iff this pen draws solid strokes, i.e. if the current pen drawing style is PenStyle::Solid.

See also
IsEmpty(), Style()

Definition at line 273 of file Pen.h.

◆ Join()

join pcl::Pen::Join ( ) const

Returns the current pen join style.

See also
SetJoin()

◆ Null()

static Pen& pcl::Pen::Null ( )
static

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

◆ operator=()

Pen& pcl::Pen::operator= ( const Pen p)
inline

Assignment operator. Returns a reference to this object.

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

Definition at line 212 of file Pen.h.

◆ SetBrush()

void pcl::Pen::SetBrush ( const pcl::Brush brush)

Sets the current pen brush

See also
Brush()

◆ SetCap()

void pcl::Pen::SetCap ( cap  c)

Sets the current pen cap style.

See also
Cap()

◆ SetColor()

void pcl::Pen::SetColor ( RGBA  color)

Sets the pen color as a 32-bit AARRGGBB pixel color value.

See also
Color()

◆ SetJoin()

void pcl::Pen::SetJoin ( join  j)

Sets the current pen join style.

See also
Join()

◆ SetStyle()

void pcl::Pen::SetStyle ( style  )

Sets the pen drawing style.

See also
Style(), IsSolid(), IsEmpty()

◆ SetWidth()

void pcl::Pen::SetWidth ( float  w)

Sets the pen width in pixels.

A zero width means that this is a cosmetic pen. Cosmetic pens always draw one-pixel strokes, regardless of the transformation applied to the graphics context where they are applied.

See also
Width()

◆ Style()

style pcl::Pen::Style ( ) const

Returns the current pen drawing style.

See also
SetStyle(), IsSolid(), IsEmpty()

◆ Width()

float pcl::Pen::Width ( ) const

Returns the pen width in pixels.

A zero width means that this is a cosmetic pen. Cosmetic pens always draw one-pixel strokes, regardless of the transformation applied to the graphics context where they are applied.

See also
SetWidth()

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