PCL
pcl::GraphicsContextBase Class Reference

Base class of client-side interface classes to PixInsight graphics contexts More...

#include <Graphics.h>

+ Inheritance diagram for pcl::GraphicsContextBase:

Public Types

using composition_op = CompositionOp::value_type
 
using fill_rule = FillRule::value_type
 

Public Member Functions

 GraphicsContextBase ()
 
 GraphicsContextBase (Bitmap &bitmap)
 
 GraphicsContextBase (Control &control)
 
 GraphicsContextBase (GraphicsContextBase &&x)
 
 GraphicsContextBase (SVG &svg)
 
 ~GraphicsContextBase () override
 
pcl::Brush BackgroundBrush () const
 
bool BeginPaint (Bitmap &bitmap)
 
bool BeginPaint (Control &control)
 
bool BeginPaint (SVG &svg)
 
pcl::Brush Brush () const
 
composition_op CompositionOperator () const
 
void DisableAntialiasing (bool disable=true)
 
void DisableClipping (bool disable=true)
 
void DisableSmoothInterpolation (bool disable=true)
 
void DisableTextAntialiasing (bool disable=true)
 
void DisableTransformation (bool disable=true)
 
void EnableAntialiasing (bool=true)
 
void EnableClipping (bool=true)
 
void EnableSmoothInterpolation (bool=true)
 
void EnableTextAntialiasing (bool=true)
 
void EnableTransformation (bool=true)
 
void EndPaint ()
 
void EnsureUnique () override
 
pcl::Font Font () const
 
pcl::Brush GetBrush () const
 
pcl::Font GetFont () const
 
pcl::Pen GetPen () const
 
bool IsAntialiasingEnabled () const
 
bool IsClippingEnabled () const
 
bool IsOpaqueBackground () const
 
bool IsPainting () const
 
bool IsSmoothInterpolationEnabled () const
 
bool IsTextAntialiasingEnabled () const
 
bool IsTransformationEnabled () const
 
bool IsTransparentBackground () const
 
void MultiplyTransformationMatrix (const Matrix &M)
 
void MultiplyTransformationMatrix (double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)
 
double Opacity () const
 
GraphicsContextBaseoperator= (GraphicsContextBase &&x)
 
pcl::Pen Pen () const
 
void PopState ()
 
void PushState ()
 
void ResetCompositionOperator ()
 
void ResetTransformation ()
 
void RotateTransformation (double angleRadians)
 
void ScaleTransformation (double scale)
 
void ScaleTransformation (double xScale, double yScale)
 
void SetBackgroundBrush (const pcl::Brush &)
 
void SetBrush (const pcl::Brush &)
 
void SetCompositionOperator (composition_op)
 
void SetFont (const pcl::Font &)
 
void SetOpacity (double op)
 
void SetOpaqueBackground (bool opaque=true)
 
void SetPen (const pcl::Pen &)
 
void SetPen (RGBA color, float width)
 
void SetTransformationMatrix (const Matrix &M)
 
void SetTransformationMatrix (double m11, double m12, double m13, double m21, double m22, double m23, double m31, double m32, double m33)
 
void SetTransparentBackground (bool=true)
 
void ShearTransformation (double s)
 
void ShearTransformation (double sx, double sy)
 
void Transform (Array< DPoint > &a) const
 
void Transform (double &x, double &y) const
 
void Transform (DPoint *p, size_type n) const
 
Matrix TransformationMatrix () const
 
Array< DPointTransformed (const Array< DPoint > &a) const
 
DPoint Transformed (const DPoint &p) const
 
DRect Transformed (const DRect &r) const
 
void TranslateTransformation (double d)
 
void TranslateTransformation (double dx, double dy)
 
- Public Member Functions inherited from pcl::UIObject
virtual ~UIObject () noexcept(false)
 
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::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 GraphicsContextBase.

TODO: Include a number of examples for drawing primitives, composition

