Class MapPresentationState
Immutable, renderer-neutral snapshot of the presentation choices shared by every dataset on an S-100 map.
public sealed class MapPresentationState
- Inheritance
-
MapPresentationState
- Inherited Members
Remarks
The ECDIS snapshot includes the cross-product category, viewing-group and display-plane overrides, and product-specific S-100 Part 9 §11.7 display modes. Collection values are defensively copied so later mutations of the source settings cannot affect an in-flight render.
Viewport, time-step, basemap, and output-filter choices remain on RenderContext because they vary by dataset or render request.
Constructors
MapPresentationState(PaletteType, double, double, EcdisDisplaySettings, MarinerSettings)
Creates an immutable map presentation snapshot.
public MapPresentationState(PaletteType palette, double symbolScale, double textScale, EcdisDisplaySettings ecdisDisplay, MarinerSettings mariner)
Parameters
palettePaletteTypeThe S-100 colour palette.
symbolScaledoubleGlobal symbol scale factor.
textScaledoubleGlobal text scale factor.
ecdisDisplayEcdisDisplaySettingsCross-product ECDIS settings, including product-specific display modes.
marinerMarinerSettingsMariner-configurable portrayal settings.
Exceptions
- ArgumentNullException
ecdisDisplayormarinerisnull.
Properties
Default
The standard Day-palette presentation with default scales, ECDIS settings, and mariner selections.
public static MapPresentationState Default { get; }
Property Value
DepthAdjustment
The water level added to charted depths across the map (S-98 Appendix D), or null when depths are portrayed as charted.
public IDepthAdjustment? DepthAdjustment { get; }
Property Value
EcdisDisplay
Cross-product ECDIS settings, including product-specific S-100 Part 9 §11.7 display-mode selections.
public EcdisDisplaySettings EcdisDisplay { get; }
Property Value
Mariner
Mariner-configurable portrayal settings.
public MarinerSettings Mariner { get; }
Property Value
Palette
The S-100 colour palette applied across the map.
public PaletteType Palette { get; }
Property Value
SymbolScale
Global symbol scale factor, where 1.0 is the default.
public double SymbolScale { get; }
Property Value
TextScale
Global text scale factor, where 1.0 is the default.
public double TextScale { get; }
Property Value
Methods
ApplyTo(RenderContext, SpecRef)
Applies this map-wide snapshot to a dataset-specific render context.
public RenderContext ApplyTo(RenderContext context, SpecRef portrayalSpec)
Parameters
contextRenderContextThe context carrying dataset- or request-specific choices to preserve.
portrayalSpecSpecRefThe specification whose portrayal catalogue processes the dataset.
Returns
- RenderContext
A copy of
contextcontaining this presentation and the product-specific display mode selected forportrayalSpec.
Exceptions
- ArgumentNullException
contextisnull.- ArgumentException
portrayalSpecis unset.
CreateRenderContext(IDatasetProcessor, DateTime?)
Creates the render context for a processor and applies this map-wide presentation snapshot.
public RenderContext CreateRenderContext(IDatasetProcessor processor, DateTime? timeStep = null)
Parameters
processorIDatasetProcessorThe processor whose portrayal specification selects the per-spec display settings.
timeStepDateTime?The selected sample for a time-aware product, or null for an unset map clock. Static products ignore it.
Returns
- RenderContext
A render context carrying this presentation and the requested time step.
Exceptions
- ArgumentNullException
processorisnull.- ArgumentException
The processor's portrayal specification is unset.
WithDepthAdjustment(IDepthAdjustment?)
Returns a copy with a different depth adjustment.
public MapPresentationState WithDepthAdjustment(IDepthAdjustment? depthAdjustment)
Parameters
depthAdjustmentIDepthAdjustmentThe adjustment, or null for charted depths.
Returns
- MapPresentationState
A new presentation state.
WithEcdisDisplay(EcdisDisplaySettings)
Returns a copy of this snapshot with EcdisDisplay replaced. The supplied settings are defensively snapshotted, matching the constructor.
public MapPresentationState WithEcdisDisplay(EcdisDisplaySettings ecdisDisplay)
Parameters
ecdisDisplayEcdisDisplaySettingsThe ECDIS display settings to apply.
Returns
Exceptions
- ArgumentNullException
ecdisDisplayisnull.
WithMariner(MarinerSettings)
Returns a copy of this snapshot with Mariner replaced.
public MapPresentationState WithMariner(MarinerSettings mariner)
Parameters
marinerMarinerSettingsThe mariner-configurable portrayal settings.
Returns
Exceptions
- ArgumentNullException
marinerisnull.
WithPalette(PaletteType)
Returns a copy of this snapshot with Palette replaced.
public MapPresentationState WithPalette(PaletteType palette)
Parameters
palettePaletteTypeThe colour palette to apply.
Returns
WithSymbolScale(double)
Returns a copy of this snapshot with SymbolScale replaced.
public MapPresentationState WithSymbolScale(double symbolScale)
Parameters
symbolScaledoubleThe global symbol scale factor.
Returns
WithTextScale(double)
Returns a copy of this snapshot with TextScale replaced.
public MapPresentationState WithTextScale(double textScale)
Parameters
textScaledoubleThe global text scale factor.