Struct RenderSessionSnapshot
- Namespace
- Maplibre.NativeFfi
- Assembly
- Maplibre.NativeFfi.dll
The state of a render session at one moment.
public readonly record struct RenderSessionSnapshot : IEquatable<RenderSessionSnapshot>
- Implements
- Inherited Members
Remarks
See mln_render_session_snapshot in the C API reference.
Constructors
RenderSessionSnapshot(RenderSessionState, LogicalExtent, ulong, ulong, uint, Status, bool)
The state of a render session at one moment.
public RenderSessionSnapshot(RenderSessionState State, LogicalExtent Extent, ulong Generation, ulong FrameGeneration, uint AcquiredFrameCount, Status FailureStatus, bool HasTarget)
Parameters
StateRenderSessionStateExtentLogicalExtentThe target's logical size, and the map's scale factor.
GenerationulongFrameGenerationulongAcquiredFrameCountuintFailureStatusStatusStatus.Okuntil the session fails. ThenStatus.TargetLostwhen it failed because it lost its target, orStatus.NativeErrorwhen it failed for another reason.HasTargetboolWhether the session is attached and has a target to render to. It's false from when
RenderSessionHandle.ReleaseTargetAsync()completes until you give the session a new target.
Remarks
See mln_render_session_snapshot in the C API reference.
Properties
AcquiredFrameCount
public uint AcquiredFrameCount { get; init; }
Property Value
Extent
The target's logical size, and the map's scale factor.
public LogicalExtent Extent { get; init; }
Property Value
FailureStatus
Status.Ok until the session fails. Then Status.TargetLost when
it failed because it lost its target, or Status.NativeError when it
failed for another reason.
public Status FailureStatus { get; init; }
Property Value
FrameGeneration
public ulong FrameGeneration { get; init; }
Property Value
Generation
public ulong Generation { get; init; }
Property Value
HasTarget
Whether the session is attached and has a target to render to. It's false
from when RenderSessionHandle.ReleaseTargetAsync() completes until
you give the session a new target.
public bool HasTarget { get; init; }
Property Value
State
public RenderSessionState State { get; init; }