82 double blockWidth(
int blockIndex )
const;
87 double blockHeight(
int blockIndex )
const;
94 double firstLineCapHeight()
const;
106 double fragmentHorizontalAdvance(
int blockIndex,
int fragmentIndex,
Qgis::TextLayoutMode mode )
const;
114 double fragmentVerticalOffset(
int blockIndex,
int fragmentIndex,
Qgis::TextLayoutMode mode )
const;
121 double fragmentFixedHeight(
int blockIndex,
int fragmentIndex,
Qgis::TextLayoutMode mode )
const;
126 double verticalOrientationXOffset(
int blockIndex )
const;
131 double blockMaximumCharacterWidth(
int blockIndex )
const;
136 double blockMaximumDescent(
int blockIndex )
const;
141 QFont fragmentFont(
int blockIndex,
int fragmentIndex )
const;
150 bool mIsNullSize =
false;
152 QSizeF mDocumentSizeLabelMode;
153 QSizeF mDocumentSizePointRectMode;
154 QSizeF mDocumentSizeVerticalOrientation;
155 QSizeF mDocumentSizeCapHeightMode;
156 QSizeF mDocumentSizeAscentMode;
158 QRectF mOuterBoundsLabelMode;
160 QList < QList< QFont > > mFragmentFonts;
161 QList< double > mBlockWidths;
162 QList< double > mBlockHeights;
163 QList< double > mBaselineOffsetsLabelMode;
164 QList< double > mBaselineOffsetsPointMode;
165 QList< double > mBaselineOffsetsRectMode;
166 QList< double > mBaselineOffsetsCapHeightMode;
167 QList< double > mBaselineOffsetsAscentBased;
169 QList< QList< double > > mFragmentHorizontalAdvance;
170 QList< QList< double > > mFragmentFixedHeights;
172 QList< QList< double > > mFragmentVerticalOffsetsLabelMode;
173 QList< QList< double > > mFragmentVerticalOffsetsPointMode;
174 QList< QList< double > > mFragmentVerticalOffsetsRectMode;
176 QList< double > mVerticalOrientationXOffsets;
177 QList< double > mBlockMaxDescent;
178 QList< double > mBlockMaxCharacterWidth;
179 double mFirstLineAscentOffset = 0;
180 double mLastLineAscentOffset = 0;
181 double mFirstLineCapHeight = 0;
Contains information about the context of a rendering operation.
Contains pre-calculated metrics of a QgsTextDocument.
bool isNullFontSize() const
Returns true if the metrics could not be calculated because the text format has a null font size.
double ascentOffset() const
Returns the ascent offset of the first block in the document.
Represents a document consisting of one or more QgsTextBlock objects.