Class: QgsSimpleLineCallout¶
- class qgis.core.QgsSimpleLineCallout¶
Bases:
QgsCallout
A simple direct line callout style.
Methods
- rtype
QgsSimpleLineCallout
Creates a new
QgsSimpleLineCallout
, using the settings serialized in theproperties
map (corresponding to the output fromQgsSimpleLineCallout.properties()
).- param context
Returns
True
if callout lines should be drawn to all feature parts.Returns the anchor point geometry for a label with the given bounding box and
anchor
point mode.Returns the line symbol used to render the callout line.
Returns the minimum length of callout lines.
Returns the map unit scale for the minimum callout length.
Returns the units for the minimum length of callout lines.
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.
Returns the offset distance from label area at which to end the line.
Returns the map unit scale for the minimum callout length.
Returns the units for the offset from label area.
- param context
- param props
- param context
Sets whether callout lines should be drawn to all feature parts.
Sets the line
symbol
used to render the callout line.Sets the minimum
length
of callout lines.Sets the map unit
scale
for the minimum callout length.Sets the
unit
for the minimum length of callout lines.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 offset
distance
from label area at which to end the line.Sets the map unit
scale
for the offset from label area.Sets the
unit
for the offset from label area distance.- param context
- param context
- rtype
str
- clone(self) → QgsSimpleLineCallout¶
- Return type
- create(properties: Dict[str, Any] = {}, context: QgsReadWriteContext = QgsReadWriteContext()) → QgsCallout¶
Creates a new
QgsSimpleLineCallout
, using the settings serialized in theproperties
map (corresponding to the output fromQgsSimpleLineCallout.properties()
).- Parameters
properties (Dict[str) –
context (
QgsReadWriteContext
= QgsReadWriteContext()) –
- Return type
- draw(self, context: QgsRenderContext, bodyBoundingBox: QRectF, angle: float, anchor: QgsGeometry, calloutContext: QgsCallout.QgsCalloutContext)¶
- Parameters
context (QgsRenderContext) –
bodyBoundingBox (QRectF) –
angle (float) –
anchor (QgsGeometry) –
calloutContext (QgsCallout.QgsCalloutContext) –
- drawCalloutToAllParts(self) → bool¶
Returns
True
if callout lines should be drawn to all feature parts.See also
- Return type
bool
- labelAnchorGeometry(self, bodyBoundingBox: QRectF, angle: float, anchor: QgsCallout.LabelAnchorPoint) → QgsGeometry¶
Returns the anchor point geometry for a label with the given bounding box and
anchor
point mode.New in version 3.14.
- lineSymbol(self) → QgsLineSymbol¶
Returns the line symbol used to render the callout line.
Ownership is not transferred.
See also
- Return type
- minimumLength(self) → float¶
Returns the minimum length of callout lines. Units are specified through
minimumLengthUnits()
.See also
See also
- Return type
float
- minimumLengthMapUnitScale(self) → QgsMapUnitScale¶
Returns the map unit scale for the minimum callout length.
See also
See also
See also
- Return type
- minimumLengthUnit(self) → QgsUnitTypes.RenderUnit¶
Returns the units for the minimum length of callout lines.
See also
See also
- Return type
- offsetFromAnchor(self) → float¶
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) → QgsUnitTypes.RenderUnit¶
Returns the units for the offset from anchor point.
See also
See also
- Return type
- offsetFromLabel(self) → float¶
Returns the offset distance from label area at which to end the line. Units are specified through
offsetFromLabelUnit()
.See also
See also
- Return type
float
- offsetFromLabelMapUnitScale(self) → QgsMapUnitScale¶
Returns the map unit scale for the minimum callout length.
See also
See also
See also
- Return type
- offsetFromLabelUnit(self) → QgsUnitTypes.RenderUnit¶
Returns the units for the offset from label area.
See also
See also
- Return type
- properties(self, context: QgsReadWriteContext) → Dict[str, Any]¶
- Parameters
context (QgsReadWriteContext) –
- Return type
Dict[str, Any]
- readProperties(self, props: Dict[str, Any], context: QgsReadWriteContext)¶
- Parameters
props (Dict[str) –
context (QgsReadWriteContext) –
- referencedFields(self, context: QgsRenderContext) → Set[str]¶
- Parameters
context (QgsRenderContext) –
- Return type
Set[str]
- setDrawCalloutToAllParts(self, drawToAllParts: bool)¶
Sets whether callout lines should be drawn to all feature parts.
See also
- Parameters
drawToAllParts (bool) –
- setLineSymbol(self, symbol: QgsLineSymbol)¶
Sets the line
symbol
used to render the callout line. Ownership ofsymbol
is transferred to the callout.See also
- Parameters
symbol (QgsLineSymbol) –
- setMinimumLength(self, length: float)¶
Sets the minimum
length
of callout lines. Units are specified throughsetMinimumLengthUnit()
.See also
See also
- Parameters
length (float) –
- setMinimumLengthMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the minimum callout length.See also
See also
See also
- Parameters
scale (QgsMapUnitScale) –
- setMinimumLengthUnit(self, unit: QgsUnitTypes.RenderUnit)¶
Sets the
unit
for the minimum length of callout lines.See also
See also
- Parameters
unit (QgsUnitTypes.RenderUnit) –
- setOffsetFromAnchor(self, distance: float)¶
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)¶
Sets the map unit
scale
for the offset from anchor.See also
See also
See also
- Parameters
scale (QgsMapUnitScale) –
- setOffsetFromAnchorUnit(self, unit: QgsUnitTypes.RenderUnit)¶
Sets the
unit
for the offset from anchor distance.See also
See also
- Parameters
unit (QgsUnitTypes.RenderUnit) –
- setOffsetFromLabel(self, distance: float)¶
Sets the offset
distance
from label area at which to end the line. Units are specified throughsetOffsetFromLabelUnit()
.See also
See also
- Parameters
distance (float) –
- setOffsetFromLabelMapUnitScale(self, scale: QgsMapUnitScale)¶
Sets the map unit
scale
for the offset from label area.See also
See also
See also
- Parameters
scale (QgsMapUnitScale) –
- setOffsetFromLabelUnit(self, unit: QgsUnitTypes.RenderUnit)¶
Sets the
unit
for the offset from label area distance.See also
See also
- Parameters
unit (QgsUnitTypes.RenderUnit) –
- startRender(self, context: QgsRenderContext)¶
- Parameters
context (QgsRenderContext) –
- stopRender(self, context: QgsRenderContext)¶
- Parameters
context (QgsRenderContext) –
- type(self) → str¶
- Return type
str