Table of Contents

Class SkiaCoverageArrowRenderer

Namespace
EncDotNet.S100.Renderers.Skia
Assembly
EncDotNet.S100.Renderers.Skia.dll

Draws oriented overlay symbols (e.g. S-111 surface-current arrows) from a SymbolScheme directly onto an SKCanvas, with no Mapsui dependency. This is the headless, direct-Skia analogue of MapsuiCoverageArrowRenderer: it shares the same per-band scaling contract (S-111 Ed 2.0.0, content/S111/pc/Rules/select_arrow.xsl) and palette-token SVG processing, but rasterises each arrow with Svg.Skia.SKSvg and projects grid-cell centres through WebMercator instead of Mapsui's navigator.

public sealed class SkiaCoverageArrowRenderer
Inheritance
SkiaCoverageArrowRenderer
Inherited Members

Properties

BaseSymbolScale

Multiplier applied to each band's scale factor. Callers fold the user-facing RenderContext.SymbolScale into this value so the symbol-scale preference continues to affect arrow size.

public double BaseSymbolScale { get; init; }

Property Value

double

Palette

The colour palette used to resolve SVG CSS fill/stroke tokens (e.g. fSCBN1 → palette token SCBN1).

public ColorPalette? Palette { get; init; }

Property Value

ColorPalette

SymbolProvider

Returns raw SVG content for a symbol reference name (e.g. "SCAROW01"), or null when unavailable.

public required Func<string, string?> SymbolProvider { get; init; }

Property Value

Func<string, string>

Methods

Draw(SKCanvas, StyledCoverageLayer, ICrsTransform, Func<(double X, double Y), (float X, float Y)>)

Draws the layer's symbol scheme onto canvas. Each grid cell that survives thinning becomes one rotated, palette-coloured symbol placed at its projected pixel position. No-ops when the layer has no symbol scheme.

public void Draw(SKCanvas canvas, StyledCoverageLayer layer, ICrsTransform nativeToWgs84, Func<(double X, double Y), (float X, float Y)> project)

Parameters

canvas SKCanvas

Target canvas (already sized / cleared by the caller).

layer StyledCoverageLayer

The styled coverage layer carrying the symbol scheme.

nativeToWgs84 ICrsTransform

Transform from the grid's native CRS to WGS84 (EPSG:4326); pass Instance for geographic grids.

project Func<(double X, double Y), (float X, float Y)>

Projects an EPSG:3857 (x, y) world coordinate to an output pixel.

Remarks

Thinning uses the S-98 Appendix G-1.1 grid algorithm (ThinGrid(int, int, ReadOnlySpan<double>, ReadOnlySpan<double>, ReadOnlySpan<float>, ReadOnlySpan<float>, double, SymbolRect, double, List<int>)) over the canvas's clip bounds, with the same arrow length and Rmax as MapsuiCoverageArrowRenderer, so a headless render and the viewer draw the same arrows for the same view.