Class S100OverscaleCurtainLayer
A reusable Mapsui overlay layer that paints the on-chart overscale "curtain"
(issue #441, S-52 / S-101 AP(OVERSC01) Form A) — a subtle pattern of
evenly spaced vertical lines — over the regions of loaded cells that are being
displayed beyond their compilation scale. A host adds Layer to
its Map.Layers once, then calls Show(IEnumerable<OverscaleRegion>)
as the loaded cells or the viewport zoom change; Clear() empties it.
public sealed class S100OverscaleCurtainLayer
- Inheritance
-
S100OverscaleCurtainLayer
- Inherited Members
Remarks
This is step 8's "overscale curtain as an optional Mapsui module": like the pick-highlight and dataset-extent-indicator layers it depends only on Mapsui, not on the session, a catalogue, an application palette, a view model, or Avalonia. The region geometry is computed by ComputeRegions(IReadOnlyList<OverscaleCellInput>, double) in world (EPSG:3857) coordinates and each region is filled with a shared OverscaleCurtainStyle, whose OverscaleCurtainRenderer draws world-anchored vertical strokes clipped to the region per frame. The pattern therefore stays crisp at any zoom and on HiDPI surfaces and moves with the chart during panning without any per-frame rebuild here.
Because the regions are pan- and rotation-invariant (they depend only on the loaded cells and the viewport resolution), a host recomputes them only when the zoom or the set of loaded cells changes and drives this layer with the result — deciding which cells qualify and honouring any on/off toggle is host policy, so the Viewer keeps that in its own controller.
Not thread-safe: build and mutate it on the host's UI thread, like any other Mapsui layer. It is cheap to rebuild, so every update replaces the layer's contents wholesale.
Constructors
S100OverscaleCurtainLayer(OverscaleCurtainStyle?, string?)
Creates the overlay. Add Layer to a Map.Layers
collection at the z-order the host wants the curtain to appear (above the
chart slice it annotates).
public S100OverscaleCurtainLayer(OverscaleCurtainStyle? style = null, string? name = null)
Parameters
styleOverscaleCurtainStyleAppearance (line spacing, width, colour); defaults to a new OverscaleCurtainStyle. The same instance is shared by every region feature — the renderer only reads it — so one style themes the whole overlay.
namestringLayer name; defaults to DefaultLayerName.
Fields
DefaultLayerName
Default Mapsui.Layers.ILayer.Name for the overlay.
public const string DefaultLayerName = "S-100 Overscale Curtain"
Field Value
Properties
Layer
The Mapsui layer to add to a Map.Layers collection. Starts empty; its
contents are driven by Show(IEnumerable<OverscaleRegion>) and
Clear().
public ILayer Layer { get; }
Property Value
- ILayer
Methods
Clear()
Clears the curtain, leaving the layer attached and empty.
public void Clear()
Show(IEnumerable<OverscaleRegion>)
Replaces the overlay with one curtain-filled polygon per region. Regions with no (or empty) geometry are skipped; an empty collection clears the overlay.
public void Show(IEnumerable<OverscaleRegion> regions)
Parameters
regionsIEnumerable<OverscaleRegion>The overscale-curtain regions to paint, typically from ComputeRegions(IReadOnlyList<OverscaleCellInput>, double).