QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Contains precalculated properties regarding text metrics for text to be renderered at a later stage. More...
#include <qgstextmetrics.h>
Public Member Functions | |
QgsPrecalculatedTextMetrics (const QStringList &graphemes, double characterHeight, const QVector< double > &characterWidths) | |
Constructor for QgsPrecalculatedTextMetrics. More... | |
double | characterHeight () const |
Character height (actually font metrics height, not individual character height). More... | |
double | characterWidth (int position) const |
Returns the width of the character at the specified position. More... | |
int | count () const |
Returns the total number of characters. More... | |
QString | grapheme (int index) const |
Returns the grapheme at the specified index. More... | |
QgsTextCharacterFormat | graphemeFormat (int index) const |
Returns the character format for the grapheme at the specified index. More... | |
int | graphemeFormatCount () const |
Returns the number of grapheme formats available. More... | |
QStringList | graphemes () const |
Returns the list of graphemes contained in the text. More... | |
void | setGraphemeFormats (const QVector< QgsTextCharacterFormat > &formats) |
Sets the character formats associated with the text graphemes(). More... | |
Contains precalculated properties regarding text metrics for text to be renderered at a later stage.
Definition at line 34 of file qgstextmetrics.h.
|
inline |
Constructor for QgsPrecalculatedTextMetrics.
graphemes | list of graphemes contained in the text |
characterHeight | height of characters |
characterWidths | vector of character widths |
Definition at line 44 of file qgstextmetrics.h.
|
inline |
Character height (actually font metrics height, not individual character height).
Definition at line 54 of file qgstextmetrics.h.
|
inline |
Returns the width of the character at the specified position.
Definition at line 64 of file qgstextmetrics.h.
|
inline |
Returns the total number of characters.
Definition at line 59 of file qgstextmetrics.h.
|
inline |
Returns the grapheme at the specified index.
Definition at line 74 of file qgstextmetrics.h.
|
inline |
Returns the character format for the grapheme at the specified index.
Definition at line 89 of file qgstextmetrics.h.
|
inline |
Returns the number of grapheme formats available.
Definition at line 84 of file qgstextmetrics.h.
|
inline |
Returns the list of graphemes contained in the text.
Definition at line 69 of file qgstextmetrics.h.
|
inline |
Sets the character formats associated with the text graphemes().
Definition at line 79 of file qgstextmetrics.h.