operators, rendering performance, transformations, etc.

Definition at line 207 of file Graphics.h.

Member Typedef Documentation

◆ composition_op

using pcl::GraphicsContextBase::composition_op = CompositionOp::value_type

Represents a Porter-Duff alpha composition operator.

Definition at line 214 of file Graphics.h.

◆ fill_rule

using pcl::GraphicsContextBase::fill_rule = FillRule::value_type

Represents a polygon fill rule.

Definition at line 219 of file Graphics.h.

Constructor & Destructor Documentation

◆ GraphicsContextBase() [1/5]

pcl::GraphicsContextBase::GraphicsContextBase ( )

Constructs an inactive graphics context.

◆ GraphicsContextBase() [2/5]

pcl::GraphicsContextBase::GraphicsContextBase ( Control control)

Constructs an active graphics context, ready to draw on the specified control.

Warning
Invoking this constructor outside a Control::OnPaint() event handler is illegal on all supported platforms. If called without an active OnPaint() event, this constructor throws an Error exception.

◆ GraphicsContextBase() [3/5]

pcl::GraphicsContextBase::GraphicsContextBase ( Bitmap bitmap)

Constructs an active graphics context, ready to draw on the specified bitmap.

◆ GraphicsContextBase() [4/5]

pcl::GraphicsContextBase::GraphicsContextBase ( SVG svg)

Constructs an active graphics context, ready to draw on the specified svg object.

◆ GraphicsContextBase() [5/5]

pcl::GraphicsContextBase::GraphicsContextBase ( GraphicsContextBase &&  x)
inline

Move constructor.

Definition at line 251 of file Graphics.h.

◆ ~GraphicsContextBase()

pcl::GraphicsContextBase::~GraphicsContextBase ( )
inlineoverride

Destroys a GraphicsContextBase object. If this graphics context is active, it is terminated upon destruction.

Definition at line 260 of file Graphics.h.

Member Function Documentation

◆ BackgroundBrush()

pcl::Brush pcl::GraphicsContextBase::BackgroundBrush ( ) const

#

◆ BeginPaint() [1/3]

bool pcl::GraphicsContextBase::BeginPaint ( Bitmap bitmap)

Activates this graphics context to draw on the specified bitmap.

◆ BeginPaint() [2/3]

bool pcl::GraphicsContextBase::BeginPaint ( Control control)

Activates this graphics context to draw on the specified control.

Warning
Calling this function outside a Control::OnPaint() event handler is illegal on all supported platforms.

◆ BeginPaint() [3/3]

bool pcl::GraphicsContextBase::BeginPaint ( SVG svg)

Activates this graphics context to draw on the specified svg object.

◆ Brush()

pcl::Brush pcl::GraphicsContextBase::Brush ( ) const

#

◆ CompositionOperator()

composition_op pcl::GraphicsContextBase::CompositionOperator ( ) const

#

◆ DisableAntialiasing()

void pcl::GraphicsContextBase::DisableAntialiasing ( bool  disable = true)
inline

#

Definition at line 469 of file Graphics.h.

◆ DisableClipping()

void pcl::GraphicsContextBase::DisableClipping ( bool  disable = true)
inline

#

Definition at line 454 of file Graphics.h.

◆ DisableSmoothInterpolation()

void pcl::GraphicsContextBase::DisableSmoothInterpolation ( bool  disable = true)
inline

#

Definition at line 499 of file Graphics.h.

◆ DisableTextAntialiasing()

void pcl::GraphicsContextBase::DisableTextAntialiasing ( bool  disable = true)
inline

#

Definition at line 484 of file Graphics.h.

◆ DisableTransformation()

void pcl::GraphicsContextBase::DisableTransformation ( bool  disable = true)
inline

#

Definition at line 325 of file Graphics.h.

◆ EnableAntialiasing()

void pcl::GraphicsContextBase::EnableAntialiasing ( bool  = true)

#

◆ EnableClipping()

