QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
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, const QVector< double > &characterWidths, const QVector< double > &characterHeights, const QVector< double > &characterDescents) | |
Constructor for QgsPrecalculatedTextMetrics. | |
double | characterDescent (int position) const |
Returns the descent of the character at the specified position. | |
double | characterHeight (int position) const |
Returns the character height of the character at the specified position (actually font metrics height, not individual character height). | |
double | characterWidth (int position) const |
Returns the width of the character at the specified position. | |
int | count () const |
Returns the total number of characters. | |
QString | grapheme (int index) const |
Returns the grapheme at the specified index. | |
QgsTextCharacterFormat | graphemeFormat (int index) const |
Returns the character format for the grapheme at the specified index. | |
int | graphemeFormatCount () const |
Returns the number of grapheme formats available. | |
QStringList | graphemes () const |
Returns the list of graphemes contained in the text. | |
double | maximumCharacterDescent () const |
Returns the maximum descent of any character found in the text. | |
double | maximumCharacterHeight () const |
Returns the maximum height of any character found in the text. | |
void | setGraphemeFormats (const QVector< QgsTextCharacterFormat > &formats) |
Sets the character formats associated with the text graphemes(). | |
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 |
characterWidths | vector of character widths |
characterHeights | height of characters |
characterDescents | descent of characters |
Definition at line 45 of file qgstextmetrics.h.
|
inline |
Returns the descent of the character at the specified position.
Definition at line 86 of file qgstextmetrics.h.
|
inline |
Returns the character height of the character at the specified position (actually font metrics height, not individual character height).
Definition at line 79 of file qgstextmetrics.h.
|
inline |
Returns the width of the character at the specified position.
Definition at line 72 of file qgstextmetrics.h.
|
inline |
Returns the total number of characters.
Definition at line 67 of file qgstextmetrics.h.
|
inline |
Returns the grapheme at the specified index.
Definition at line 110 of file qgstextmetrics.h.
|
inline |
Returns the character format for the grapheme at the specified index.
Definition at line 125 of file qgstextmetrics.h.
|
inline |
Returns the number of grapheme formats available.
Definition at line 120 of file qgstextmetrics.h.
|
inline |
Returns the list of graphemes contained in the text.
Definition at line 105 of file qgstextmetrics.h.
|
inline |
Returns the maximum descent of any character found in the text.
Definition at line 100 of file qgstextmetrics.h.
|
inline |
Returns the maximum height of any character found in the text.
Definition at line 93 of file qgstextmetrics.h.
|
inline |
Sets the character formats associated with the text graphemes().
Definition at line 115 of file qgstextmetrics.h.