Interface IDynamicFeaturePortrayal
- Namespace
- EncDotNet.S100.Portrayals.Application
- Assembly
- EncDotNet.S100.Portrayals.dll
A code-defined portrayal of the features of an IDynamicFeatureSource: S-100 Part 9 drawing instructions, built with an InstructionBuilder, plus the palette and symbols they resolve against.
public interface IDynamicFeaturePortrayal
Remarks
A dynamic source's features are drawn by a host-specific renderer (for
Mapsui, PortrayedDynamicFeatureRenderer in
EncDotNet.S100.Renderers.Mapsui). A portrayal keeps the symbology
renderer-neutral, so the same instructions draw on the map, headless, and
in tests, by the same rules as a vector product's: symbol and text scale,
SCAMIN and rotation.
Each instruction's feature reference is the feature's Id; resolve geometry with DynamicFeatureGeometryProvider. Implementations must be pure functions of the feature and safe to call from any thread.
Properties
Palette
The palette the instructions' colour tokens and the symbols' palette classes resolve against.
ApplicationPalette Palette { get; }
Property Value
SymbolProvider
Resolves a symbol reference to its S-100 SVG, or null for an unknown one.
Func<string, string?> SymbolProvider { get; }
Property Value
Methods
CanPortray(DynamicFeature)
Whether this portrayal draws feature.
bool CanPortray(DynamicFeature feature)
Parameters
featureDynamicFeatureThe feature.
Returns
Portray(DynamicFeature)
The drawing instructions of feature; empty when it has nothing to draw.
IReadOnlyList<DrawingInstruction> Portray(DynamicFeature feature)
Parameters
featureDynamicFeatureThe feature.