|
Chemical Data Processing Library C++ API - Version 1.1.1
|
Go to the documentation of this file.
29 #ifndef CDPL_VIS_TEXTLABELPRIMITIVE2D_HPP
30 #define CDPL_VIS_TEXTLABELPRIMITIVE2D_HPP
134 #endif // CDPL_VIS_TEXTLABELPRIMITIVE2D_HPP
An interface that provides methods for low level 2D drawing operations.
Definition: Renderer2D.hpp:86
void render(Renderer2D &renderer) const
Visualizes the graphics primitive by means of the Renderer2D instance renderer.
std::shared_ptr< GraphicsPrimitive2D > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated GraphicsPrimitive2D instances.
Definition: GraphicsPrimitive2D.hpp:63
Definition of the class CDPL::Vis::Font.
const std::string & getText() const
Returns the text of the label.
void setText(const std::string &txt)
Sets the text of the label.
const Math::Vector2D & getPosition() const
Returns the position of the text label.
Specifies how to draw lines and outlines of shapes.
Definition: Pen.hpp:53
std::shared_ptr< TextLabelPrimitive2D > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated TextLabelPrimitive2D instances.
Definition: TextLabelPrimitive2D.hpp:57
void setPosition(const Math::Vector2D &pos)
Sets the position of the text label.
void setPosition(double x, double y)
Sets the position of the text label to (x, y).
Specifies a font for drawing text.
Definition: Font.hpp:54
Definition of the class CDPL::Vis::Pen.
#define CDPL_VIS_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the class CDPL::Vis::GraphicsPrimitive2D.
A graphics primitive representing a text label.
Definition: TextLabelPrimitive2D.hpp:51
const Font & getFont() const
Returns the font of the text label.
The namespace of the Chemical Data Processing Library.
The abstract base class of all 2D graphics primitives.
Definition: GraphicsPrimitive2D.hpp:57
TextLabelPrimitive2D()
Construct an empty text label primitive at position (0, 0).
Specifies an axis aligned rectangular area in 2D space.
Definition: Rectangle2D.hpp:51
CVector< double, 2 > Vector2D
A bounded 2 element vector holding floating point values of type double.
Definition: Vector.hpp:1632
GraphicsPrimitive2D::SharedPointer clone() const
Creates a dynamically allocated copy of the graphics primitive.
An interface class with methods that provide information about the metrics of a font.
Definition: FontMetrics.hpp:71
void getBounds(Rectangle2D &bounds, FontMetrics *font_metrics) const
Calculates the bounds of the graphics primitive.
void setPen(const Pen &pen)
Sets the pen defining the color of the text label.
Definition of vector data types.
const Pen & getPen() const
Returns the pen defining the color of the text label.
void setFont(const Font &font)
Sets the font of the text label.