17 #ifndef QGSTEXTRENDERER_PRIVATE_H 18 #define QGSTEXTRENDERER_PRIVATE_H 22 #include "qgis_core.h" 28 #include <QSharedData> 43 class QgsTextBufferSettingsPrivate :
public QSharedData
47 QgsTextBufferSettingsPrivate()
52 QgsTextBufferSettingsPrivate(
const QgsTextBufferSettingsPrivate &other )
53 : QSharedData( other )
54 , enabled( other.enabled )
56 , sizeUnit( other.sizeUnit )
57 , sizeMapUnitScale( other.sizeMapUnitScale )
58 , color( other.color )
59 , opacity( other.opacity )
60 , fillBufferInterior( other.fillBufferInterior )
61 , joinStyle( other.joinStyle )
62 , blendMode( other.blendMode )
63 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
73 bool fillBufferInterior =
false;
74 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
75 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
76 std::unique_ptr< QgsPaintEffect > paintEffect;
80 class QgsTextBackgroundSettingsPrivate :
public QSharedData
84 QgsTextBackgroundSettingsPrivate()
85 : size( QSizeF( 0.0, 0.0 ) )
86 , offset( QPointF( 0.0, 0.0 ) )
87 , radii( QSizeF( 0.0, 0.0 ) )
88 , fillColor( Qt::white )
89 , strokeColor( Qt::darkGray )
93 QgsTextBackgroundSettingsPrivate(
const QgsTextBackgroundSettingsPrivate &other )
94 : QSharedData( other )
95 , enabled( other.enabled )
97 , svgFile( other.svgFile )
98 , sizeType( other.sizeType )
100 , sizeUnits( other.sizeUnits )
101 , sizeMapUnitScale( other.sizeMapUnitScale )
102 , rotationType( other.rotationType )
103 , rotation( other.rotation )
104 , offset( other.offset )
105 , offsetUnits( other.offsetUnits )
106 , offsetMapUnitScale( other.offsetMapUnitScale )
107 , radii( other.radii )
108 , radiiUnits( other.radiiUnits )
109 , radiiMapUnitScale( other.radiiMapUnitScale )
110 , blendMode( other.blendMode )
111 , fillColor( other.fillColor )
112 , strokeColor( other.strokeColor )
113 , opacity( other.opacity )
114 , strokeWidth( other.strokeWidth )
115 , strokeWidthUnits( other.strokeWidthUnits )
116 , strokeWidthMapUnitScale( other.strokeWidthMapUnitScale )
117 , joinStyle( other.joinStyle )
118 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
119 , markerSymbol( other.markerSymbol ? other.markerSymbol->clone() : nullptr )
123 bool enabled =
false;
131 double rotation = 0.0;
138 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
141 double opacity = 1.0;
142 double strokeWidth = 0.0;
145 Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
146 std::unique_ptr< QgsPaintEffect > paintEffect;
147 std::unique_ptr< QgsMarkerSymbol > markerSymbol;
152 class QgsTextShadowSettingsPrivate :
public QSharedData
156 QgsTextShadowSettingsPrivate()
157 : color( QColor( 0, 0, 0 ) )
162 QgsTextShadowSettingsPrivate(
const QgsTextShadowSettingsPrivate &other )
163 : QSharedData( other )
164 , enabled( other.enabled )
165 , shadowUnder( other.shadowUnder )
166 , offsetAngle( other.offsetAngle )
167 , offsetDist( other.offsetDist )
168 , offsetUnits( other.offsetUnits )
169 , offsetMapUnitScale( other.offsetMapUnitScale )
170 , offsetGlobal( other.offsetGlobal )
171 , radius( other.radius )
172 , radiusUnits( other.radiusUnits )
173 , radiusMapUnitScale( other.radiusMapUnitScale )
174 , radiusAlphaOnly( other.radiusAlphaOnly )
175 , scale( other.scale )
176 , color( other.color )
177 , opacity( other.opacity )
178 , blendMode( other.blendMode )
182 bool enabled =
false;
184 int offsetAngle = 135;
185 double offsetDist = 1.0;
188 bool offsetGlobal =
true;
192 bool radiusAlphaOnly =
false;
195 double opacity = 0.7;
196 QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;
200 class QgsTextSettingsPrivate :
public QSharedData
204 QgsTextSettingsPrivate()
205 : textColor( Qt::black )
209 QgsTextSettingsPrivate(
const QgsTextSettingsPrivate &other )
210 : QSharedData( other )
211 , textFont( other.textFont )
212 , textNamedStyle( other.textNamedStyle )
213 , fontSizeUnits( other.fontSizeUnits )
214 , fontSizeMapUnitScale( other.fontSizeMapUnitScale )
215 , fontSize( other.fontSize )
216 , textColor( other.textColor )
217 , opacity( other.opacity )
218 , blendMode( other.blendMode )
219 , multilineHeight( other.multilineHeight )
220 , orientation( other.orientation )
221 , previewBackgroundColor( other.previewBackgroundColor )
222 , mDataDefinedProperties( other.mDataDefinedProperties )
227 QString textNamedStyle;
230 double fontSize = 10 ;
232 double opacity = 1.0;
233 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
234 double multilineHeight = 1.0 ;
236 QColor previewBackgroundColor = Qt::white;
250 #endif // QGSTEXTRENDERER_PRIVATE_H TextOrientation
Text orientation.
Shape size is determined by adding a buffer margin around text.
RotationType
Methods for determining the rotation of the background shape.
ShadowPlacement
Placement positions for text shadow.
Vertically oriented text.
SizeType
Methods for determining the background shape size.
Draw shadow below all text components.
ShapeType
Background shape types.
Points (e.g., for font sizes)
Struct for storing maximum and minimum scales for measurements in map units.
Shape rotation is synced with text rotation.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
RenderUnit
Rendering size units.