Image.newFromSurface

Creates a new #GtkImage displaying surface. The #GtkImage does not assume a reference to the surface; you still need to unref it if you own references. #GtkImage will add its own reference rather than adopting yours.

class Image
static
newFromSurface

Parameters

surface cairo.surface.Surface

a #cairo_surface_t, or null

Return Value

Type: gtk.image.Image

a new #GtkImage