SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
labelpainter.h File Reference

Slice US.B3 (UNIFIED_STYLING plan B3) — the one place every layer paints a text label, so halo / background / scale-gating / placement behave identically across the 1D model, 1D results, and 2D results paint paths. More...

#include "render/labelconfig.h"
#include <QPointF>
#include <QRectF>
#include <QSizeF>
#include <QString>
Include dependency graph for labelpainter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OpenSWMM::Render::LabelPainter
 Stateless label-drawing helpers shared by every paint path. More...
 

Namespaces

namespace  OpenSWMM
 
namespace  OpenSWMM::Render
 

Detailed Description

Slice US.B3 (UNIFIED_STYLING plan B3) — the one place every layer paints a text label, so halo / background / scale-gating / placement behave identically across the 1D model, 1D results, and 2D results paint paths.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

Pure QPainter helper driven by a LabelConfig value — no MapCanvas or layer coupling. Callers compute the canvas scale denominator (MapCanvas::scaleDenominator) and pass it to scaleVisible(); the draw routine renders constant-point-size text in screen space (the GIS standard — labels don't grow/shrink with zoom).

Draw order is fixed: background rounded-rect → stroked-path halo → glyph fill, so the halo reads over a busy basemap and the optional background frame sits behind everything.