93 Qgis::TextRendererFlags flags = Qgis::TextRendererFlags(),
118 static void drawDocument(
const QRectF &rect,
127 Qgis::TextRendererFlags flags = Qgis::TextRendererFlags() );
144 bool drawAsOutlines =
true );
158 static void drawTextOnLine(
const QPolygonF &line,
const QString &text,
160 double offsetAlongLine = 0,
double offsetFromLine = 0 );
174 static void drawDocumentOnLine(
const QPolygonF &line,
178 double offsetAlongLine = 0,
179 double offsetFromLine = 0 );
199 Q_DECL_DEPRECATED
static void drawPart(
const QRectF &rect,
double rotation,
Qgis::TextHorizontalAlignment alignment,
const QStringList &textLines,
221 Q_DECL_DEPRECATED
static void drawPart( QPointF origin,
double rotation,
Qgis::TextHorizontalAlignment alignment,
const QStringList &textLines,
247 QFontMetricsF *fontMetrics =
nullptr );
260 QFontMetricsF *fontMetrics =
nullptr, Qgis::TextRendererFlags flags = Qgis::TextRendererFlags(),
double maxLineWidth = 0 );
308 static constexpr double SUPERSCRIPT_SUBSCRIPT_FONT_SIZE_SCALING_FACTOR = 2.0 / 3.0;
321 int firstFragmentIndex = 0;
326 bool useOrigin =
false;
328 double rotation = 0.0;
330 double rotationOffset = 0.0;
344 double pictureBuffer = 0.0;
346 double dpiRatio = 1.0;
351 double extraWordSpacing = 0;
353 double extraLetterSpacing = 0;
403 const Component &component,
415 const Component &component,
419 const Component &component,
425 const Component &component,
431 const Component &component,
440 static void calculateExtraSpacingForLineJustification(
double spaceToDistribute,
const QgsTextBlock &block,
double &extraWordSpace,
double &extraLetterSpace );
441 static void applyExtraSpacingForLineJustification( QFont &font,
double extraWordSpace,
double extraLetterSpace );
447 const Component &component,
459 const Component &component,
470 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 ...