94 Qgis::TextRendererFlags flags = Qgis::TextRendererFlags(),
119 static void drawDocument(
const QRectF &rect,
128 Qgis::TextRendererFlags flags = Qgis::TextRendererFlags() );
145 bool drawAsOutlines =
true );
159 static void drawTextOnLine(
const QPolygonF &line,
const QString &text,
161 double offsetAlongLine = 0,
double offsetFromLine = 0 );
175 static void drawDocumentOnLine(
const QPolygonF &line,
179 double offsetAlongLine = 0,
180 double offsetFromLine = 0 );
200 Q_DECL_DEPRECATED
static void drawPart(
const QRectF &rect,
double rotation,
Qgis::TextHorizontalAlignment alignment,
const QStringList &textLines,
222 Q_DECL_DEPRECATED
static void drawPart( QPointF origin,
double rotation,
Qgis::TextHorizontalAlignment alignment,
const QStringList &textLines,
248 QFontMetricsF *fontMetrics =
nullptr );
261 QFontMetricsF *fontMetrics =
nullptr, Qgis::TextRendererFlags flags = Qgis::TextRendererFlags(),
double maxLineWidth = 0 );
309 static constexpr double SUPERSCRIPT_SUBSCRIPT_FONT_SIZE_SCALING_FACTOR = 2.0 / 3.0;
322 int firstFragmentIndex = 0;
327 bool useOrigin =
false;
329 double rotation = 0.0;
331 double rotationOffset = 0.0;
345 double pictureBuffer = 0.0;
347 double dpiRatio = 1.0;
352 double extraWordSpacing = 0;
354 double extraLetterSpacing = 0;
404 const Component &component,
416 const Component &component,
420 const Component &component,
426 const Component &component,
432 const Component &component,
441 static void calculateExtraSpacingForLineJustification(
double spaceToDistribute,
const QgsTextBlock &block,
double &extraWordSpace,
double &extraLetterSpace );
442 static void applyExtraSpacingForLineJustification( QFont &font,
double extraWordSpace,
double extraLetterSpace );
448 const Component &component,
460 const Component &component,
471 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 ...