Subgroup: other

Class: QgsTicksScaleBarRenderer

class qgis.core.QgsTicksScaleBarRenderer

Bases: qgis._core.QgsScaleBarRenderer

A scale bar that draws segments using short ticks.

New in version 3.0: Methods

calculateBoxSize Calculates the required box size (in millimeters) for a scalebar using the specified settings and scaleContext.
draw
drawDefaultLabels
firstLabelString
firstLabelXOffset
name
segmentPositions
segmentWidths
setTickPosition Sets the position for tick marks in the scalebar.
tickPosition Returns the position for tick marks in the scalebar.

Attributes

TicksDown
TicksMiddle
TicksUp
class TickPosition

Bases: int

TicksDown = 1
TicksMiddle = 2
TicksUp = 0
draw(self, context: QgsRenderContext, settings: QgsScaleBarSettings, scaleContext: QgsScaleBarRenderer.ScaleBarContext)
drawDefaultLabels()
firstLabelString()
firstLabelXOffset()
name(self) → str
segmentPositions()
segmentWidths()
setTickPosition(self, position: QgsTicksScaleBarRenderer.TickPosition)

Sets the position for tick marks in the scalebar.

See also

tickPosition()

tickPosition(self) → QgsTicksScaleBarRenderer.TickPosition

Returns the position for tick marks in the scalebar.