| crcanvas: A GTK/Cairo Canvas Widget | ||||
|---|---|---|---|---|
CrPixbufCrPixbuf — A item for rendering GdkPixbuf, png files, or a cairo image surface. |
CrPixbuf;
CrItem* cr_pixbuf_new (CrItem *parent,
double x,
double y,
const gchar *first_arg_name,
...);
"anchor" GtkAnchorType : Read / Write "height" gdouble : Read "pattern" CrPattern* : Read "pixbuf" GdkPixbuf* : Read / Write "png" gchar* : Write "scaleable" gboolean : Read / Write "surface" CrSurface* : Write "width" gdouble : Read "x-offset" gdouble : Read / Write "y-offset" gdouble : Read / Write
This canvas item is capable of rendering a GdkPixbuf, a png file, or any cairo image surface by setting either of the "pixbuf", "png", or "surface" properties.
CrItem* cr_pixbuf_new (CrItem *parent, double x, double y, const gchar *first_arg_name, ...);
A convenience constructor for creating an pixbuf and adding it to an item group in one step.
|
The parent canvas item. |
|
X position of the pixbuf. |
|
Y position of the pixbuf. |
|
|
|
|
Returns : |
A reference to a new CrItem. You must call g_object_ref if you intend to use this reference outside the local scope. |
"anchor" property"anchor" GtkAnchorType : Read / Write
The part of the pixbuf that is referenced to the item's x, y coordinates.
Default value: GTK_ANCHOR_NORTH_WEST
"height" property"height" gdouble : Read
Height of the pixbuf in device units.
Default value: 0
"pattern" property"pattern" CrPattern* : Read
Access to the #cairo_pattern_t that is used to render this image.
"pixbuf" property"pixbuf" GdkPixbuf* : Read / Write
The GDK Pixbuf to draw. For images that are in other formats it may be more convenient to use the #CrPixbuf:png or #CrPixbuf:surface properties directly.
"png" property"png" gchar* : Write
A png file to convert to a cairo_pattern_t for drawing. This can be set as an alternative to creating a #GdkPixbuf first.
Default value: NULL
"scaleable" property"scaleable" gboolean : Read / Write
If the pixbuf should scale and rotate to conform to item units. Setting this to FALSE will cause the image to always be the same size. See also #CrInverse for another way to achieve the same effect.
Default value: TRUE
"surface" property"surface" CrSurface* : Write
A #cairo_surface_t may be specified directly in lieu of using a #GdkPixbuf. The surface must be of type CAIRO_SURFACE_TYPE_IMAGE.
"x-offset" property"x-offset" gdouble : Read / Write
A device offset from the item's anchor position. Only used when scaleable=FALSE.
Default value: 0
"y-offset" property"y-offset" gdouble : Read / Write
A device offset from the item's anchor position. Only used when scaleable=FALSE.
Default value: 0