GooCanvas.CanvasImageModel

g GObject.GInterface GObject.GInterface GooCanvas.CanvasItemModel GooCanvas.CanvasItemModel GObject.GInterface->GooCanvas.CanvasItemModel GObject.Object GObject.Object GooCanvas.CanvasItemModelSimple GooCanvas.CanvasItemModelSimple GObject.Object->GooCanvas.CanvasItemModelSimple GooCanvas.CanvasImageModel GooCanvas.CanvasImageModel GooCanvas.CanvasItemModel->GooCanvas.CanvasItemModelSimple GooCanvas.CanvasItemModelSimple->GooCanvas.CanvasImageModel

Subclasses:

None

Methods

Inherited:

GObject.Object (37), GooCanvas.CanvasItemModel (30)

Structs:

GObject.ObjectClass (5)

Virtual Methods

Inherited:

GObject.Object (7), GooCanvas.CanvasItemModel (19)

Properties

Inherited:

GooCanvas.CanvasItemModelSimple (23), GooCanvas.CanvasItemModel (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.CanvasItemModel (6)

Fields

Inherited:

GObject.Object (1), GooCanvas.CanvasItemModel (6)

Name

Type

Access

Description

image_data

GooCanvas.CanvasImageData

r

parent_object

GooCanvas.CanvasItemModelSimple

r

Class Details

class GooCanvas.CanvasImageModel(**kwargs)
Bases:

GooCanvas.CanvasItemModelSimple

Abstract:

No

Structure:

GooCanvas.CanvasImageModelClass

GooCanvas.CanvasImageModel represent a model for image items.

It is usually necessary to set the “scale-to-fit” property to True to scale the image to fit the given rectangle. When using units other than %GTK_UNIT_PIXEL it is also necessary to set the “width” and “height” properties to set the desired size.

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

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

To create a GooCanvas.CanvasImageModel use goo_canvas_image_model_new().

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

To respond to events such as mouse clicks on the image you must connect to the signal handlers of the corresponding GooCanvas.CanvasImage objects. (See GooCanvas.Canvas.get_item() and GooCanvas.Canvas ::item-created.)

Property Details

GooCanvas.CanvasImageModel.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.CanvasImageModel.props.height
Name:

height

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The height of the image

GooCanvas.CanvasImageModel.props.pattern
Name:

pattern

Type:

Default Value:

None

Flags:

READABLE, WRITABLE

The cairo pattern to paint

GooCanvas.CanvasImageModel.props.pixbuf
Name:

pixbuf

Type:

GdkPixbuf.Pixbuf

Default Value:

None

Flags:

WRITABLE

The GdkPixbuf.Pixbuf to display

GooCanvas.CanvasImageModel.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.CanvasImageModel.props.width
Name:

width

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The width of the image

GooCanvas.CanvasImageModel.props.x
Name:

x

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The x coordinate of the image

GooCanvas.CanvasImageModel.props.y
Name:

y

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The y coordinate of the image