Creates a new image model.
Here's an example showing how to create an image at (100.0, 100.0), using the given pixbuf at its natural width and height:
<informalexample><programlisting> GooCanvasItemModel *image = goo_canvas_image_model_new (mygroup, pixbuf, 100.0, 100.0, NULL); </programlisting></informalexample>
This example creates an image scaled to a size of 200x200:
<informalexample><programlisting> GooCanvasItemModel *image = goo_canvas_image_model_new (mygroup, pixbuf, 100.0, 100.0, "width", 200.0, "height", 200.0, "scale-to-fit", TRUE, NULL); </programlisting></informalexample>
parent |
the parent model, or null. If a parent is specified, it will assume ownership of the item, and the item will automatically be freed when it is removed from the parent. Otherwise call unref to free it. |
pixbuf |
the Pixbuf containing the image data, or null. |
x |
the x coordinate of the image. |
y |
the y coordinate of the image. |
... |
optional pairs of property names and values, and a terminating null. |
a new image model. |