Table of Contents

Interface IHeadlessImageRenderer

Namespace
EncDotNet.S100.Datasets.Pipelines
Assembly
EncDotNet.S100.Datasets.Pipelines.dll

Capability implemented by dataset processors that can rasterise their portrayal to a standalone SKBitmap through the headless, backend-agnostic Skia core (vector products via HeadlessVectorRenderer; coverage products via the direct Skia coverage / arrow renderers) — bypassing Mapsui entirely.

public interface IHeadlessImageRenderer

Remarks

This is a separate capability interface rather than a member of IDatasetProcessor because headless rendering is not universal: some processor shapes (e.g. S-104 / S-111 fixed-station datasets, S-57) do not yet have a Mapsui-free render path. Callers should feature-test with processor is IHeadlessImageRenderer and surface a clear "headless rendering not supported" message when the cast fails.

Implementations that do implement this interface but encounter an unsupported dataset shape at render time (e.g. a fixed-station coverage variant) throw NotSupportedException with a descriptive message.

Methods

RenderHeadlessAsync(int, int, RenderContext?, RgbaColor?, CancellationToken)

Renders the dataset to a standalone SKBitmap of the requested pixel dimensions, bypassing Mapsui.

Task<SKBitmap> RenderHeadlessAsync(int widthPixels, int heightPixels, RenderContext? context = null, RgbaColor? background = null, CancellationToken cancellationToken = default)

Parameters

widthPixels int

Output bitmap width in pixels.

heightPixels int

Output bitmap height in pixels.

context RenderContext

Optional spec-specific render context (palette, symbol/text scale, ECDIS display, selected time step). When null the processor renders with its defaults.

background RgbaColor?

Optional background fill; defaults to opaque white when null.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<SKBitmap>

A newly allocated bitmap owned by the caller.

Exceptions

NotSupportedException

Thrown when this processor implements the capability in general but the specific dataset shape cannot be rendered headlessly.