void pcl::GraphicsContextBase::EnableClipping ( bool  = true)

#

◆ EnableSmoothInterpolation()

void pcl::GraphicsContextBase::EnableSmoothInterpolation ( bool  = true)

#

◆ EnableTextAntialiasing()

void pcl::GraphicsContextBase::EnableTextAntialiasing ( bool  = true)

#

◆ EnableTransformation()

void pcl::GraphicsContextBase::EnableTransformation ( bool  = true)

#

◆ EndPaint()

void pcl::GraphicsContextBase::EndPaint ( )

Terminates a graphics context drawing operation.

◆ EnsureUnique()

void pcl::GraphicsContextBase::EnsureUnique ( )
inlineoverridevirtual

Ensures that the server-side object managed by this instance is uniquely referenced.

Since graphics contexts are unique objects, calling this member function has no effect.

Reimplemented from pcl::UIObject.

Definition at line 283 of file Graphics.h.

◆ Font()

pcl::Font pcl::GraphicsContextBase::Font ( ) const

#

◆ GetBrush()

pcl::Brush pcl::GraphicsContextBase::GetBrush ( ) const
inline
Deprecated:
Use Graphics::Brush() in newly produced code.

Definition at line 587 of file Graphics.h.

◆ GetFont()

pcl::Font pcl::GraphicsContextBase::GetFont ( ) const
inline
Deprecated:
Use Graphics::Font() in newly produced code.

Definition at line 603 of file Graphics.h.

◆ GetPen()

pcl::Pen pcl::GraphicsContextBase::GetPen ( ) const
inline
Deprecated:
Use Graphics::Pen() in newly produced code.

Definition at line 564 of file Graphics.h.

◆ IsAntialiasingEnabled()

bool pcl::GraphicsContextBase::IsAntialiasingEnabled ( ) const

#

◆ IsClippingEnabled()

bool pcl::GraphicsContextBase::IsClippingEnabled ( ) const

#

◆ IsOpaqueBackground()

bool pcl::GraphicsContextBase::IsOpaqueBackground ( ) const
inline

#

Definition at line 541 of file Graphics.h.

◆ IsPainting()

bool pcl::GraphicsContextBase::IsPainting ( ) const

Returns true iff this graphics context is currently active.

◆ IsSmoothInterpolationEnabled()

bool pcl::GraphicsContextBase::IsSmoothInterpolationEnabled ( ) const

#

◆ IsTextAntialiasingEnabled()

bool pcl::GraphicsContextBase::IsTextAntialiasingEnabled ( ) const

#

◆ IsTransformationEnabled()

bool pcl::GraphicsContextBase::IsTransformationEnabled ( ) const

#

◆ IsTransparentBackground()

bool pcl::GraphicsContextBase::IsTransparentBackground ( ) const

#

◆ MultiplyTransformationMatrix() [1/2]

void pcl::GraphicsContextBase::MultiplyTransformationMatrix ( const Matrix M)

#

◆ MultiplyTransformationMatrix() [2/2]

void pcl::GraphicsContextBase::MultiplyTransformationMatrix ( double  m11,
double  m12,
double  m13,
double  m21,
double  m22,
double  m23,
double  m31,
double  m32,
double  m33 
)
inline

#

Definition at line 353 of file Graphics.h.

◆ Opacity()

double pcl::GraphicsContextBase::Opacity ( ) const

#

◆ operator=()

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

Move assignment operator. Returns a reference to this object.

Definition at line 270 of file Graphics.h.

◆ Pen()

pcl::Pen pcl::GraphicsContextBase::Pen ( ) const

#

◆ PopState()

void pcl::GraphicsContextBase::PopState ( )

#

◆ PushState()

void pcl::GraphicsContextBase::PushState ( )

#

◆ ResetCompositionOperator()

void pcl::GraphicsContextBase::ResetCompositionOperator ( )
inline

#

Definition at line 514 of file Graphics.h.

