118 static void drawDocument(
const QRectF &rect,
144 bool drawAsOutlines =
true );
165 static void drawDocument( QPointF point,
185 static void drawTextOnLine(
const QPolygonF &line,
const QString &text,
187 double offsetAlongLine = 0,
double offsetFromLine = 0 );
201 static void drawDocumentOnLine(
const QPolygonF &line,
205 double offsetAlongLine = 0,
206 double offsetFromLine = 0 );
226 Q_DECL_DEPRECATED
static void drawPart(
const QRectF &rect,
double rotation,
Qgis::TextHorizontalAlignment alignment,
const QStringList &textLines,
248 Q_DECL_DEPRECATED
static void drawPart( QPointF origin,
double rotation,
Qgis::TextHorizontalAlignment alignment,
const QStringList &textLines,
274 QFontMetricsF *fontMetrics =
nullptr );
347 static constexpr double SUPERSCRIPT_SUBSCRIPT_FONT_SIZE_SCALING_FACTOR = 2.0 / 3.0;
360 int firstFragmentIndex = 0;
365 bool useOrigin =
false;
367 double rotation = 0.0;
369 double rotationOffset = 0.0;
383 double pictureBuffer = 0.0;
385 double dpiRatio = 1.0;
390 double extraWordSpacing = 0;
392 double extraLetterSpacing = 0;
442 const Component &component,
454 const Component &component,
458 const Component &component,
464 const Component &component,
470 const Component &component,
479 static void calculateExtraSpacingForLineJustification(
double spaceToDistribute,
const QgsTextBlock &block,
double &extraWordSpace,
double &extraLetterSpace );
480 static void applyExtraSpacingForLineJustification( QFont &font,
double extraWordSpace,
double extraLetterSpace );
486 const Component &component,
498 const Component &component,
506 static void renderBlockHorizontal(
const QgsTextBlock &block,
int blockIndex,
509 QPainter *painter,
bool usePaths,
510 double fontScale,
double extraWordSpace,
double extraLetterSpace,
514 friend class QgsLabelPreview;
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.
Represents a document consisting of one or more QgsTextBlock objects.
Handles rendering text using rich formatting options, including drop shadows, buffers and background ...