Function

Gdkcairo_surface_create_from_pixbuf

Declaration [src]

cairo_surface_t*
gdk_cairo_surface_create_from_pixbuf (
  const GdkPixbuf* pixbuf,
  int scale,
  GdkWindow* for_window
)

Description [src]

Creates an image surface with the same contents as the pixbuf.

Available since:3.10

Parameters

pixbuf GdkPixbuf
 

A GdkPixbuf.

 The data is owned by the caller of the function.
scale int
 

The scale of the new surface, or 0 to use same as window.

for_window GdkWindow
 

The window this will be drawn to, or NULL.

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

Return value

Returns: cairo_surface_t
 

A new cairo surface, must be freed with cairo_surface_destroy()

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