CanvasImage
Description:
public CanvasImage (CanvasItem? parent, Pixbuf? pixbuf, double x, double y, ...)
Creates a new image item.
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> GooCanvasItem *image = goo_canvas_image_new (mygroup, pixbuf, 100.0, 100.0, NULL); < /programlisting></informalexample>
This example creates an image scaled to a size of 200x200:
<informalexample><programlisting> GooCanvasItem *image = goo_canvas_image_new (mygroup, pixbuf, 100.0, 100.0, "width", 200.0, "height", 200.0, "scale-to-fit", TRUE, NULL); </programlisting></informalexample>
Parameters:
parent |
the parent item, 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. |
Returns:
a new image item. |