151 double blockWidth(
int blockIndex )
const;
156 double blockHeight(
int blockIndex )
const;
163 double firstLineCapHeight()
const;
175 double fragmentHorizontalAdvance(
int blockIndex,
int fragmentIndex,
Qgis::TextLayoutMode mode )
const;
183 double fragmentVerticalOffset(
int blockIndex,
int fragmentIndex,
Qgis::TextLayoutMode mode )
const;
190 double fragmentFixedHeight(
int blockIndex,
int fragmentIndex,
Qgis::TextLayoutMode mode )
const;
195 double verticalOrientationXOffset(
int blockIndex )
const;
200 double blockMaximumCharacterWidth(
int blockIndex )
const;
205 double blockMaximumDescent(
int blockIndex )
const;
210 QFont fragmentFont(
int blockIndex,
int fragmentIndex )
const;
221 bool mIsNullSize =
false;
223 QSizeF mDocumentSizeLabelMode;
224 QSizeF mDocumentSizePointRectMode;
225 QSizeF mDocumentSizeVerticalOrientation;
226 QSizeF mDocumentSizeCapHeightMode;
227 QSizeF mDocumentSizeAscentMode;
229 QRectF mOuterBoundsLabelMode;
231 QList < QList< QFont > > mFragmentFonts;
232 QList< double > mBlockWidths;
233 QList< double > mBlockHeights;
234 QList< double > mBaselineOffsetsLabelMode;
235 QList< double > mBaselineOffsetsPointMode;
236 QList< double > mBaselineOffsetsRectMode;
237 QList< double > mBaselineOffsetsCapHeightMode;
238 QList< double > mBaselineOffsetsAscentBased;
240 QList< QList< double > > mFragmentHorizontalAdvance;
241 QList< QList< double > > mFragmentFixedHeights;
243 QList< QList< double > > mFragmentVerticalOffsetsLabelMode;
244 QList< QList< double > > mFragmentVerticalOffsetsPointMode;
245 QList< QList< double > > mFragmentVerticalOffsetsRectMode;
247 QList< double > mVerticalOrientationXOffsets;
248 QList< double > mBlockMaxDescent;
249 QList< double > mBlockMaxCharacterWidth;
250 double mFirstLineAscentOffset = 0;
251 double mLastLineAscentOffset = 0;
252 double mFirstLineCapHeight = 0;
Contains information about the context of a rendering operation.
Represents a block of text consisting of one or more QgsTextFragment objects.
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.
const QgsTextDocument & document() const
Returns the document associated with the calculated metrics.
double ascentOffset() const
Returns the ascent offset of the first block in the document.
Encapsulates the context in which a text document is to be rendered.
void setFlags(Qgis::TextRendererFlags flags)
Sets associated text renderer flags.
Qgis::TextRendererFlags flags() const
Returns associated text renderer flags.
void setMaximumWidth(double width)
Sets the maximum width (in painter units) for rendered text.
double maximumWidth() const
Returns the maximum width (in painter units) for rendered text.
Represents a document consisting of one or more QgsTextBlock objects.
Stores a fragment of document along with formatting overrides to be used when rendering the fragment.