AppStreamCompose.Canvas

g AppStreamCompose.Canvas AppStreamCompose.Canvas GObject.Object GObject.Object GObject.Object->AppStreamCompose.Canvas

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (width, height)

get_height ()

get_width ()

render_svg (stream)

save_png (fname)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class AppStreamCompose.Canvas(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AppStreamCompose.CanvasClass

classmethod new(width, height)
Parameters:
  • width (int) –

  • height (int) –

Returns:

an AppStreamCompose.Canvas

Return type:

AppStreamCompose.Canvas

Creates a new #AscFont.

get_height()
Return type:

int

Gets the canvas height.

get_width()
Return type:

int

Gets the canvas width.

render_svg(stream)
Parameters:

stream (Gio.InputStream) – SVG data input stream.

Raises:

GLib.Error

Return type:

bool

Render an SVG graphic from the SVG data provided.

save_png(fname)
Parameters:

fname (str) – Filename to save to.

Raises:

GLib.Error

Return type:

bool

Save canvas to PNG file.