Class: QgsBalloonCallout¶
A cartoon talking bubble callout style.
Added in version 3.20.
Class Hierarchy¶
Base classes¶
Abstract base class for callout renderers. |
Methods
Returns the corner radius of the balloon shapes. |
|
Returns the map unit scale for the corner radius. |
|
Returns the units for the corner radius. |
|
Returns the fill symbol used to render the callout. |
|
Returns the margins between the outside of the callout frame and the label's bounding rectangle. |
|
Returns the units for the margins between the outside of the callout frame and the label's bounding rectangle. |
|
Returns the marker symbol used to render the callout endpoint. |
|
Returns the offset distance from the anchor point at which to start the line. |
|
Returns the map unit scale for the offset from anchor. |
|
Returns the units for the offset from anchor point. |
|
Sets the radius of the corners for the balloon shapes. |
|
Sets the map unit scale for the corner radius. |
|
Sets the unit for the corner radius. |
|
Sets the fill symbol used to render the callout. |
|
Sets the margins between the outside of the callout frame and the label's bounding rectangle. |
|
Sets the unit for the margins between the outside of the callout frame and the label's bounding rectangle. |
|
Sets the marker symbol used to render the callout endpoint. |
|
Sets the offset distance from the anchor point at which to start the line. |
|
Sets the map unit scale for the offset from anchor. |
|
Sets the unit for the offset from anchor distance. |
|
Sets the width of the wedge shape at the side it connects with the label. |
|
Sets the map unit scale for the wedge width. |
|
Sets the unit for the wedge width. |
|
Returns the width of the wedge shape at the side it connects with the label. |
|
Returns the map unit scale for the wedge width. |
|
Returns the units for the wedge width. |
Static Methods
Creates a new |
- class qgis.core.QgsBalloonCallout[source]¶
Bases:
QgsCallout
- cornerRadius(self) float [source]¶
Returns the corner radius of the balloon shapes.
Units are specified through
wedgeWidthUnit()
.See also
See also
- Return type:
float
- cornerRadiusMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the corner radius.
See also
See also
See also
- Return type:
- cornerRadiusUnit(self) Qgis.RenderUnit [source]¶
Returns the units for the corner radius.
See also
See also
- Return type:
- static create(properties: Dict[str, Any] = {}, context: QgsReadWriteContext = QgsReadWriteContext()) QgsCallout | None [source]¶
Creates a new
QgsBalloonCallout
, using the settings serialized in theproperties
map (corresponding to the output fromQgsBalloonCallout.properties()
).- Parameters:
properties (Dict[str, Any] = {})
context (
QgsReadWriteContext
= QgsReadWriteContext())
- Return type:
Optional[QgsCallout]
- fillSymbol(self) QgsFillSymbol | None [source]¶
Returns the fill symbol used to render the callout.
Ownership is not transferred.
See also
- Return type:
Optional[QgsFillSymbol]
- margins(self) QgsMargins ¶
Returns the margins between the outside of the callout frame and the label’s bounding rectangle.
Units are retrieved via
marginsUnit()
Note
Negative margins are acceptable.
See also
See also
- Return type:
- marginsUnit(self) Qgis.RenderUnit [source]¶
Returns the units for the margins between the outside of the callout frame and the label’s bounding rectangle.
See also
See also
- Return type:
- markerSymbol(self) QgsMarkerSymbol | None [source]¶
Returns the marker symbol used to render the callout endpoint.
May be
None
, if no endpoint marker will be used.The marker will always be rendered below the fill symbol for the callout.
Ownership is not transferred.
See also
Added in version 3.40.
- Return type:
Optional[QgsMarkerSymbol]
- offsetFromAnchor(self) float [source]¶
Returns the offset distance from the anchor point at which to start the line. Units are specified through
offsetFromAnchorUnit()
.See also
See also
- Return type:
float
- offsetFromAnchorMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the offset from anchor.
See also
See also
See also
- Return type:
- offsetFromAnchorUnit(self) Qgis.RenderUnit [source]¶
Returns the units for the offset from anchor point.
See also
See also
- Return type:
- setCornerRadius(self, radius: float)[source]¶
Sets the
radius
of the corners for the balloon shapes.Units are specified through
setCornerRadiusUnit()
.See also
See also
- Parameters:
radius (float)
- setCornerRadiusMapUnitScale(self, scale: QgsMapUnitScale)[source]¶
Sets the map unit
scale
for the corner radius.See also
See also
See also
- Parameters:
scale (QgsMapUnitScale)
- setCornerRadiusUnit(self, unit: Qgis.RenderUnit)[source]¶
Sets the
unit
for the corner radius.See also
See also
- Parameters:
unit (Qgis.RenderUnit)
- setFillSymbol(self, symbol: QgsFillSymbol | None)[source]¶
Sets the fill
symbol
used to render the callout. Ownership ofsymbol
is transferred to the callout.See also
- Parameters:
symbol (Optional[QgsFillSymbol])
- setMargins(self, margins: QgsMargins)[source]¶
Sets the
margins
between the outside of the callout frame and the label’s bounding rectangle.Units are set via
setMarginsUnit()
Note
Negative margins are acceptable.
See also
See also
- Parameters:
margins (QgsMargins)
- setMarginsUnit(self, unit: Qgis.RenderUnit)[source]¶
Sets the
unit
for the margins between the outside of the callout frame and the label’s bounding rectangle.See also
See also
- Parameters:
unit (Qgis.RenderUnit)
- setMarkerSymbol(self, symbol: QgsMarkerSymbol | None)[source]¶
Sets the marker
symbol
used to render the callout endpoint. Ownership ofsymbol
is transferred to the callout.Set to
None
to disable the endpoint marker.The marker will always be rendered below the fill symbol for the callout.
See also
Added in version 3.40.
- Parameters:
symbol (Optional[QgsMarkerSymbol])
- setOffsetFromAnchor(self, distance: float)[source]¶
Sets the offset
distance
from the anchor point at which to start the line. Units are specified throughsetOffsetFromAnchorUnit()
.See also
See also
- Parameters:
distance (float)
- setOffsetFromAnchorMapUnitScale(self, scale: QgsMapUnitScale)[source]¶
Sets the map unit
scale
for the offset from anchor.See also
See also
See also
- Parameters:
scale (QgsMapUnitScale)
- setOffsetFromAnchorUnit(self, unit: Qgis.RenderUnit)[source]¶
Sets the
unit
for the offset from anchor distance.See also
See also
- Parameters:
unit (Qgis.RenderUnit)
- setWedgeWidth(self, width: float)[source]¶
Sets the
width
of the wedge shape at the side it connects with the label.Units are specified through
setWedgeWidthUnit()
.See also
See also
- Parameters:
width (float)
- setWedgeWidthMapUnitScale(self, scale: QgsMapUnitScale)[source]¶
Sets the map unit
scale
for the wedge width.See also
See also
See also
- Parameters:
scale (QgsMapUnitScale)
- setWedgeWidthUnit(self, unit: Qgis.RenderUnit)[source]¶
Sets the
unit
for the wedge width.See also
See also
- Parameters:
unit (Qgis.RenderUnit)
- wedgeWidth(self) float [source]¶
Returns the width of the wedge shape at the side it connects with the label.
Units are specified through
wedgeWidthUnit()
.See also
See also
- Return type:
float
- wedgeWidthMapUnitScale(self) QgsMapUnitScale ¶
Returns the map unit scale for the wedge width.
See also
See also
See also
- Return type:
- wedgeWidthUnit(self) Qgis.RenderUnit [source]¶
Returns the units for the wedge width.
See also
See also
- Return type: