You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[api] Move setting to control how text is rendered to QgsRenderContext
The new QgsRenderContext::TextRenderFormat enum controls how text
should be handled during a render operation, e.g. whether to render
text as outlines (paths) or keep it as real text objects.
Deprecate previous arguments in QgsTextRenderer which handled
this same use case.
This allows us to make the setting vary per-render, instead of
having a single global flag controlling the setting. Ultimately
this will allow us to have different behaviour within the
canvas renders vs print layout exports.
Refs #3975
Copy file name to clipboardExpand all lines: src/core/qgsrendercontext.h
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,16 @@ class CORE_EXPORT QgsRenderContext
75
75
};
76
76
Q_DECLARE_FLAGS( Flags, Flag )
77
77
78
+
/**
79
+
* Options for rendering text.
80
+
* \since QGIS 3.4.3
81
+
*/
82
+
enum TextRenderFormat
83
+
{
84
+
TextFormatAlwaysOutlines, //!< Always render text using path objects (AKA outlines/curves). This always results in the best quality rendering.
85
+
TextFormatAlwaysText, //!< Always render text as text objects. This may result in rendering artefacts or poor quality rendering, depending on the text format settings.
86
+
};
87
+
78
88
/**
79
89
* Set combination of flags that will be used for rendering.
80
90
* \since QGIS 2.14
@@ -386,6 +396,28 @@ class CORE_EXPORT QgsRenderContext
0 commit comments