[ CCode ( type_id = "shumate_vector_sprite_sheet_get_type ()" ) ]
[ Version ( since = "1.1" ) ]
public sealed class VectorSpriteSheet : Object
A collection of [class@VectorSprite]s.
Sprites are used as icons in symbols or as the pattern for a fill layer.
Most MapLibre stylesheets provide their spritesheet as a PNG image and a JSON description of the sprites. This spritesheet can be added using [method@VectorSpriteSheet.add_page]. Sprites can also be added individually using [method@VectorSpriteSheet.add_sprite].
Some map styles rely on application code to provide some or all of their sprites. This is supported using a fallback function, which can be set using [method@VectorSpriteSheet.set_fallback]. This function can generate sprites on demand. For example, it could load a symbolic icon from the [class@Gtk.IconTheme] or render a custom highway shield.
Map styles should provide a double resolution spritesheet for high DPI displays. That spritesheet can be added as a separate page. The [ class@VectorSpriteSheet] will pick the best sprites for the display's scale factor.
If a fallback function is set, it receives the requested scale factor as an argument. It should use this to generate the sprite at the correct size. For example, if the scale factor is 2, the image should be twice as large (but the *sprite's* width and height should be the same).
[class@VectorSpriteSheet] is thread safe.