Re: [gnome-love] is the GnomeCanvas for drawing on?
- From: Miguel de Icaza <miguel ximian com>
- To: "Ciaran O'Riordan" <ciaran_o_riordan hotmail com>
- Cc: gnome-love gnome org
- Subject: Re: [gnome-love] is the GnomeCanvas for drawing on?
- Date: 14 Nov 2001 00:57:46 -0500
hmmm. I'm hoping to make a paint app to equal MS Paint in functionality.
I thought the GnomeCanvas was a next generation drawing_area so I used it.
Not really. GnomeCanvas is more of a container for other objects and
allows a number of interesting things to be easily implemented.
If I were doing a Paint application I would use the GnomeCanvas and I
would construct a GnomeCanvasItem that holds the drawing (ItemDrawing)
where your data is kept.
That way you can put overlay objects on top easily (handles, bezier
paths, etc).
Redrawing the Canvas when it gets re-exposed is my current stumbling block.
I've been reading the gpaint-0.2 code which uses a 'drawing_area' but as
the gpaint project is old I assumed that the Canvas wasn't available back
then. So I used a Canvas thinking I was doing the up-to-date thing.
Well, the Canvas handles exposes for you. If you decide to use my
approach (making your ItemDrawing) then you would have to handle
repaint in the method objects.
kMiguel.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]