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;
228 double blockVerticalMargin(
int blockIndex )
const;
238 double blockLeftMargin(
int blockIndex )
const;
248 double blockRightMargin(
int blockIndex )
const;
254 bool mIsNullSize =
false;
256 QSizeF mDocumentSizeLabelMode;
257 QSizeF mDocumentSizePointRectMode;
258 QSizeF mDocumentSizeVerticalOrientation;
259 QSizeF mDocumentSizeCapHeightMode;
260 QSizeF mDocumentSizeAscentMode;
262 QRectF mOuterBoundsLabelMode;
264 QList < QList< QFont > > mFragmentFonts;
265 QList< double > mBlockWidths;
266 QList< double > mBlockHeights;
267 QList< double > mBaselineOffsetsLabelMode;
268 QList< double > mBaselineOffsetsPointMode;
269 QList< double > mBaselineOffsetsRectMode;
270 QList< double > mBaselineOffsetsCapHeightMode;
271 QList< double > mBaselineOffsetsAscentBased;
273 QList< QList< double > > mFragmentHorizontalAdvance;
274 QList< QList< double > > mFragmentFixedHeights;
276 QList< QList< double > > mFragmentVerticalOffsetsLabelMode;
277 QList< QList< double > > mFragmentVerticalOffsetsPointMode;
278 QList< QList< double > > mFragmentVerticalOffsetsRectMode;
280 QList< double > mVerticalOrientationXOffsets;
281 QList< double > mBlockMaxDescent;
282 QList< double > mBlockMaxCharacterWidth;
283 double mFirstLineAscentOffset = 0;
284 double mLastLineAscentOffset = 0;
285 double mFirstLineCapHeight = 0;
287 QVector< double > mVerticalMarginsBetweenBlocks;
288 QVector< double > mLeftBlockMargins;
289 QVector< double > mRightBlockMargins;
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.