Class: QgsTextBufferSettings¶
-
class
qgis.core.
QgsTextBufferSettings
¶ Bases:
sip.wrapper
QgsTextBufferSettings(other: QgsTextBufferSettings) Copy constructor.
- Parameters
other – source settings
Container for settings relating to a text buffer.
Note
QgsTextBufferSettings objects are implicitly shared.
New in version 3.0: Enums
Methods
Returns the blending mode used for drawing the buffer.
Returns the color of the buffer.
Returns whether the buffer is enabled.
Returns whether the interior of the buffer will be filled in.
Returns the buffer join style.
Returns the buffer opacity.
Returns the current paint effect for the buffer.
Reads settings from a layer’s custom properties (for QGIS 2.x projects).
Read settings from a DOM element.
Sets the blending mode used for drawing the buffer.
Sets the color for the buffer.
Sets whether the text buffer will be drawn.
Sets whether the interior of the buffer will be filled in.
Sets the join style used for drawing the buffer.
Sets the buffer opacity.
Sets the current paint
effect
for the buffer.Sets the size of the buffer.
Sets the map unit scale object for the buffer size.
Sets the units used for the buffer size.
Returns the size of the buffer.
Returns the map unit scale object for the buffer size.
Returns the units for the buffer size.
Write settings into a DOM element.
Signals
Attributes
-
blendMode
(self) → QPainter.CompositionMode¶ Returns the blending mode used for drawing the buffer.
See also
-
color
(self) → QColor¶ Returns the color of the buffer.
See also
-
enabled
(self) → bool¶ Returns whether the buffer is enabled.
See also
-
fillBufferInterior
(self) → bool¶ Returns whether the interior of the buffer will be filled in. If false, only the stroke of the text will be drawn as the buffer. The effect of this setting is only visible for semi-transparent text.
See also
-
joinStyle
(self) → Qt.PenJoinStyle¶ Returns the buffer join style.
See also
-
opacity
(self) → float¶ Returns the buffer opacity. The opacity is a double value between 0 (fully transparent) and 1 (totally opaque).
See also
-
paintEffect
(self) → QgsPaintEffect¶ Returns the current paint effect for the buffer.
- Returns
paint effect
See also
-
readFromLayer
(self, layer: QgsVectorLayer)¶ Reads settings from a layer’s custom properties (for QGIS 2.x projects).
- Parameters
layer – source vector layer
-
readXml
(self, elem: QDomElement)¶ Read settings from a DOM element.
See also
-
setBlendMode
(self, mode: QPainter.CompositionMode)¶ Sets the blending mode used for drawing the buffer.
- Parameters
mode – blending mode
See also
-
setColor
(self, color: Union[QColor, Qt.GlobalColor, QGradient])¶ Sets the color for the buffer.
- Parameters
color – buffer color
See also
-
setEnabled
(self, enabled: bool)¶ Sets whether the text buffer will be drawn.
- Parameters
enabled – set to true to draw buffer
See also
-
setFillBufferInterior
(self, fill: bool)¶ Sets whether the interior of the buffer will be filled in.
- Parameters
fill – set to false to drawn only the stroke of the text as the buffer, or true to also shade the area inside the text. The effect of this setting is only visible for semi-transparent text.
See also
-
setJoinStyle
(self, style: Qt.PenJoinStyle)¶ Sets the join style used for drawing the buffer.
- Parameters
style – join style
See also
-
setOpacity
(self, opacity: float)¶ Sets the buffer opacity.
- Parameters
opacity – opacity as a double value between 0 (fully transparent) and 1 (totally opaque)
See also
-
setPaintEffect
(self, effect: QgsPaintEffect)¶ Sets the current paint
effect
for the buffer.- Parameters
effect – paint effect. Ownership is transferred to the buffer settings.
See also
-
setSize
(self, size: float)¶ Sets the size of the buffer. The size units are specified using setSizeUnit().
- Parameters
size – buffer size
See also
See also
-
setSizeMapUnitScale
(self, scale: QgsMapUnitScale)¶ Sets the map unit scale object for the buffer size. This is only used if the buffer size is set to QgsUnitTypes.RenderMapUnit.
- Parameters
scale – scale for buffer size
See also
See also
-
setSizeUnit
(self, unit: QgsUnitTypes.RenderUnit)¶ Sets the units used for the buffer size.
- Parameters
unit – size unit
See also
See also
-
size
(self) → float¶ Returns the size of the buffer.
See also
See also
-
sizeMapUnitScale
(self) → QgsMapUnitScale¶ Returns the map unit scale object for the buffer size. This is only used if the buffer size is set to QgsUnitTypes.RenderMapUnit.
See also
See also
-
sizeUnit
(self) → QgsUnitTypes.RenderUnit¶ Returns the units for the buffer size.
See also
See also