Class RefreshRequest
Describes what needs to be redrawn on the next render cycle. Either the full viewport (Full) or a partial dirty rectangle in a specific CoordinateSpace. Accumulate consecutive requests with Accumulate(RefreshRequest).
Implements
Inherited Members
Namespace: Mapsui
Assembly: Mapsui.dll
Syntax
public sealed record RefreshRequest : IEquatable<RefreshRequest>
Constructors
| Edit this page View SourceRefreshRequest(MRect)
Creates a partial refresh request for the given world-coordinate rectangle.
Declaration
public RefreshRequest(MRect dirtyRect)
Parameters
| Type | Name | Description |
|---|---|---|
| MRect | dirtyRect |
RefreshRequest(MRect, CoordinateSpace)
Creates a partial refresh request for the given rectangle in the specified coordinate space.
Declaration
public RefreshRequest(MRect dirtyRect, CoordinateSpace coordinateSpace)
Parameters
| Type | Name | Description |
|---|---|---|
| MRect | dirtyRect | |
| CoordinateSpace | coordinateSpace |
Fields
| Edit this page View SourceFull
Singleton representing a full-viewport refresh.
Declaration
public static readonly RefreshRequest Full
Field Value
| Type | Description |
|---|---|
| RefreshRequest |
Properties
| Edit this page View SourceCoordinateSpace
Whether DirtyRect is in world or screen coordinates. Irrelevant when IsFullRefresh is true.
Declaration
public CoordinateSpace CoordinateSpace { get; }
Property Value
| Type | Description |
|---|---|
| CoordinateSpace |
DirtyRect
The dirty region to redraw, or null when this is a full refresh. Its coordinate space is given by CoordinateSpace.
Declaration
public MRect? DirtyRect { get; }
Property Value
| Type | Description |
|---|---|
| MRect |
IsFullRefresh
Returns true when the entire viewport must be redrawn.
Declaration
public bool IsFullRefresh { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceAccumulate(RefreshRequest)
Returns a RefreshRequest that covers the union of this request and
other. If either is a full refresh, or the two requests use different
coordinate spaces, the result is always Full; otherwise the dirty rectangles
are joined within the shared coordinate space.
Declaration
public RefreshRequest Accumulate(RefreshRequest other)
Parameters
| Type | Name | Description |
|---|---|---|
| RefreshRequest | other |
Returns
| Type | Description |
|---|---|
| RefreshRequest |