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 )
67 ~QgsTextBufferSettingsPrivate()
78 bool fillBufferInterior =
false;
79 Qt::PenJoinStyle joinStyle = Qt::RoundJoin;
80 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
85 class QgsTextBackgroundSettingsPrivate :
public QSharedData
89 QgsTextBackgroundSettingsPrivate()
90 : size( QSizeF( 0.0, 0.0 ) )
91 , offset( QPointF( 0.0, 0.0 ) )
92 , radii( QSizeF( 0.0, 0.0 ) )
93 , fillColor( Qt::white )
94 , strokeColor( Qt::darkGray )
98 QgsTextBackgroundSettingsPrivate(
const QgsTextBackgroundSettingsPrivate &other )
99 : QSharedData( other )
100 , enabled( other.enabled )
102 , svgFile( other.svgFile )
103 , sizeType( other.sizeType )
105 , sizeUnits( other.sizeUnits )
106 , sizeMapUnitScale( other.sizeMapUnitScale )
107 , rotationType( other.rotationType )
108 , rotation( other.rotation )
109 , offset( other.offset )
110 , offsetUnits( other.offsetUnits )
111 , offsetMapUnitScale( other.offsetMapUnitScale )
112 , radii( other.radii )
113 , radiiUnits( other.radiiUnits )
114 , radiiMapUnitScale( other.radiiMapUnitScale )
115 , blendMode( other.blendMode )
116 , fillColor( other.fillColor )
117 , strokeColor( other.strokeColor )
118 , opacity( other.opacity )
119 , strokeWidth( other.strokeWidth )
120 , strokeWidthUnits( other.strokeWidthUnits )
121 , strokeWidthMapUnitScale( other.strokeWidthMapUnitScale )
122 , joinStyle( other.joinStyle )
123 , paintEffect( other.paintEffect ? other.paintEffect->clone() : nullptr )
127 ~QgsTextBackgroundSettingsPrivate()
132 bool enabled =
false;
140 double rotation = 0.0;
147 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
150 double opacity = 1.0;
151 double strokeWidth = 0.0;
154 Qt::PenJoinStyle joinStyle = Qt::BevelJoin;
160 class QgsTextShadowSettingsPrivate :
public QSharedData
164 QgsTextShadowSettingsPrivate()
165 : color( QColor( 0, 0, 0 ) )
170 QgsTextShadowSettingsPrivate(
const QgsTextShadowSettingsPrivate &other )
171 : QSharedData( other )
172 , enabled( other.enabled )
173 , shadowUnder( other.shadowUnder )
174 , offsetAngle( other.offsetAngle )
175 , offsetDist( other.offsetDist )
176 , offsetUnits( other.offsetUnits )
177 , offsetMapUnitScale( other.offsetMapUnitScale )
178 , offsetGlobal( other.offsetGlobal )
179 , radius( other.radius )
180 , radiusUnits( other.radiusUnits )
181 , radiusMapUnitScale( other.radiusMapUnitScale )
182 , radiusAlphaOnly( other.radiusAlphaOnly )
183 , scale( other.scale )
184 , color( other.color )
185 , opacity( other.opacity )
186 , blendMode( other.blendMode )
190 bool enabled =
false;
192 int offsetAngle = 135;
193 double offsetDist = 1.0;
196 bool offsetGlobal =
true;
200 bool radiusAlphaOnly =
false;
203 double opacity = 0.7;
204 QPainter::CompositionMode blendMode = QPainter::CompositionMode_Multiply;
208 class QgsTextSettingsPrivate :
public QSharedData
212 QgsTextSettingsPrivate()
213 : textColor( Qt::black )
217 QgsTextSettingsPrivate(
const QgsTextSettingsPrivate &other )
218 : QSharedData( other )
219 , textFont( other.textFont )
220 , textNamedStyle( other.textNamedStyle )
221 , fontSizeUnits( other.fontSizeUnits )
222 , fontSizeMapUnitScale( other.fontSizeMapUnitScale )
223 , fontSize( other.fontSize )
224 , textColor( other.textColor )
225 , opacity( other.opacity )
226 , blendMode( other.blendMode )
227 , multilineHeight( other.multilineHeight )
232 QString textNamedStyle;
235 double fontSize = 10 ;
237 double opacity = 1.0;
238 QPainter::CompositionMode blendMode = QPainter::CompositionMode_SourceOver;
239 double multilineHeight = 1.0 ;
249 #endif // QGSTEXTRENDERER_PRIVATE_H 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.
Base class for visual effects which can be applied to QPicture drawings.
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.
RenderUnit
Rendering size units.