Class HeadlessCompositeScene
A headless composite whose S-98 ordering, suppression and scene lowering are already done, ready to paint against any number of viewports. Build one with Prepare(IReadOnlyList<HeadlessCompositeInput>, HeadlessCompositeOptions?) when rendering the same datasets many times, as a tile pyramid does.
public sealed class HeadlessCompositeScene
- Inheritance
-
HeadlessCompositeScene
- Inherited Members
Remarks
A scene is immutable, and Render(Viewport) and Draw(SKCanvas, Viewport, IReadOnlyList<double>) may be called concurrently from several threads.
Properties
Background
The background Render(Viewport) clears to.
public RgbaColor Background { get; }
Property Value
Basemap
The basemap drawn beneath the chart layers.
public BasemapKind Basemap { get; }
Property Value
HonorScaleVisibility
Whether the vector layers apply scale-visibility culling.
public bool HonorScaleVisibility { get; }
Property Value
Layers
The lowered layers, bottom-most first.
public IReadOnlyList<CompositeLayer> Layers { get; }
Property Value
Methods
Draw(SKCanvas, Viewport, IReadOnlyList<double>)
Paints the basemap and the layers onto canvas against
viewport, without clearing it. Each layer is also drawn
shifted by each of longitudeOffsets (in degrees, for
example −360 and +360), so data stored one world east or west of the
viewport shows up in it; layer order is kept across the copies.
public void Draw(SKCanvas canvas, Viewport viewport, IReadOnlyList<double> longitudeOffsets)
Parameters
canvasSKCanvasThe canvas to paint onto.
viewportViewportA north-up viewport.
longitudeOffsetsIReadOnlyList<double>Extra world copies to draw, in degrees; may be empty.
Render(Viewport)
Renders the scene into a new bitmap of the viewport's pixel size, cleared to Background.
public SKBitmap Render(Viewport viewport)
Parameters
viewportViewportThe viewport to render.
Returns
- SKBitmap
A newly allocated bitmap owned by the caller.
TryGetWorldBounds(out double, out double, out double, out double)
Gets the EPSG:3857 union extent of the active layers. The extent is
seam-aware: for data crossing the antimeridian, maxX
may lie east of +180° (see SeamAwareBoundsAccumulator).
public bool TryGetWorldBounds(out double minX, out double minY, out double maxX, out double maxY)
Parameters
minXdoubleThe western edge, in metres.
minYdoubleThe southern edge, in metres.
maxXdoubleThe eastern edge, in metres.
maxYdoubleThe northern edge, in metres.