Chemical Data Processing Library C++ API - Version 1.2.0
Public Types | Public Member Functions | List of all members
CDPL::Vis::LineSegmentListPrimitive2D Class Reference

A graphics primitive representing a list of disjoint line segments. More...

#include <LineSegmentListPrimitive2D.hpp>

+ Inheritance diagram for CDPL::Vis::LineSegmentListPrimitive2D:

Public Types

typedef std::shared_ptr< LineSegmentListPrimitive2DSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated LineSegmentListPrimitive2D instances. More...
 
- Public Types inherited from CDPL::Vis::PointArray2D
typedef std::shared_ptr< PointArray2DSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated PointArray2D instances. More...
 
- Public Types inherited from CDPL::Vis::GraphicsPrimitive2D
typedef std::shared_ptr< GraphicsPrimitive2DSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated GraphicsPrimitive2D instances. More...
 

Public Member Functions

 LineSegmentListPrimitive2D ()
 Constructs an empty line segment list 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 and cap style of the line segments. More...
 
const PengetPen () const
 Returns the pen defining the color, width, line style and cap style of the line segments. More...
 
GraphicsPrimitive2D::SharedPointer clone () const
 Creates a dynamically allocated copy of the graphics primitive. More...
 
void getBounds (Rectangle2D &bounds, FontMetrics *font_mtrics=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...
 

Detailed Description

A graphics primitive representing a list of disjoint line segments.

Member Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated LineSegmentListPrimitive2D instances.

Constructor & Destructor Documentation

◆ LineSegmentListPrimitive2D()

CDPL::Vis::LineSegmentListPrimitive2D::LineSegmentListPrimitive2D ( )
inline

Constructs an empty line segment list primitive.

Member Function Documentation

◆ render()

void CDPL::Vis::LineSegmentListPrimitive2D::render ( Renderer2D renderer) const
virtual

Visualizes the graphics primitive by means of the Renderer2D instance renderer.

Parameters
rendererThe renderer that performs the drawing operations.

Implements CDPL::Vis::GraphicsPrimitive2D.

◆ setPen()

void CDPL::Vis::LineSegmentListPrimitive2D::setPen ( const Pen pen)

Sets the pen defining the color, width, line style and cap style of the line segments.

Parameters
penThe pen defining the color, width, line style and cap style of the line segments.

◆ getPen()

const Pen& CDPL::Vis::LineSegmentListPrimitive2D::getPen ( ) const

Returns the pen defining the color, width, line style and cap style of the line segments.

Returns
The pen defining the color, width, line style and cap style of the line segments.

◆ clone()

GraphicsPrimitive2D::SharedPointer CDPL::Vis::LineSegmentListPrimitive2D::clone ( ) const
virtual

Creates a dynamically allocated copy of the graphics primitive.

Returns
The copy of the graphics primitive.

Implements CDPL::Vis::GraphicsPrimitive2D.

◆ getBounds()

void CDPL::Vis::LineSegmentListPrimitive2D::getBounds ( Rectangle2D bounds,
FontMetrics font_metrics = 0 
) const
virtual

Calculates the bounds of the graphics primitive.

Parameters
boundsThe object storing the calculated bounding box.
font_metricsThe font metrics object to use for bounds calculation (if required).

Implements CDPL::Vis::GraphicsPrimitive2D.


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