Chemical Data Processing Library C++ API - Version 1.1.1
|
A graphics primitive representing a polygon. More...
#include <PolygonPrimitive2D.hpp>
Public Types | |
typedef std::shared_ptr< PolygonPrimitive2D > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated PolygonPrimitive2D instances. More... | |
Public Types inherited from CDPL::Vis::GraphicsPrimitive2D | |
typedef std::shared_ptr< GraphicsPrimitive2D > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated GraphicsPrimitive2D instances. More... | |
Public Member Functions | |
PolygonPrimitive2D () | |
Constructs an undefined polygon primitive. More... | |
void | render (Renderer2D &renderer) const |
Visualizes the graphics primitive by means of the Renderer2D instance renderer. More... | |
void | setPen (const Pen &pen) |
Sets the pen defining the color, width, line style, cap style and join style of the polygon outline. More... | |
const Pen & | getPen () const |
Returns the pen defining the color, width, line style, cap style and join style of the polygon outline. More... | |
void | setBrush (const Brush &brush) |
Sets the brush defining the fill color and fill pattern. More... | |
const Brush & | getBrush () const |
Returns the brush defining the fill color and fill pattern. More... | |
GraphicsPrimitive2D::SharedPointer | clone () const |
Creates a dynamically allocated copy of the graphics primitive. More... | |
void | getBounds (Rectangle2D &bounds, FontMetrics *font_metrics=0) const |
Calculates the bounds of the graphics primitive. More... | |
Public Member Functions inherited from CDPL::Vis::PointArray2D | |
void | translate (const Math::Vector2D &vec) |
Translates all points by vec. More... | |
void | getBounds (Rectangle2D &bounds) const |
Public Member Functions inherited from CDPL::Vis::GraphicsPrimitive2D | |
virtual | ~GraphicsPrimitive2D () |
Virtual destructor. More... | |
A graphics primitive representing a polygon.
typedef std::shared_ptr<PolygonPrimitive2D> CDPL::Vis::PolygonPrimitive2D::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated PolygonPrimitive2D
instances.
|
inline |
Constructs an undefined polygon primitive.
|
virtual |
Visualizes the graphics primitive by means of the Renderer2D instance renderer.
renderer | The renderer that performs the drawing operations. |
Implements CDPL::Vis::GraphicsPrimitive2D.
void CDPL::Vis::PolygonPrimitive2D::setPen | ( | const Pen & | pen | ) |
Sets the pen defining the color, width, line style, cap style and join style of the polygon outline.
pen | The pen defining the color, width, line style, cap style and join style of the polygon outline. |
const Pen& CDPL::Vis::PolygonPrimitive2D::getPen | ( | ) | const |
Returns the pen defining the color, width, line style, cap style and join style of the polygon outline.
void CDPL::Vis::PolygonPrimitive2D::setBrush | ( | const Brush & | brush | ) |
Sets the brush defining the fill color and fill pattern.
brush | The brush defining the fill color and fill pattern. |
const Brush& CDPL::Vis::PolygonPrimitive2D::getBrush | ( | ) | const |
Returns the brush defining the fill color and fill pattern.
|
virtual |
Creates a dynamically allocated copy of the graphics primitive.
Implements CDPL::Vis::GraphicsPrimitive2D.
|
virtual |
Calculates the bounds of the graphics primitive.
bounds | The object storing the calculated bounding box. |
font_metrics | The font metrics object to use for bounds calculation (if required). |
Implements CDPL::Vis::GraphicsPrimitive2D.