Search Results for

    Show / Hide Table of Contents

    Namespace Mapsui.Rendering

    Classes

    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.

    DefaultRendererFactory

    DrawableCache

    Caches drawable objects per (feature, style) combination. Thread-safe: drawables are created on a background thread and read on the UI thread. Uses strict iteration-based eviction: anything not stamped with the current iteration is removed on Cleanup(long).

    MapInfoRecord

    RenderController

    RenderException

    Exception thrown when a layer rendering fails

    RenderService

    TileDrawableCache

    Drawable cache for tile layers with LRU-style eviction based on render iteration. Keeps more tiles than strictly needed so that zooming in/out doesn't immediately discard previously rendered tiles.

    VisibleFeatureIterator

    Structs

    DrawableCacheKey

    Composite key for caching drawables, combining feature and style generation IDs. When either the feature or style is modified (calling Modified()), the GenerationId changes, causing the old cache entry to become stale and a new drawable to be created.

    Interfaces

    IDrawable

    Represents a pre-created rendering object that can be drawn quickly on the render thread. Drawables store world coordinates and pre-built platform-specific objects (e.g. SKPath, SKPaint) so that the draw step on the UI thread is minimal.

    IDrawableCache

    Interface for caches that store pre-created drawable objects per (feature, style) combination. Different implementations can use different eviction strategies (e.g. strict iteration-based for regular layers, LRU for tile layers). Each entry is stamped with the iteration at which it was last used.

    IDrawableImage

    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).

    IMapRenderer

    IRenderer

    ITwoStepStyleRenderer

    Optional interface that style renderers can implement to support two-step rendering with background preparation. The caching is managed externally by the drawable renderer orchestrator (background thread) and the map renderer (render thread). Renderers that implement this interface do NOT interact with the cache directly.

    When a renderer implements this interface:

    1. CreateCache() is called once per layer to create the appropriate cache type.
    2. CreateDrawable(Viewport, ILayer, IFeature, IStyle, RenderService) is called on a background thread — the caller stores the returned drawable in the cache.
    3. On the render thread, the caller fetches the cached drawable and passes it to DrawDrawable(object, Viewport, IDrawable, ILayer).

    Renderers that do NOT implement this interface work as before — everything runs on the render thread via ISkiaStyleRenderer.Draw.

    Enums

    RenderFormat

    Formats the MapRenderer should render to

    In this article
    Back to top Generated by DocFX