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

Re: GTK+ 2.0 widget for dia




> Hmmm... could the Renderer interface be synced with dia's ? (namely, the
> prerender_string() method [a no-op in the gtk renderer, some stuff in
> lib/diagramdata.c, if that applies to dia-newcanvas]. There has also been 
> some discussion to help support groups for export renderers (would be no-ops
> on display renderers), but I'm not sure something conclusive has been seen
> out of that discussion).
> 
> 	-- Cyrille

I just looked a bit in diagramdata.c and dia-newcanvas looks pretty
similar. I think Jamesh would explain better than I can do how this
fits, but looks like it's fine.
dia canvas has items (line, rectangle, ...) with some properties
and member functions. Amoung them, you can find 

void (*render)	(DiaCanvasItem *canvas_item, DiaRenderer *renderer,
			 DiaRectangle *rect);

which looks pretty the same as:

(*obj_renderer)(obj, renderer, active_layer, data);

The (dia canvas) render is an interface that enables to set width,
color, .. and draw points, lines, ....
Again this is pretty similar to the dia render.

I think jamesh started the dia-newcanvas in order to put in it
all the code realted to rendering mainly.
My personal feeling is to make dia-newcanvas a widget with a
higher abstraction level. You don't need to add code to
enable snapping, just set the snap point. You don't have
to care about grabbing. You don't have to care about the
rendering engine, just choose it, change it if you want
and so on.

Hope this will answer your question.

Xavier Ordoquy,
aka MCArkan





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK