Class
ShumateVectorSpriteSheet
since: 1.1
Description [src]
final class Shumate.VectorSpriteSheet : GObject.Object
{
/* No available fields */
}
A collection of ShumateVectorSprite
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
shumate_vector_sprite_sheet_add_page()
. Sprites can also be added individually
using shumate_vector_sprite_sheet_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
shumate_vector_sprite_sheet_set_fallback()
. This function can generate sprites
on demand. For example, it could load a symbolic icon from the GtkIconTheme
or render a custom highway shield.
HiDPI support
Map styles should provide a double resolution spritesheet for high DPI
displays. That spritesheet can be added as a separate page.
The ShumateVectorSpriteSheet
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).
Thread Safety
ShumateVectorSpriteSheet
is thread safe.
Available since: 1.1
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.