Re: Loading JPGs
- From: Diego Zuccato <diego otello alma unibo it>
- Cc: gtk-list gnome org
- Subject: Re: Loading JPGs
- Date: Fri, 13 Dec 2002 00:41:50 +0000
"James M. Cape" wrote:
> You can load the image with GdkPixbuf, then render it as a
> GnomeCanvasPixbuf. The points can be rendered using other items.
Tks. Did it. It works well... as long as I haven't to remove from the
canvas an item. I couldn't find any method.
Following hierarchy, I saw that a GnomeCanvas is a GtkContainer. So I
tried with
gtk_container_foreach(GTK_CONTAINER(gnome_canvas), mycbk, gnome_canvas)
with
void mycbk(GtkWidget w, gpointer c)
{
gtk_container_remove(GTK_CONTAINER(c), w);
}
Obviously this doesn't work. mycbk() never gets called (maybe because I
only added a GdkPixbuf ?).
So what should I do to clear the canvas ? Hope I don't have to destroy
it and make a new one...
If so, what happens if you have 100 items and want to remove the 50th?
Is there a way to iterate on the items contained in a canvas?
Tks,
Diego.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]