Re: [Goocanvas-devel] loading and displaying svg files into goocanvas
Status: Beta
Brought to you by:
dachaplin
From: <mys...@fr...> - 2007-03-15 12:41:31
|
Hi, Finally, I'll work with bitmaps and update them when necessary when zooming. I thought that svg drawing could be done easily and wanted to benefit from the fact of having no pixelisation when zooming. David Madeley, who once developped a Mahjong game proposed me to redraw the bitmaps to bigger/smaller resolutions if needed. So I think this is what I'll do for I do not have the ability right to do subclassing. It's still nice though to hear that only two methods have to be overriden if every I had chosen to write a new class. Thank you again for your help, Jonathan Quoting Damon Chaplin <da...@ka...>: > On Wed, 2007-03-14 at 16:36 +0100, mys...@fr... wrote: > > > Could please, one of you tell me ways of displaying svg in goocanvas easily > ? > > You'll have to create your own canvas item, probably by subclassing > GooCanvasItemSimple. > > Look at demo/demo-item.c. It shows how to write a very simple canvas > item. > > The main things you need to write are: > 1) the update() function which calculates the item's bounding box. > 2) the paint() function which renders the item to the given cairo_t. > > > Damon > > > |