Search Results for

    Show / Hide Table of Contents

    Interface IDrawableStyleRenderer

    A style renderer that supports the two-step drawable architecture:

    1. CreateDrawables: Creates platform-specific drawable objects (can run on a background thread).
    2. DrawDrawable: Draws a pre-created drawable to the canvas (runs on the UI thread, should be fast).
    Namespace: Mapsui.Rendering
    Assembly: Mapsui.dll
    Syntax
    public interface IDrawableStyleRenderer : IStyleRenderer

    Methods

    | Edit this page View Source

    CreateDrawables(Viewport, ILayer, IFeature, IStyle, RenderService)

    Creates drawable objects for the given feature and style. This method does the heavy work of creating platform-specific rendering objects (e.g. SKPath, SKPaint) and can be called on a background thread.

    Declaration
    IReadOnlyList<IDrawable> CreateDrawables(Viewport viewport, ILayer layer, IFeature feature, IStyle style, RenderService renderService)
    Parameters
    Type Name Description
    Viewport viewport

    The viewport at the time of creation (used for world coordinate extraction).

    ILayer layer

    The layer containing the feature.

    IFeature feature

    The feature to create drawables for.

    IStyle style

    The style to apply.

    RenderService renderService

    The render service for cache access.

    Returns
    Type Description
    IReadOnlyList<IDrawable>

    A list of drawables representing the feature with the given style.

    | Edit this page View Source

    DrawDrawable(object, Viewport, IDrawable, ILayer)

    Draws a pre-created drawable to the canvas. This should be a fast operation that only applies viewport transforms and calls canvas draw methods.

    Declaration
    void DrawDrawable(object canvas, Viewport viewport, IDrawable drawable, ILayer layer)
    Parameters
    Type Name Description
    object canvas

    The platform-specific canvas (e.g. SKCanvas).

    Viewport viewport

    The current viewport (for world-to-screen transform).

    IDrawable drawable

    The drawable to draw.

    ILayer layer

    The layer containing the feature (for opacity).

    Extension Methods

    DisposableExtension.DisposeIfDisposable(object?)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX