Package-level declarations
Functions
Gets a picture ready to be drawn from its bytes. Needed in the browser only: there a picture can only be decoded asynchronously, so a shape whose look is a picture given as ImageRef.Bytes shows its placeholder until this has finished for those bytes; call it (and wait for it) before adding such a shape. On every other platform it does nothing, because the decoding is done when the shape is drawn.
Converts a WWK Position back to our platform-independent GeoPosition.
Converts to WWK's Color. Relies on Kotlin resolving ColorRgba's Int (0-255) fields to WWK's Color(Int, Int, Int, Int) overload, which normalizes each channel to 0f..1f internally — not the Color(Float, Float, Float, Float) overload, which would treat 0-255 values as already-normalized and produce out-of-range colors.
Converts to ShapeAttributes with this style applied to the outline at the given width (screen pixels) — for entities with no interior of their own (currently just DrawnPolyline, whose visible "shape" IS its outline). Mirrors toWwkShapeAttributes but writes outlineColor/outlineImageSource/outlineWidth instead of the interior* properties.
Maps a DrawnMarker to the WWK renderable that actually draws it on the globe.
Converts to PlacemarkAttributes with this style applied to the marker's icon at the given size (a square's side length in screen pixels; for an image, the length of its longest side when the image's size is known — see the comment on the image case below). Same interior-vs-outline reasoning as toWwkLineAttributes: a marker has no interior, so this writes imageColor/ imageSource/imageScale rather than interior*.
Maps a DrawnPolygon to the WWK renderable that actually draws it on the globe.
Maps a DrawnPolyline to the WWK renderable that actually draws it on the globe.
Converts to the WWK position type every renderable/camera API in wwk-adapter expects.
Converts to ShapeAttributes with this style applied to the interior — for entities that have a fillable area (currently just DrawnPolygon). For a line's own color, use toWwkLineAttributes instead.