Interface IHeadlessImageRenderer
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
widthPixelsintOutput bitmap width in pixels.
heightPixelsintOutput bitmap height in pixels.
contextRenderContextOptional spec-specific render context (palette, symbol/text scale, ECDIS display, selected time step). When
nullthe processor renders with its defaults.backgroundRgbaColor?Optional background fill; defaults to opaque white when
null.cancellationTokenCancellationTokenCancellation token.
Returns
Exceptions
- NotSupportedException
Thrown when this processor implements the capability in general but the specific dataset shape cannot be rendered headlessly.