GooCanvas.CanvasImage

g GObject.GInterface GObject.GInterface GooCanvas.CanvasItem GooCanvas.CanvasItem GObject.GInterface->GooCanvas.CanvasItem GObject.Object GObject.Object GooCanvas.CanvasItemSimple GooCanvas.CanvasItemSimple GObject.Object->GooCanvas.CanvasItemSimple GooCanvas.CanvasImage GooCanvas.CanvasImage GooCanvas.CanvasItem->GooCanvas.CanvasItemSimple GooCanvas.CanvasItemSimple->GooCanvas.CanvasImage

Subclasses:

None

Methods

Inherited:

GooCanvas.CanvasItemSimple (9), GObject.Object (37), GooCanvas.CanvasItem (48)

Structs:

GObject.ObjectClass (5)

Virtual Methods

Inherited:

GooCanvas.CanvasItemSimple (4), GObject.Object (7), GooCanvas.CanvasItem (44)

Properties

Inherited:

GooCanvas.CanvasItemSimple (23), GooCanvas.CanvasItem (9)

Name

Type

Flags

Short Description

alpha

float

r/w

The opacity of the image, 0.0 is fully transparent, and 1.0 is opaque.

height

float

r/w

The height of the image

pattern

r/w

The cairo pattern to paint

pixbuf

GdkPixbuf.Pixbuf

w

The GdkPixbuf.Pixbuf to display

scale-to-fit

bool

r/w

If the image is scaled to fit the width and height settings

width

float

r/w

The width of the image

x

float

r/w

The x coordinate of the image

y

float

r/w

The y coordinate of the image

Signals

Inherited:

GObject.Object (1), GooCanvas.CanvasItem (14)

Fields

Inherited:

GObject.Object (1), GooCanvas.CanvasItem (14)

Name

Type

Access

Description

image_data

GooCanvas.CanvasImageData

r

parent_object

GooCanvas.CanvasItemSimple

r

Class Details

class GooCanvas.CanvasImage(**kwargs)
Bases:

GooCanvas.CanvasItemSimple

Abstract:

No

Structure:

GooCanvas.CanvasImageClass

GooCanvas.CanvasImage represents an image item.

It is usually necessary to set the “scale-to-fit” property to True to scale the image to fit the given rectangle.

It is a subclass of GooCanvas.CanvasItemSimple and so inherits all of the style properties such as “operator” and “pointer-events”.

It also implements the GooCanvas.CanvasItem interface, so you can use the GooCanvas.CanvasItem functions such as GooCanvas.CanvasItem.raise_() and GooCanvas.CanvasItem.rotate().

To create a GooCanvas.CanvasImage use goo_canvas_image_new().

To get or set the properties of an existing GooCanvas.CanvasImage, use g_object_get() and g_object_set().

Property Details

GooCanvas.CanvasImage.props.alpha
Name:

alpha

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

The opacity of the image, 0.0 is fully transparent, and 1.0 is opaque.

GooCanvas.CanvasImage.props.height
Name:

height

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The height of the image

GooCanvas.CanvasImage.props.pattern
Name:

pattern

Type:

Default Value:

None

Flags:

READABLE, WRITABLE

The cairo pattern to paint

GooCanvas.CanvasImage.props.pixbuf
Name:

pixbuf

Type:

GdkPixbuf.Pixbuf

Default Value:

None

Flags:

WRITABLE

The GdkPixbuf.Pixbuf to display

GooCanvas.CanvasImage.props.scale_to_fit
Name:

scale-to-fit

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

If the image is scaled to fit the width and height settings

GooCanvas.CanvasImage.props.width
Name:

width

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The width of the image

GooCanvas.CanvasImage.props.x
Name:

x

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The x coordinate of the image

GooCanvas.CanvasImage.props.y
Name:

y

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The y coordinate of the image