Class CompositeDrawable
A drawable that wraps multiple child drawables into a single cache entry. Used when a single feature produces multiple drawable objects (e.g. a GeometryCollection with polygons and lines, or a feature with multiple coordinates). The composite uses the centroid of all children's world positions.
Inherited Members
Namespace: Mapsui.Rendering
Assembly: Mapsui.dll
Syntax
public sealed class CompositeDrawable : IDrawable, IDisposable
Constructors
| Edit this page View SourceCompositeDrawable(IReadOnlyList<IDrawable>)
Creates a new CompositeDrawable from the given children.
Declaration
public CompositeDrawable(IReadOnlyList<IDrawable> children)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<IDrawable> | children | The child drawables. Must not be empty. |
Properties
| Edit this page View SourceChildren
The child drawables. Owned by this composite and disposed with it.
Declaration
public IReadOnlyList<IDrawable> Children { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<IDrawable> |
WorldX
The world X coordinate of this drawable (used to position it via viewport transform at draw time).
Declaration
public double WorldX { get; }
Property Value
| Type | Description |
|---|---|
| double |
WorldY
The world Y coordinate of this drawable (used to position it via viewport transform at draw time).
Declaration
public double WorldY { get; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
| Edit this page View SourceDispose()
Disposes all child drawables.
Declaration
public void Dispose()