Re: Making new items for gnome-canvas



>  Does anyone know of any example code of creating your own items for the
>  gnome-canvas? Or even better, some documentation that covers this...

I haven't finished the documentation for the canvas; in particular,
right now it contains nothing about how to write new canvas items :-)

For now you'll have to read the source to the primitive canvas items.
They are fairly simple, I think.  Please feel free to ask any
questions you may have about them.

Canvas items are derived from GnomeCanvasItem.  The most important
methods they have to implement are the draw method, which is called
when an item needs to paint itself, and the point method, which is
called when the canvas needs to know the distance from a point to the
item.  All the rest of the methods are pretty much boilerplate code.

Again, feel free to ask if you have any questions about the canvas.

  Federico



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]