![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Namespaces | |
| namespace | AttributeCandidates |
| namespace | detail |
| namespace | keys |
| namespace | QmlRuleListIO |
| namespace | RendererFactory |
| namespace | RuleListIO |
| namespace | SymbolProps |
Classes | |
| struct | AttributeField |
| One themeable attribute on a layer. More... | |
| struct | AuxiliaryStorageSpec |
| Per-layer auxiliary-storage configuration. More... | |
| struct | BasemapRenderParams |
| Brightness / contrast / saturation / resampling for a basemap. More... | |
| class | CategorizedRenderer |
| Distinct symbol per unique value of a string / enum attribute. More... | |
| class | CellDepthFillSublayer |
| class | ClassificationScheme |
| Shared classification model: mode + binner + ramp + range + per-class overrides, with a revision stamp for render caches. More... | |
| class | ContourBandStyle |
| class | ContourBandSublayer |
| class | ContourBandSymbolStyleAdapter |
Filled-isoband surface — ContourBandStyle. More... | |
| struct | ContourJobInput |
| struct | ContourJobOutput |
| struct | ContourSymbolLayerSpec |
| Iso-line / iso-band paint pass. More... | |
| class | CoupledNodeStyle |
| class | CoupledNodeSublayer |
| struct | DataDefinedScalar |
| Maps one numeric attribute to a scalar output range. More... | |
| class | DepthColorRampStyle |
| class | DepthColorRampSublayer |
| struct | DiagramSpec |
| Per-layer diagram configuration. More... | |
| class | ExpressionEvaluator |
| struct | FeatureRef |
| Identifies one feature in one layer for the renderer pipeline. More... | |
| class | FeatureSublayer |
| One paint pass for a single OpenSWMMVis::SwmmCategory. More... | |
| class | FeatureSublayerStyle |
| Common property bag for every per-Category result sublayer. More... | |
| struct | FillSymbolLayerSpec |
| Typed snapshot of a SimpleFill SymbolLayer's props. More... | |
| class | FlowArrowStyle |
| class | FlowArrowSublayer |
| class | GraduatedClass |
| class | GraduatedRasterRenderer |
| ClassificationScheme-driven single-band raster colouring. More... | |
| class | GraduatedRenderer |
| Classifies a numeric attribute into bins and assigns a colour per bin. More... | |
| struct | HillshadeSymbolLayerSpec |
| Terrain-hillshade overlay (DEM / mesh bed elevation). More... | |
| class | HillshadeSymbolStyleAdapter |
Mesh-fill / hillshade surface — MeshFillStyle. More... | |
| class | IAttributeProvider |
| Interface every themeable layer implements so renderer panels can populate attribute combos without hardcoding the lists. More... | |
| class | IFeatureRenderer |
| Abstract interface — every vector layer's paint path goes here. More... | |
| class | IntervalBinner |
| Computes break values + maps a value to a bin index. More... | |
| class | IRasterRenderer |
| Abstract interface — every raster layer's paint path goes here. More... | |
| class | IsolineStyle |
| class | IsolineSublayer |
| class | IsolineSymbolStyleAdapter |
Contour-line surface — IsolineStyle. More... | |
| class | ISublayer |
| One toggleable visual aspect of a results / model layer. More... | |
| class | ISublayerHost |
| Mixin interface for layers that expose a list of ISublayers. More... | |
| struct | JoinSpec |
| One external-table join. More... | |
| struct | LabelConfig |
| Per-layer label rendering parameters. More... | |
| class | LabelPainter |
| Stateless label-drawing helpers shared by every paint path. More... | |
| class | LegendOverlayStyle |
| Model object holding the on-canvas legend's chrome configuration. More... | |
| struct | LegendSymbolItem |
| One row in a layer's legend. More... | |
| struct | LineArrowSpec |
| Directional-arrow parameters attached to a Line Symbol Layer. More... | |
| class | LineFeatureSublayerStyle |
| struct | LineSymbolLayerSpec |
| Typed snapshot of a SimpleLine / MarkerLine SymbolLayer's props. More... | |
| class | LineSymbolStyleAdapter |
| Single-Symbol panel surface for line archetypes — Conduits / Pumps / Orifices / Weirs / Outlets on the SWMM model layer and the equivalent link categories on the results layer. More... | |
| struct | MarkerSymbolLayerSpec |
| Typed snapshot of a SimpleMarker SymbolLayer's props. More... | |
| struct | MaskClipResult |
| Outcome of resolving a MaskSpec. More... | |
| struct | MaskSpec |
| Per-layer mask configuration. More... | |
| class | MeshBcStyle |
| class | MeshBcSublayer |
| class | MeshEdgeStyle |
| class | MeshEdgeSublayer |
| struct | MeshEdgeSymbolLayerSpec |
| TIN / mesh wireframe paint pass. More... | |
| class | MeshEdgeSymbolStyleAdapter |
Mesh-wireframe surface — MeshEdgeStyle. More... | |
| class | MeshFillStyle |
| class | MeshFillSublayer |
| class | MeshNodeStyle |
| class | MeshNodeSublayer |
| struct | MeshNodeSymbolLayerSpec |
| TIN / mesh vertex marker paint pass. More... | |
| class | MeshNodeSymbolStyleAdapter |
Mesh-vertex marker surface — MeshNodeStyle. More... | |
| class | MeshRenderChunkIndex |
| class | MeshStaticGeometryBuffers |
| class | MultiBandColorRenderer |
| RGB(A) composite from three (or four) raster bands. More... | |
| class | MultiKindRenderer |
| Per-kind IFeatureRenderer dispatch for multi-kind layers. More... | |
| struct | PaintStep |
| One entry in the paint sequence computed by computeSymbolLevelOrder. More... | |
| class | PalettedRasterRenderer |
| Discrete value → colour raster renderer (categorical rasters). More... | |
| class | PointFeatureSublayerStyle |
| class | PointSymbolStyleAdapter |
| Single-Symbol panel surface for point (marker) archetypes — Junctions / Outfalls / Storage / Dividers / RainGages on the SWMM model layer, and the equivalent point categories on the results layer. More... | |
| class | PolygonFeatureSublayerStyle |
| class | PolygonSymbolStyleAdapter |
| Single-Symbol panel surface for polygon archetypes — Subcatchments on the SWMM model layer and the polygon categories on the results layer. More... | |
| class | Qsg2DAsyncResult |
| class | Qsg2DDirtyState |
| struct | Qsg2DLodDecision |
| struct | Qsg2DLodInputs |
| class | Qsg2DLodPolicy |
| class | Qsg2DRenderStats |
| struct | RasterColorRampSymbolLayerSpec |
| Continuous-color ramp paint pass for raster / 2D-mesh data. More... | |
| class | RasterColorRampSymbolStyleAdapter |
Depth color-ramp surface — DepthColorRampStyle. More... | |
| class | Rule |
| One layer-scope styled aspect — name + renderer + filter + scale. More... | |
| class | RuleBasedRenderer |
| First-match expression-gated rule list. More... | |
| class | RuleList |
| Ordered owning container for Rules on one layer. More... | |
| struct | RuleListIoResult |
| Outcome of a save / load operation. More... | |
| class | ScalarFillStyle |
| struct | ScalarRampLut |
| class | SingleBandPseudoColorRenderer |
| Continuous colour ramp for single-band raster data. More... | |
| class | SingleSymbolRenderer |
| One SymbolStyle for the whole layer. More... | |
| class | SmoothDepthFillSublayer |
| class | StyleFileIO |
| struct | SublayerContext |
| Per-frame parameters handed to ISublayer::buildOrUpdateNode(). More... | |
| class | SublayerStyle |
| Base class for per-sublayer style property bags. More... | |
| struct | SymbolLayer |
| One paint pass in the SymbolStyle stack. More... | |
| struct | SymbolStyle |
| Stack of SymbolLayer paint passes (bottom-up) plus an overall opacity. More... | |
| class | SymbolStyleAdapter |
| struct | TemporalSpec |
| Per-layer temporal-animation configuration. More... | |
| class | UnclassedColorsRenderer |
| Maps a continuous numeric attribute to a continuous colour ramp, no bin discretisation. More... | |
| class | VelocityVectorStyle |
| class | VelocityVectorSublayer |
| struct | VelocityVectorSymbolLayerSpec |
| 2D vector-field glyph paint pass (velocity arrows). More... | |
| class | VelocityVectorSymbolStyleAdapter |
2D velocity-arrow surface — VelocityVectorStyle. More... | |
Enumerations | |
| enum class | AttributeSourceKind : int { Static = 0 , Dynamic = 1 } |
| enum class | RangeMode : int { FixedOverRun = 0 , PerFrameAutoStretch = 1 , FixedUser = 2 } |
| enum class | DDCurve : int { Linear = 0 , Sqrt = 1 , Log = 2 } |
Interpolation shape for DataDefinedScalar. More... | |
| enum class | DiagramType : int { Pie = 0 , Bar = 1 , TimeSeries = 2 , Histogram = 3 } |
| Chart kind painted per feature. More... | |
| enum class | ClassEditKind { Color , Size , Width , Symbol } |
| Categories of per-class mutation that a renderer may support. More... | |
| enum class | BinMethod : int { EqualInterval = 0 , Quantile = 1 , Manual = 2 , NaturalBreaks = 3 , StdDev = 4 , Logarithmic = 5 , Exponential = 6 } |
| How break values are computed from a sample set. More... | |
| enum class | ArrowPlacement : int { End = 0 , Both = 1 , Centered = 2 , RepeatEveryNPx = 3 , AtVertices = 4 } |
| Where directional arrows are painted along a polyline. More... | |
| enum class | MarkerShape : int { Circle = 0 , Square = 1 , Triangle = 2 , Diamond = 3 , Star = 4 , Cross = 5 , Plus = 6 , XCross = 7 , Pentagon = 8 , Hexagon = 9 , Arrow = 10 , EquilateralTriangle = 11 , HalfCircle = 12 , TriangleDown = 13 , Octagon = 14 , Hexagram = 15 , ArrowUp = 16 , ArrowDown = 17 , ArrowLeft = 18 } |
| 13 canonical marker shapes the Rule Model's Marker Symbol Layer supports (per RENDERING_RULE_MODEL_PLAN.md §6.1). More... | |
| enum class | MaskMode : int { ClipInside = 0 , ClipOutside = 1 } |
| Which side of the polygon source layer paints. More... | |
| enum class | ContourMode : int { Lines = 0 , Filled = 1 , Both = 2 } |
| What a contour Symbol Layer paints. More... | |
| enum class | SizeUnit { Pixels = 0 , MapUnits = 1 } |
| Unit for symbol-size scalars (markerSize, lineWidth, arrowLength, …). More... | |
| enum class | SymbolLayerKind { SimpleMarker , SimpleLine , SimpleFill , MarkerLine , HatchFill , PatternFill , SvgMarker , FontMarker , RasterColorRamp , Hillshade , Contour , MeshEdge , MeshNode , VectorGlyph } |
| The kind of paint pass this SymbolLayer represents. More... | |
| enum class | TemporalMode : int { Single = 0 , Range = 1 , Cumulative = 2 } |
| How the time axis is consumed at paint time. More... | |
Functions | |
| QString | attributeSourceKindToString (AttributeSourceKind k) |
| AttributeSourceKind | attributeSourceKindFromString (const QString &s) |
| QString | rangeModeToString (RangeMode m) |
| RangeMode | rangeModeFromString (const QString &s) |
| bool | operator== (const BasemapRenderParams &a, const BasemapRenderParams &b) |
| bool | operator!= (const BasemapRenderParams &a, const BasemapRenderParams &b) |
| QVector< double > | sampleBreaksAcrossFrames (const IntervalBinner &binner, const QVector< QVector< double > > &perFrameValues, double sampleRate=0.2) |
Pick perFrameValues at sampleRate fraction (≥ 1 frame), flatten the selected frames' values, and call IntervalBinner::computeBreaks() on the flat sample. | |
| QVector< int > | sampledFrameIndices (int frameCount, double sampleRate) |
Indices of the frames the sampler would pick, for the same frameCount and sampleRate. Pure function — useful for tests and for showing the user which frames were sampled. Returns an empty vector when frameCount == 0. | |
| ContourJobOutput | computeContourJob (const ContourJobInput &in) |
| QString | diagramTypeToString (DiagramType t) |
| DiagramType | diagramTypeFromString (const QString &s) |
| void | drawFill (QPainter *painter, const QPolygonF &polygon, const FillSymbolLayerSpec &spec) |
Paint a filled + outlined polygon per spec. | |
| bool | operator== (const LabelConfig &a, const LabelConfig &b) |
| bool | operator!= (const LabelConfig &a, const LabelConfig &b) |
| QString | arrowPlacementToString (ArrowPlacement p) |
| ArrowPlacement | arrowPlacementFromString (const QString &s) |
| void | drawArrowsAlongPolyline (QPainter *painter, const QPolygonF &polyline, const LineArrowSpec &spec) |
Paint directional arrows along polyline per spec. | |
| QString | markerShapeToString (MarkerShape shape) |
| MarkerShape | markerShapeFromString (const QString &s) |
| void | drawMarkerShape (QPainter *painter, MarkerShape shape, const QPointF ¢er, qreal sizePx, const QBrush &fillBrush, const QPen &outlinePen, qreal rotationDeg=0.0) |
Render shape into painter centred at center with the outer extent sizePx, filled with fillBrush and stroked with outlinePen. Rotation is in degrees (clockwise). | |
| MaskClipResult | resolveMaskClip (OpenSWMMVisLayer *hostLayer, const MaskSpec &spec) |
Resolve spec against hostLayer's workspace. | |
| void | invalidateMaskClipCache (const QString &layerId=QString()) |
| Slice Z.14-paint-cache — clear cached clip paths. | |
| QString | maskModeToString (MaskMode m) |
| MaskMode | maskModeFromString (const QString &s) |
| QPolygonF | offsetPolyline (const QPolygonF &input, qreal offsetPx, qreal miterLimit=kDefaultMiterLimit) |
Offset input perpendicular to each segment by offsetPx. | |
| quint8 | premul (quint8 c, quint8 a) |
| std::unique_ptr< IRasterRenderer > | makeRasterRenderer (const QJsonObject &j) |
Construct the renderer whose rendererId() equals j["id"] and restore it from j via fromJson(). Known ids: "graduatedraster", "palettedraster", "multibandcolor", "singlebandpseudocolor". | |
| QString | contourModeToString (ContourMode m) |
| ContourMode | contourModeFromString (const QString &s) |
| constexpr double | sceneSizeFromPixels (double pixelSize, double pixelsPerSceneUnit) noexcept |
| Convert a screen-pixel size to a scene-space offset. | |
| constexpr double | pixelsFromSceneSize (double sceneSize, double pixelsPerSceneUnit) noexcept |
| Inverse of sceneSizeFromPixels — convert a scene-space offset back to its on-screen pixel size at the current zoom. | |
| QString | symbolLayerKindToString (SymbolLayerKind kind) |
| Returns the JSON string token for a SymbolLayerKind. | |
| SymbolLayerKind | symbolLayerKindFromString (const QString &s) |
| Parses the JSON string token back into a SymbolLayerKind. | |
| int | symbolLayerLevel (const SymbolLayer &layer) |
| void | setSymbolLayerLevel (SymbolLayer &layer, int level) |
| bool | operator== (const PaintStep &a, const PaintStep &b) |
| QVector< PaintStep > | computeSymbolLevelOrder (const QVector< SymbolStyle > &features, bool enabled) |
Compute the paint sequence for features under enabled Symbol Levels. | |
| QString | temporalModeToString (TemporalMode m) |
| TemporalMode | temporalModeFromString (const QString &s) |
Variables | |
| constexpr qreal | kDefaultMiterLimit = 2.0 |
| Default miter limit (length ratio) before the algorithm falls back to a bevel join. Mirrors QPen's default of 2.0 — a miter is rejected when its length exceeds 2× the offset distance. Lower → more bevels; higher → spikier joins at sharp angles. | |
| constexpr const char * | kSymbolLevelPropKey = "level" |
|
strong |
Where directional arrows are painted along a polyline.
|
strong |
|
strong |
How break values are computed from a sample set.
|
strong |
Categories of per-class mutation that a renderer may support.
Slice BB Phase 8.6.16 — the legend right-click context menu and the LegendPropertiesDialog Layers tab both query IFeatureRenderer::supportsClassEdit(kind) to decide whether to offer the corresponding action / cell editor. A renderer that returns false for a kind also no-ops the matching setter.
| Enumerator | |
|---|---|
| Color | Per-class swatch / fill colour. |
| Size | Per-class marker size (points / squares / triangles…). |
| Width | Per-class line width (polylines / strokes). |
| Symbol | Wholesale per-class SymbolStyle replacement. |
|
strong |
|
strong |
Interpolation shape for DataDefinedScalar.
| Enumerator | |
|---|---|
| Linear | |
| Sqrt | Compresses high-end differences — useful for area-like attrs. |
| Log | Compresses extreme values — useful for flow / runoff that span orders of magnitude. |
|
strong |
|
strong |
13 canonical marker shapes the Rule Model's Marker Symbol Layer supports (per RENDERING_RULE_MODEL_PLAN.md §6.1).
Integer values are stable — they round-trip through .oswp and .swmm-rule.json. Ordering of values is also stable; future shapes append at the end. Forward compat: unknown JSON tokens fall back to Circle.
|
strong |
|
strong |
|
strong |
Unit for symbol-size scalars (markerSize, lineWidth, arrowLength, …).
Pixels — constant size on screen regardless of map zoom.
The renderer divides the pixel value by the current
pixels-per-scene-unit factor to obtain the scene-space
offset (see screenpixels.h).
MapUnits — scales with map zoom (placeholder; not consumed in S1).
| Enumerator | |
|---|---|
| Pixels | |
| MapUnits | |
|
strong |
The kind of paint pass this SymbolLayer represents.
v1 ships the items marked MUST in §J.3. The remaining variants round-trip through JSON so style files authored by future tools load correctly, even when the UI editor is deferred.
| Enumerator | |
|---|---|
| SimpleMarker | Point marker (circle, square, …). [MUST] |
| SimpleLine | Stroked polyline. [MUST] |
| SimpleFill | Filled polygon. [MUST] |
| MarkerLine | Repeated marker along a polyline (flow arrows). [MUST] |
| HatchFill | Parallel-line / cross-hatch polygon fill. |
| PatternFill | Image-tile polygon fill. (UI editor deferred.) |
| SvgMarker | SVG path file marker. (UI editor deferred.) |
| FontMarker | Unicode-character marker from a font. (UI editor deferred.) |
| RasterColorRamp | Continuous-color raster ramp (DEM / 2D depth field). |
| Hillshade | Terrain hillshade overlay (azimuth / altitude / z-exag). |
| Contour | Contour lines + optional filled isobands. |
| MeshEdge | TIN / mesh wireframe edges. |
| MeshNode | TIN / mesh vertex markers. |
| VectorGlyph | 2D vector-field glyph layer (velocity arrows). |
|
strong |
| ArrowPlacement OpenSWMM::Render::arrowPlacementFromString | ( | const QString & | s | ) |
| QString OpenSWMM::Render::arrowPlacementToString | ( | ArrowPlacement | p | ) |
|
inline |
|
inline |
| ContourJobOutput OpenSWMM::Render::computeContourJob | ( | const ContourJobInput & | in | ) |
Pure worker: march the snapshot. Safe on any thread.
| QVector< PaintStep > OpenSWMM::Render::computeSymbolLevelOrder | ( | const QVector< SymbolStyle > & | features, |
| bool | enabled | ||
| ) |
Compute the paint sequence for features under enabled Symbol Levels.
When enabled is false (default), paint order is the natural per-feature, bottom-up symbol-layer order: for each feature in input order, every symbol layer in order. This is the legacy behavior.
When enabled is true, paint order is level-major: for each distinct level (ascending), every feature's symbol layers at that level, in feature-input order. Within one feature the symbol-layer-input order is preserved among siblings of the same level. Symbol layers missing the level prop default to level 0.
Stable: ties are broken by feature-input order, then symbol-layer-input order.
| ContourMode OpenSWMM::Render::contourModeFromString | ( | const QString & | s | ) |
| QString OpenSWMM::Render::contourModeToString | ( | ContourMode | m | ) |
| DiagramType OpenSWMM::Render::diagramTypeFromString | ( | const QString & | s | ) |
| QString OpenSWMM::Render::diagramTypeToString | ( | DiagramType | t | ) |
| void OpenSWMM::Render::drawArrowsAlongPolyline | ( | QPainter * | painter, |
| const QPolygonF & | polyline, | ||
| const LineArrowSpec & | spec | ||
| ) |
Paint directional arrows along polyline per spec.
Walks the polyline once, computing arc-length positions for the placement mode, and draws a filled isoceles triangle at each. Arrow direction is the local segment tangent; `spec.reverse` flips it. Painter state is saved / restored. Antialiasing is enabled for the draw. No-op when \p polyline has fewer than 2 vertices or when \p spec.lengthPx <= 0.
| void OpenSWMM::Render::drawFill | ( | QPainter * | painter, |
| const QPolygonF & | polygon, | ||
| const FillSymbolLayerSpec & | spec | ||
| ) |
Paint a filled + outlined polygon per spec.
Fills with toQBrush() then strokes the boundary with toQPen(). Painter state is saved / restored; antialiasing is enabled for the draw. No-op when \p polygon has fewer than 3 vertices.
| void OpenSWMM::Render::drawMarkerShape | ( | QPainter * | painter, |
| MarkerShape | shape, | ||
| const QPointF & | center, | ||
| qreal | sizePx, | ||
| const QBrush & | fillBrush, | ||
| const QPen & | outlinePen, | ||
| qreal | rotationDeg = 0.0 |
||
| ) |
Render shape into painter centred at center with the outer extent sizePx, filled with fillBrush and stroked with outlinePen. Rotation is in degrees (clockwise).
sizePx is the bounding-box edge — every shape fits in a square of side sizePx with the centre at center, so the visual size is uniform across shapes.
The function saves / restores painter state. Antialiasing is enabled for the duration of the draw — callers don't need to flip the hint. No-op when sizePx <= 0.
| void OpenSWMM::Render::invalidateMaskClipCache | ( | const QString & | layerId = QString() | ) |
Slice Z.14-paint-cache — clear cached clip paths.
The resolver caches each source layer's resolved `QPainterPath` keyed by layer id, so repeated paint passes skip the OGR walk. Callers should invoke this when a source layer's geometry changes (e.g. a vector layer reload) so the next paint rebuilds. Passing an empty \p layerId clears the whole cache. Cached entries also auto-evict when the source layer is destroyed (the cache stores a `QPointer` and re-verifies on each hit). External invalidation is only needed for in-place geometry edits — destruction is handled automatically.
| std::unique_ptr< IRasterRenderer > OpenSWMM::Render::makeRasterRenderer | ( | const QJsonObject & | j | ) |
Construct the renderer whose rendererId() equals j["id"] and restore it from j via fromJson(). Known ids: "graduatedraster", "palettedraster", "multibandcolor", "singlebandpseudocolor".
| MarkerShape OpenSWMM::Render::markerShapeFromString | ( | const QString & | s | ) |
Inverse of markerShapeToString. Unknown tokens return MarkerShape::Circle for forward compat.
| QString OpenSWMM::Render::markerShapeToString | ( | MarkerShape | shape | ) |
JSON token for the shape ("circle", "square", …).
| MaskMode OpenSWMM::Render::maskModeFromString | ( | const QString & | s | ) |
| QString OpenSWMM::Render::maskModeToString | ( | MaskMode | m | ) |
| QPolygonF OpenSWMM::Render::offsetPolyline | ( | const QPolygonF & | input, |
| qreal | offsetPx, | ||
| qreal | miterLimit = kDefaultMiterLimit |
||
| ) |
Offset input perpendicular to each segment by offsetPx.
Positive \p offsetPx shifts to the right of the polyline's forward direction (start → end). Negative shifts to the left. Zero returns \p input verbatim. \p miterLimit caps how long a miter join is allowed to be relative to \p offsetPx. Joins exceeding this limit fall back to bevels (two vertices instead of one at the corner). Defaults to \ref kDefaultMiterLimit. The returned polyline may have more vertices than the input when bevel joins kick in, and fewer when consecutive vertices coincide.
|
inline |
|
inline |
|
inline |
|
inline |
|
constexprnoexcept |
Inverse of sceneSizeFromPixels — convert a scene-space offset back to its on-screen pixel size at the current zoom.
Useful for hit-testing (is the cursor within N px of a feature?) and for diagnostic readouts.
|
inline |
Premultiply one straight-alpha colour channel for QSGVertexColorMaterial, which samples vertex colours as PREMULTIPLIED alpha (Qt scene-graph contract). Feeding straight-alpha colours makes the compositor un-premultiply them on blend, clamping every semi-transparent fill toward saturation — ochre → pure yellow, hillshaded tan → salmon pink, and the off-white high-terrain stops → background white, which reads as the mesh being "truncated" at far zoom. At alpha 0 a straight-alpha colour blends ADDITIVELY (One / OneMinusSrcAlpha), painting its raw RGB over whatever is beneath — a fully transparent classification band must premultiply to (0,0,0,0) to disappear.
|
inline |
|
inline |
| MaskClipResult OpenSWMM::Render::resolveMaskClip | ( | OpenSWMMVisLayer * | hostLayer, |
| const MaskSpec & | spec | ||
| ) |
Resolve spec against hostLayer's workspace.
Walks the source layer's polygon features and builds a single `QPainterPath` (union of all features). Returns `ok=false` when the spec is disabled, the source can't be found, the source isn't a polygon vector layer, or no polygon features have geometry. Pure function — no caching, no observer registration. The host calls this once per paint; small / moderate source layers (study-area / watershed boundaries are typically single polygons) make this cheap. Consumed by QPainter-based hosts (SWMM1D / 2D mesh / 2D results graphics items) via `QPainter::setClipPath`. The QSG-rendered SWMM2DMeshQSGRenderer doesn't apply the clip in v1 — QSGClipNode requires triangulating the path into a stencil mesh, which is the named Z.14-paint-qsg follow-up.
| QVector< double > OpenSWMM::Render::sampleBreaksAcrossFrames | ( | const IntervalBinner & | binner, |
| const QVector< QVector< double > > & | perFrameValues, | ||
| double | sampleRate = 0.2 |
||
| ) |
Pick perFrameValues at sampleRate fraction (≥ 1 frame), flatten the selected frames' values, and call IntervalBinner::computeBreaks() on the flat sample.
sampleRate is clamped to [0, 1]. A sampleRate of 1.0 uses every frame; 0.2 (default) picks 20% of frames evenly spaced starting at index 0 — matching the plan's §14.1 default. A sampleRate ≤ 0 falls back to "always sample at least one
frame" so callers don't have to special-case empty input.
Returns an empty QVector when perFrameValues is empty. When the binner's method is Manual, computeBreaks() simply returns the binner's existing manualBreaks() — so callers can use this helper uniformly without branching on method.
The set of selected frames is deterministic: index 0 first, then index = round(i * stride) for i in [1, k-1], where k = ceil(sampleRate * frameCount). This means the first and last frames are always sampled when sampleRate is high enough.
| QVector< int > OpenSWMM::Render::sampledFrameIndices | ( | int | frameCount, |
| double | sampleRate | ||
| ) |
Indices of the frames the sampler would pick, for the same frameCount and sampleRate. Pure function — useful for tests and for showing the user which frames were sampled. Returns an empty vector when frameCount == 0.
|
constexprnoexcept |
Convert a screen-pixel size to a scene-space offset.
| pixelSize | Target size on screen, in CSS pixels (≥ 0). |
| pixelsPerSceneUnit | Current view scale factor (|matrix.m11()|). Must be strictly positive — degenerate matrices (zoom = 0) return 0 to avoid divide-by-zero. |
pixelSize on screen.Examples: sceneSizeFromPixels(6, 100) == 0.06 // 6 px when 100 px per scene unit sceneSizeFromPixels(6, 10) == 0.6 // same 6 px when zoomed out 10× sceneSizeFromPixels(6, 1000) == 0.006 // same 6 px when zoomed in 10×
| void OpenSWMM::Render::setSymbolLayerLevel | ( | SymbolLayer & | layer, |
| int | level | ||
| ) |
Write the level into a SymbolLayer's props.
| SymbolLayerKind OpenSWMM::Render::symbolLayerKindFromString | ( | const QString & | s | ) |
Parses the JSON string token back into a SymbolLayerKind.
| QString OpenSWMM::Render::symbolLayerKindToString | ( | SymbolLayerKind | kind | ) |
Returns the JSON string token for a SymbolLayerKind.
| int OpenSWMM::Render::symbolLayerLevel | ( | const SymbolLayer & | layer | ) |
Read the level for one SymbolLayer. Returns 0 when the prop is absent or non-numeric.
| TemporalMode OpenSWMM::Render::temporalModeFromString | ( | const QString & | s | ) |
| QString OpenSWMM::Render::temporalModeToString | ( | TemporalMode | m | ) |
|
inlineconstexpr |
Default miter limit (length ratio) before the algorithm falls back to a bevel join. Mirrors QPen's default of 2.0 — a miter is rejected when its length exceeds 2× the offset distance. Lower → more bevels; higher → spikier joins at sharp angles.
|
inlineconstexpr |
Canonical SymbolLayer::props key holding the integer paint level. Missing → default level 0. Lower levels paint first.