Shumate.VectorSpriteSheet.set_fallback

### Method

# Shumate VectorSpriteSheetset_fallback

since: 1.1

#### Declaration [src]

    void
    shumate_vector_sprite_sheet_set_fallback (
      ShumateVectorSpriteSheet* self,
      ShumateVectorSpriteFallbackFunc fallback,
      gpointer user_data,
      GDestroyNotify notify
    )

#### Description [src]

Sets a fallback function to generate sprites.

The fallback function is called when a texture is not found in the sprite sheet. It receives the icon name and scale factor, and should return a `ShumateVectorSprite`, or `NULL` if the icon could not be generated. It may be called in a different thread, and it may be called multiple times for the same icon name.

If a previous fallback function was set, it will be replaced and any sprites it generated will be cleared.

`fallback` may be `NULL` to clear the fallback function.

Available since: 1.1

#### Parameters

`fallback`

  Type: `ShumateVectorSpriteFallbackFunc`

  A `ShumateVectorSpriteFallbackFunc` or `NULL`.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  User data to pass to `fallback`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`notify`

  Type: `GDestroyNotify`

  A `GDestroyNotify` for `user_data`.