|
Chemical Data Processing Library C++ API - Version 1.1.1
|
Go to the documentation of this file.
29 #ifndef CDPL_VIS_CAIROFONTMETRICS_HPP
30 #define CDPL_VIS_CAIROFONTMETRICS_HPP
91 std::unique_ptr<CairoExtents> cairoExtents;
96 #endif // CDPL_VIS_CAIROFONTMETRICS_HPP
void getBounds(const std::string &str, Rectangle2D &bounds) const
Returns the total bounding rectangle for the characters in the string str.
CairoFontMetrics(const CairoPointer< cairo_t > &cairo_ctxt)
Constructs a font metrics object that operates on the Cairo drawing context specified by cairo_ctxt.
void getBounds(char ch, Rectangle2D &bounds) const
Returns the bounding rectangle of the character ch relative to the left-most point on the baseline.
double getWidth(char ch) const
Returns the advance width for the character ch.
Specifies a font for drawing text.
Definition: Font.hpp:54
Definition of the class CDPL::Vis::FontMetrics.
#define CDPL_VIS_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
struct _cairo _cairo_t
Definition: CairoFontMetrics.hpp:39
double getAscent() const
Returns the ascent of the font.
The namespace of the Chemical Data Processing Library.
Specifies an axis aligned rectangular area in 2D space.
Definition: Rectangle2D.hpp:51
double getDescent() const
Returns the descent of the font.
Implements the FontMetrics interface for the Cairo rendering backend.
Definition: CairoFontMetrics.hpp:54
double getHeight() const
Returns the height of the font.
An interface class with methods that provide information about the metrics of a font.
Definition: FontMetrics.hpp:71
Definition of the preprocessor macro CDPL_VIS_API.
~CairoFontMetrics()
Destructor.
Definition of the class CDPL::Vis::CairoPointer.
double getWidth(const std::string &str) const
Returns the total advance width for the characters in the string str.
void setFont(const Font &font)
Specifies the font for which to obtain the metrics.
double getLeading() const
Returns the leading of the font.