QgsTicksScaleBarRenderer class

A scale bar that draws segments using short ticks.

Base classes

class QgsScaleBarRenderer
Abstract base class for scale bar renderers.

Public types

enum TickPosition { TicksUp, TicksDown, TicksMiddle }
Tick positions.

Constructors, destructors, conversion operators

QgsTicksScaleBarRenderer() defaulted
Constructor for QgsTicksScaleBarRenderer.

Public functions

void draw(QgsRenderContext& context, const QgsScaleBarSettings& settings, const QgsScaleBarRenderer::ScaleBarContext& scaleContext) const override
Draws the scalebar using the specified settings and scaleContext to a destination render context.
auto name() const -> QString override
Returns the unique name for this style.
void setTickPosition(TickPosition position)
Sets the position for tick marks in the scalebar.
auto tickPosition() const -> TickPosition
Returns the position for tick marks in the scalebar.

Enum documentation

enum QgsTicksScaleBarRenderer::TickPosition

Tick positions.

Enumerators
TicksUp

Render ticks above line.

TicksDown

Render ticks below line.

TicksMiddle

Render ticks crossing line.

Function documentation

void QgsTicksScaleBarRenderer::setTickPosition(TickPosition position)

Sets the position for tick marks in the scalebar.

TickPosition QgsTicksScaleBarRenderer::tickPosition() const

Returns the position for tick marks in the scalebar.