goocanvas.ImageModel
Prev | PyGooCanvas Canvas Item Models Reference | Next

## goocanvas.ImageModel

goocanvas.ImageModel — A model for image items.

## Synopsis

    class goocanvas.ImageModel(goocanvas.ItemModelModelSimple):
        goocanvas.ImageModel(properties=None)

## Ancestry

    +-- gobject.GObject
    	+-- goocanvas.ItemModelModelSimple
    		+-- goocanvas.ImageModel

## goocanvas.ImageModel Properties

"height" | Read/Write | The height of the image. Allowed values: >= 0. Default value: 0.
"pattern" | Read/Write | The cairo pattern to paint.
"pixbuf" | Write | The GdkPixbuf to display.
"width" | Read/Write | The width of the image. Allowed values: >= 0 Default value: 0.
"x" | Read/Write | The x coordinate of the image. Default value: 0.
"y" | Read/Write | The y coordinate of the image. Default value: 0.

## Implemented Interfaces

`goocanvas.ImageModel` implements `goocanvas.ItemModel`

## Description

`goocanvas.ImageModel` represents an image item. It is a subclass of `goocanvas.ItemModelModelSimple` and so inherits all of the style properties such as "operator" and "pointer-events". It also implements the `goocanvas.ItemModel` interface, so you can use the `goocanvas.ItemModel` functions such as `goocanvas.ItemModel.raise_()` and `goocanvas.ItemModel.rotate()`

## Constructor

        goocanvas.ImageModel(properties=None)

`properties` : | A comma separated list of properties.
Returns : | A new `goocanvas.ImageModel`

Creates a new canvas model image item.

Here's an example showing how to create an image model at (100.0, 100.0), using the given pixbuf at its natural width and height:

    image = goocanvas.ImageModel(pixbuf=pixbuf, x=100, y=100)

Prev | Up | Next
goocanvas.GroupModel | Home | goocanvas.PathModel