Class PortrayedDynamicFeatureRenderer
- Namespace
- EncDotNet.S100.Renderers.Mapsui.DynamicSources
- Assembly
- EncDotNet.S100.Renderers.Mapsui.dll
Draws dynamic features with a code-defined IDynamicFeaturePortrayal: the portrayal's S-100 Part 9 drawing instructions are lowered by the same scene builder a vector product uses, into self-styled Mapsui features (symbol images and labels).
public sealed class PortrayedDynamicFeatureRenderer : IDynamicFeatureRenderer
- Inheritance
-
PortrayedDynamicFeatureRenderer
- Implements
- Inherited Members
Remarks
This is the bridge from the portrayal toolkit
(EncDotNet.S100.Portrayals.Application) to the dynamic-source
overlay host. Symbols take their colours from the portrayal's
ApplicationPalette in the palette PaletteAccessor
returns when the feature is drawn; the host redraws a source's layer on its
next change, so a palette switch shows on the next update.
Like every IDynamicFeatureRenderer it is a pure function of the feature and safe to call from any thread; processed symbols are cached per palette.
Constructors
PortrayedDynamicFeatureRenderer(IDynamicFeaturePortrayal, Func<PaletteType>?)
Creates a renderer for portrayal.
public PortrayedDynamicFeatureRenderer(IDynamicFeaturePortrayal portrayal, Func<PaletteType>? paletteAccessor = null)
Parameters
portrayalIDynamicFeaturePortrayalThe portrayal.
paletteAccessorFunc<PaletteType>The palette to draw in; null for Day.
Properties
PaletteAccessor
The palette features are drawn in.
public Func<PaletteType> PaletteAccessor { get; }
Property Value
SymbolScale
The mariner's symbol scale. Defaults to 1.
public double SymbolScale { get; init; }
Property Value
TextScale
The mariner's text scale. Defaults to 1.
public double TextScale { get; init; }
Property Value
Methods
CanRender(DynamicFeature)
Returns true if this renderer is willing to
produce output for feature. Used by
CompositeDynamicFeatureRenderer for ordered
fallthrough.
public bool CanRender(DynamicFeature feature)
Parameters
featureDynamicFeature
Returns
Render(DynamicFeature)
Produces zero or more Mapsui features for
feature. May return an empty sequence
when the feature is unsupported or degenerate.
public IEnumerable<IFeature> Render(DynamicFeature feature)
Parameters
featureDynamicFeature
Returns
- IEnumerable<IFeature>