Class: QgsMeshRendererVectorArrowSettings

class qgis.core.QgsMeshRendererVectorArrowSettings

Bases: sip.wrapper

Represents a mesh renderer settings for vector datasets displayed with arrows

Note

The API is considered EXPERIMENTAL and can be changed without a notice

Methods

arrowHeadLengthRatio

Returns ratio of the head length of the arrow (range 0-1)

arrowHeadWidthRatio

Returns ratio of the head width of the arrow (range 0-1)

fixedShaftLength

Returns fixed arrow length (in millimeters)

maxShaftLength

Returns maximum shaft length (in millimeters)

minShaftLength

Returns mininimum shaft length (in millimeters)

readXml

Reads configuration from the given DOM element

scaleFactor

Returns scale factor

setArrowHeadLengthRatio

Sets ratio of the head length of the arrow (range 0-1)

setArrowHeadWidthRatio

Sets ratio of the head width of the arrow (range 0-1)

setFixedShaftLength

Sets fixed length (in millimeters)

setMaxShaftLength

Sets maximum shaft length (in millimeters)

setMinShaftLength

Sets mininimum shaft length (in millimeters)

setScaleFactor

Sets scale factor

setShaftLengthMethod

Sets method used for drawing arrows

shaftLengthMethod

Returns method used for drawing arrows

writeXml

Writes configuration to a new DOM element

Attributes

Fixed

MinMax

Scaled

class ArrowScalingMethod

Bases: int

Fixed = 2
MinMax = 0
Scaled = 1
arrowHeadLengthRatio(self) → float

Returns ratio of the head length of the arrow (range 0-1)

Return type

float

arrowHeadWidthRatio(self) → float

Returns ratio of the head width of the arrow (range 0-1)

Return type

float

fixedShaftLength(self) → float

Returns fixed arrow length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Fixed

Return type

float

maxShaftLength(self) → float

Returns maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax

Return type

float

minShaftLength(self) → float

Returns mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax

Return type

float

readXml(self, elem: QDomElement)

Reads configuration from the given DOM element

Parameters

elem (QDomElement) –

scaleFactor(self) → float

Returns scale factor

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Scaled

Return type

float

setArrowHeadLengthRatio(self, arrowHeadLengthRatio: float)

Sets ratio of the head length of the arrow (range 0-1)

Parameters

arrowHeadLengthRatio (float) –

setArrowHeadWidthRatio(self, arrowHeadWidthRatio: float)

Sets ratio of the head width of the arrow (range 0-1)

Parameters

arrowHeadWidthRatio (float) –

setFixedShaftLength(self, fixedShaftLength: float)

Sets fixed length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Fixed

Parameters

fixedShaftLength (float) –

setMaxShaftLength(self, maxShaftLength: float)

Sets maximum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax

Parameters

maxShaftLength (float) –

setMinShaftLength(self, minShaftLength: float)

Sets mininimum shaft length (in millimeters)

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.MinMax

Parameters

minShaftLength (float) –

setScaleFactor(self, scaleFactor: float)

Sets scale factor

Only for QgsMeshRendererVectorSettings.ArrowScalingMethod.Scaled

Parameters

scaleFactor (float) –

setShaftLengthMethod(self, shaftLengthMethod: QgsMeshRendererVectorArrowSettings.ArrowScalingMethod)

Sets method used for drawing arrows

Parameters

shaftLengthMethod (QgsMeshRendererVectorArrowSettings.ArrowScalingMethod) –

shaftLengthMethod(self)QgsMeshRendererVectorArrowSettings.ArrowScalingMethod

Returns method used for drawing arrows

Return type

QgsMeshRendererVectorArrowSettings.ArrowScalingMethod

writeXml(self, doc: QDomDocument) → QDomElement

Writes configuration to a new DOM element

Parameters

doc (QDomDocument) –

Return type

QDomElement