|
Chemical Data Processing Library C++ API - Version 1.1.1
|
Go to the documentation of this file.
29 #ifndef CDPL_VIS_FONTMETRICS_HPP
30 #define CDPL_VIS_FONTMETRICS_HPP
139 virtual double getWidth(
const std::string& str)
const = 0;
180 #endif // CDPL_VIS_FONTMETRICS_HPP
virtual double getWidth(const std::string &str) const =0
Returns the total advance width for the characters in the string str.
Specifies a font for drawing text.
Definition: Font.hpp:54
virtual void getBounds(char ch, Rectangle2D &bounds) const =0
Returns the bounding rectangle of the character ch relative to the left-most point on the baseline.
virtual double getHeight() const =0
Returns the height of the font.
virtual void getBounds(const std::string &str, Rectangle2D &bounds) const =0
Returns the total bounding rectangle for the characters in the string str.
#define CDPL_VIS_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
virtual double getDescent() const =0
Returns the descent of the font.
virtual ~FontMetrics()
Virtual destructor.
Definition: FontMetrics.hpp:77
virtual double getAscent() const =0
Returns the ascent of the font.
virtual double getLeading() const =0
Returns the leading of the font.
virtual void setFont(const Font &font)=0
Specifies the font for which to obtain the metrics.
The namespace of the Chemical Data Processing Library.
Specifies an axis aligned rectangular area in 2D space.
Definition: Rectangle2D.hpp:51
An interface class with methods that provide information about the metrics of a font.
Definition: FontMetrics.hpp:71
virtual double getWidth(char ch) const =0
Returns the advance width for the character ch.
Definition of the preprocessor macro CDPL_VIS_API.