Table of Contents

Interface IVectorSceneRenderer<TSurface>

Namespace
EncDotNet.S100.Rendering.Scene
Assembly
EncDotNet.S100.Rendering.Scene.dll

The named contract a rendering backend implements to draw the backend-agnostic S-100 Part 9 vector intermediate representation (VectorScene) onto a backend-specific drawing surface.

public interface IVectorSceneRenderer<in TSurface>

Type Parameters

TSurface

The backend-specific drawing surface.

Remarks

This is the pluggable rendering-backend seam. Portrayal (IVectorPortrayalSource → VectorSceneBuilder) resolves an S-100 dataset into a fully-resolved VectorScene — world coordinates in EPSG:3857 metres, sizes in logical display pixels, colours resolved to RgbaColor, symbols to processed SVG, ops in Part 9 draw order (see the unit contract on PaintOp). A backend that implements this interface consumes exactly that IR, so an embedder can plug in a renderer (GPU, server-side raster, PDF, SVG, …) that targets neither SkiaSharp nor Mapsui.

Surface generality. The surface type is a type parameter because backends draw onto different targets: the headless Skia backend draws to an SKCanvas; an SVG backend writes to a System.IO.TextWriter / System.Xml.XmlWriter. Implementations should project the ops' world coordinates to output pixels with WorldToScreen (or an equivalent viewport-derived affine) and realise size values (stroke widths, symbol scale, font size) directly in display pixels — not through the world → screen transform.

Not every backend fits a synchronous, pull-style Render(TSurface, VectorScene, Viewport) call. The Mapsui backend, for example, binds a scene to a layer and renders on its own per-frame schedule; it is a conforming consumer of the same IR rather than an implementer of this interface. Implement this interface when your backend can draw a scene to a surface on demand.

Methods

Render(TSurface, VectorScene, Viewport)

Draws the fully-resolved scene onto surface, projecting world coordinates through the affine derived from viewport.

void Render(TSurface surface, VectorScene scene, Viewport viewport)

Parameters

surface TSurface

The backend-specific drawing surface.

scene VectorScene

The resolved paint operations, in Part 9 draw order.

viewport Viewport

The display viewport (geographic bounds + pixel size) to project to.