21#ifndef OPENSWMM_RENDER_LABELPAINTER_H
22#define OPENSWMM_RENDER_LABELPAINTER_H
51 double scaleDenominator);
59 const QSizeF &textSize);
66 const QPointF &anchor,
67 const QSizeF &textSize);
76 static void drawLabel(QPainter &
p,
const QPointF &topLeft,
84 static QRectF
drawLabelAt(QPainter &
p,
const QPointF &anchor,
Stateless label-drawing helpers shared by every paint path.
Definition labelpainter.h:41
static void drawLabel(QPainter &p, const QPointF &topLeft, const QString &text, const LabelConfig &cfg)
Draw text with the TOP-LEFT of its box at topLeft (screen px), using cfg.effectiveFont(): background ...
Definition labelpainter.cpp:55
static bool scaleVisible(const LabelConfig &cfg, double scaleDenominator)
Whether a label is visible at the given canvas scale denominator (the "1:N" map scale)....
Definition labelpainter.cpp:20
static QRectF labelRect(const LabelConfig &cfg, const QPointF &anchor, const QSizeF &textSize)
The text box rect (screen px) placed at anchor per the configured placement. Top-left = anchor + plac...
Definition labelpainter.cpp:49
static QPointF placementOffset(const LabelConfig &cfg, const QSizeF &textSize)
Offset (screen px) from the feature anchor to the TOP-LEFT of the text box for the configured placeme...
Definition labelpainter.cpp:33
static QRectF drawLabelAt(QPainter &p, const QPointF &anchor, const QString &text, const LabelConfig &cfg)
Convenience overload — places the text at anchor per the configured placement and draws it....
Definition labelpainter.cpp:98
Shared label-configuration value-type used by every layer that paints text labels.
ArrowPlacement p
Definition linesymbollayer.cpp:27
Definition gisrasterlayer.h:40
QString text
Definition queryparser.cpp:35
Per-layer label rendering parameters.
Definition labelconfig.h:47