[gnomemm] Gnome::Canvas::Item custom drawing



Hi all, I'm trying to write a class derived from a Gnome::Canvas::Item
such as Gnome::Canvas::Rect.

I would like to override the drawing method to draw resizing handles
around the object when it is selected inside of my Gnome::CanvasAA
object.

My understanding is that I should override the update_vfunc() method and
do my own drawing there. The only documentation I have shows a drawing
method using libart_lgpl's SVP arrays. However, the sources actually
uses a GnomeCanvasPathDef method. Either way, I get stuck for the
following reasons:

1) SVP arrays, I can't get the fill_svp in anyway from the C++ classes.
The c code puts it in GnomeCanvasShapePriv private structure, so I'd
rather not use that directly.

2) with the PathDef method, I can't find a way to set the PathDef to the
shape from the C++ classes (the c code calls
'gnome_canvas_shape_set_path_def()')

Can someone put me on the right track, please.

Thanks!
--
Claude Vaillancourt





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