![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Resolve a MaskSpec to a QPainterPath in scene coords (Slice Z.14-paint). More...
Go to the source code of this file.
Classes | |
| struct | OpenSWMM::Render::MaskClipResult |
| Outcome of resolving a MaskSpec. More... | |
Namespaces | |
| namespace | OpenSWMM |
| namespace | OpenSWMM::Render |
Functions | |
| MaskClipResult | OpenSWMM::Render::resolveMaskClip (OpenSWMMVisLayer *hostLayer, const MaskSpec &spec) |
Resolve spec against hostLayer's workspace. | |
| void | OpenSWMM::Render::invalidateMaskClipCache (const QString &layerId=QString()) |
| Slice Z.14-paint-cache — clear cached clip paths. | |
Resolve a MaskSpec to a QPainterPath in scene coords (Slice Z.14-paint).
The MaskSpec on a layer names a polygon source layer by id. At paint time the host layer asks this resolver to look up that source through the workspace, walk its polygon geometry, project into scene coords (Y-flipped), and return a QPainterPath ready for QPainter::setClipPath.
v1 supports GISVectorLayer polygon sources only. Non-polygon source geometry and non-GISVectorLayer source types return an empty path so the host falls back to unclipped paint. CRS-aware reprojection happens against the host's known transform stack; if the source and host CRSes diverge in a way the resolver can't handle (no GDAL transform available), the resolver again returns empty so paint isn't silently wrong.
No caching for v1 — the resolver is called per paint and walks the source layer's features each frame. A revision-keyed cache is the named Z.14-paint-cache follow-up; the present implementation is correct but linear in source- feature count.