Class: QgsTicksScaleBarRenderer

class qgis.core.QgsTicksScaleBarRenderer(position: QgsTicksScaleBarRenderer.TickPosition = QgsTicksScaleBarRenderer.TicksMiddle)

Bases: QgsScaleBarRenderer

Constructor for QgsTicksScaleBarRenderer.

QgsTicksScaleBarRenderer(QgsTicksScaleBarRenderer)

A scale bar that draws segments using short ticks.

New in version 3.0.

Parameters

position

class TickPosition

Bases: int

TicksDown = 1
TicksMiddle = 2
TicksUp = 0
clone(self)QgsTicksScaleBarRenderer
Return type

QgsTicksScaleBarRenderer

draw(self, context: QgsRenderContext, settings: QgsScaleBarSettings, scaleContext: QgsScaleBarRenderer.ScaleBarContext)
Parameters
drawDefaultLabels()
firstLabelString()
firstLabelXOffset()
flags(self) → QgsScaleBarRenderer.Flags
Return type

QgsScaleBarRenderer.Flags

id(self) → str
Return type

str

segmentPositions()
segmentWidths()
setTickPosition(self, position: QgsTicksScaleBarRenderer.TickPosition)

Sets the position for tick marks in the scalebar.

See also

tickPosition()

Parameters

position (QgsTicksScaleBarRenderer.TickPosition) –

sortKey(self) → int
Return type

int

tickPosition(self) → QgsTicksScaleBarRenderer.TickPosition

Returns the position for tick marks in the scalebar.

Return type

QgsTicksScaleBarRenderer.TickPosition

visibleName(self) → str
Return type

str