Method

StTextureCacheload_file_to_cairo_surface

Declaration [src]

cairo_surface_t*
st_texture_cache_load_file_to_cairo_surface (
  StTextureCache* cache,
  GFile* file,
  gint paint_scale,
  gfloat resource_scale
)

Description [src]

This function synchronously loads the given file path into a cairo surface. On error, a warning is emitted and NULL is returned.

Parameters

file

Type: GFile

A GFile in supported image format.

The data is owned by the caller of the method.
paint_scale

Type: gint

Scale factor of the display.

resource_scale

Type: gfloat

Resource scale factor.

Return value

Type: cairo_surface_t

A new #cairo_surface_t.

The caller of the method takes ownership of the data, and is responsible for freeing it.