◆ ResetTransformation()

void pcl::GraphicsContextBase::ResetTransformation ( )

#

◆ RotateTransformation()

void pcl::GraphicsContextBase::RotateTransformation ( double  angleRadians)

#

◆ ScaleTransformation() [1/2]

void pcl::GraphicsContextBase::ScaleTransformation ( double  scale)
inline

#

Definition at line 370 of file Graphics.h.

◆ ScaleTransformation() [2/2]

void pcl::GraphicsContextBase::ScaleTransformation ( double  xScale,
double  yScale 
)

#

◆ SetBackgroundBrush()

void pcl::GraphicsContextBase::SetBackgroundBrush ( const pcl::Brush )

#

◆ SetBrush()

void pcl::GraphicsContextBase::SetBrush ( const pcl::Brush )

#

◆ SetCompositionOperator()

void pcl::GraphicsContextBase::SetCompositionOperator ( composition_op  )

#

◆ SetFont()

void pcl::GraphicsContextBase::SetFont ( const pcl::Font )

#

◆ SetOpacity()

void pcl::GraphicsContextBase::SetOpacity ( double  op)

#

◆ SetOpaqueBackground()

void pcl::GraphicsContextBase::SetOpaqueBackground ( bool  opaque = true)
inline

#

Definition at line 552 of file Graphics.h.

◆ SetPen() [1/2]

void pcl::GraphicsContextBase::SetPen ( const pcl::Pen )

#

◆ SetPen() [2/2]

void pcl::GraphicsContextBase::SetPen ( RGBA  color,
float  width 
)
inline

#

Definition at line 575 of file Graphics.h.

◆ SetTransformationMatrix() [1/2]

void pcl::GraphicsContextBase::SetTransformationMatrix ( const Matrix M)

#

◆ SetTransformationMatrix() [2/2]

void pcl::GraphicsContextBase::SetTransformationMatrix ( double  m11,
double  m12,
double  m13,
double  m21,
double  m22,
double  m23,
double  m31,
double  m32,
double  m33 
)
inline

#

Definition at line 340 of file Graphics.h.

◆ SetTransparentBackground()

void pcl::GraphicsContextBase::SetTransparentBackground ( bool  = true)

#

◆ ShearTransformation() [1/2]

void pcl::GraphicsContextBase::ShearTransformation ( double  s)
inline

#

Definition at line 392 of file Graphics.h.

◆ ShearTransformation() [2/2]

void pcl::GraphicsContextBase::ShearTransformation ( double  sx,
double  sy 
)

#

◆ Transform() [1/3]

void pcl::GraphicsContextBase::Transform ( Array< DPoint > &  a) const
inline

#

Definition at line 411 of file Graphics.h.

◆ Transform() [2/3]

void pcl::GraphicsContextBase::Transform ( double &  x,
double &  y 
) const

#

◆ Transform() [3/3]

void pcl::GraphicsContextBase::Transform ( DPoint p,
size_type  n 
) const

#

◆ TransformationMatrix()

Matrix pcl::GraphicsContextBase::TransformationMatrix ( ) const

#

◆ Transformed() [1/3]

Array<DPoint> pcl::GraphicsContextBase::Transformed ( const Array< DPoint > &  a) const
inline

#

Definition at line 437 of file Graphics.h.

◆ Transformed() [2/3]

DPoint pcl::GraphicsContextBase::Transformed ( const DPoint p) const
inline

#

Definition at line 418 of file Graphics.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ Transformed() [3/3]

DRect pcl::GraphicsContextBase::Transformed ( const DRect r) const
inline

◆ TranslateTransformation() [1/2]

void pcl::GraphicsContextBase::TranslateTransformation ( double  d)
inline

#

Definition at line 381 of file Graphics.h.

◆ TranslateTransformation() [2/2]

void pcl::GraphicsContextBase::TranslateTransformation ( double  dx,
double  dy 
)

#


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