QGIS API Documentation
4.3.0-Master (9dce731a7a1)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
textrenderer
qgstextshadowsettings.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgstextshadowsettings.h
3
-----------------
4
begin : May 2020
5
copyright : (C) Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSTEXTSHADOWSETTINGS_H
17
#define QGSTEXTSHADOWSETTINGS_H
18
19
#include "
qgsmapunitscale.h
"
20
21
#include <QDomElement>
22
#include <QPainter>
23
#include <QSharedDataPointer>
24
25
class
QgsTextShadowSettingsPrivate;
26
class
QgsVectorLayer
;
27
class
QgsPropertyCollection
;
28
35
class
CORE_EXPORT
QgsTextShadowSettings
36
{
37
public
:
41
enum
ShadowPlacement
42
{
43
ShadowLowest
= 0,
44
ShadowText
,
45
ShadowBuffer
,
46
ShadowShape
47
};
48
49
QgsTextShadowSettings
();
50
QgsTextShadowSettings
(
const
QgsTextShadowSettings
&other );
51
SIP_SKIP
QgsTextShadowSettings
(
QgsTextShadowSettings
&&other );
52
53
QgsTextShadowSettings
&operator=(
const
QgsTextShadowSettings
&other );
54
QgsTextShadowSettings
&operator=(
QgsTextShadowSettings
&&other );
55
56
~QgsTextShadowSettings
();
57
58
bool
operator==
(
const
QgsTextShadowSettings
&other )
const
;
59
bool
operator!=
(
const
QgsTextShadowSettings
&other )
const
;
60
65
bool
enabled()
const
;
66
72
void
setEnabled(
bool
enabled );
73
80
QgsTextShadowSettings::ShadowPlacement
shadowPlacement()
const
;
81
89
void
setShadowPlacement(
QgsTextShadowSettings::ShadowPlacement
placement );
90
96
int
offsetAngle()
const
;
97
104
void
setOffsetAngle(
int
angle );
105
112
double
offsetDistance()
const
;
113
121
void
setOffsetDistance(
double
distance );
122
128
Qgis::RenderUnit
offsetUnit()
const
;
129
136
void
setOffsetUnit(
Qgis::RenderUnit
units );
137
144
QgsMapUnitScale
offsetMapUnitScale()
const
;
145
153
void
setOffsetMapUnitScale(
const
QgsMapUnitScale
&scale );
154
159
bool
offsetGlobal()
const
;
160
165
void
setOffsetGlobal(
bool
global );
166
172
double
blurRadius()
const
;
173
180
void
setBlurRadius(
double
blurRadius );
181
187
Qgis::RenderUnit
blurRadiusUnit()
const
;
188
195
void
setBlurRadiusUnit(
Qgis::RenderUnit
units );
196
203
QgsMapUnitScale
blurRadiusMapUnitScale()
const
;
204
212
void
setBlurRadiusMapUnitScale(
const
QgsMapUnitScale
&scale );
213
218
bool
blurAlphaOnly()
const
;
219
226
void
setBlurAlphaOnly(
bool
alphaOnly );
227
233
double
opacity()
const
;
234
241
void
setOpacity(
double
opacity );
242
247
int
scale()
const
;
248
254
void
setScale(
int
scale );
255
260
QColor color()
const
;
261
267
void
setColor(
const
QColor &color );
268
273
QPainter::CompositionMode blendMode()
const
;
274
280
void
setBlendMode( QPainter::CompositionMode mode );
281
286
void
readFromLayer(
QgsVectorLayer
*layer );
287
292
void
readXml(
const
QDomElement &elem );
293
298
QDomElement writeXml( QDomDocument &doc )
const
;
299
304
void
updateDataDefinedProperties(
QgsRenderContext
&context,
const
QgsPropertyCollection
&properties );
305
310
QSet<QString> referencedFields(
const
QgsRenderContext
&context )
const
;
311
312
private
:
313
QSharedDataPointer<QgsTextShadowSettingsPrivate> d;
314
};
315
316
#endif
// QGSTEXTSHADOWSETTINGS_H
Qgis::RenderUnit
RenderUnit
Rendering size units.
Definition
qgis.h:5770
QgsMapUnitScale
Struct for storing maximum and minimum scales for measurements in map units.
Definition
qgsmapunitscale.h:37
QgsPropertyCollection
A grouped map of multiple QgsProperty objects, each referenced by an integer key value.
Definition
qgspropertycollection.h:348
QgsRenderContext
Contains information about the context of a rendering operation.
Definition
qgsrendercontext.h:63
QgsTextShadowSettings
Container for settings relating to a text shadow.
Definition
qgstextshadowsettings.h:36
QgsTextShadowSettings::ShadowPlacement
ShadowPlacement
Placement positions for text shadow.
Definition
qgstextshadowsettings.h:42
QgsTextShadowSettings::ShadowBuffer
@ ShadowBuffer
Draw shadow under buffer.
Definition
qgstextshadowsettings.h:45
QgsTextShadowSettings::ShadowShape
@ ShadowShape
Draw shadow under background shape.
Definition
qgstextshadowsettings.h:46
QgsTextShadowSettings::ShadowLowest
@ ShadowLowest
Draw shadow below all text components.
Definition
qgstextshadowsettings.h:43
QgsTextShadowSettings::ShadowText
@ ShadowText
Draw shadow under text.
Definition
qgstextshadowsettings.h:44
QgsTextShadowSettings::QgsTextShadowSettings
QgsTextShadowSettings()
Definition
qgstextshadowsettings.cpp:31
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:138
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:427
operator!=
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition
qgsfeatureiterator.h:432
qgsmapunitscale.h
Generated on
for QGIS API Documentation by
1.17.0