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

Re: dr.genius and canvas



On Wed, Jun 14, 2000 at 09:27:35PM -0500, Chema Celorio wrote:
> Why is dr. genius not using the GnomeCanvas ?
> I mean on the figures ?

That's a question for me! :-)

Here's an answer.  We are not currently using the GnomeCanvas for geometric
figures because of the way we have organized our implementation (I'm detailing
the issues below).  In fact the way Dr. Genius geometric engine is working is
remarkably similar to the way Dia is organized.  As you may know Dia is not
presently using GnomeCanvas but simple gdk/gtk drawing code and optionally
some libart based rendering.

Of course we would like to have anti-aliased drawings of the figures.  An
interesting question is wether we must use the canvas for that?  Wouldn't
it be better to just use libart with some special optimisations?

Lately the Dia team has worked to implement some GnomeCanvas support, but I've
not had a close look at that yet.  During the GUADEC I've myself had the
opportunity to discuss possible strategies for implementing GnomeCanvas
support in Dr. Genius with various hackers.  I currently have a design that
looks ok but it's not on the top of our priority list right now.

OK, so now the question is why is it not handy for us to support GnomeCanvas
as the primary rendering method?  Internally our code has an MVC type of
architecture, which means that our geometric engine (Model) does not care about
display types (Views), it is only dealing with operations on geometric objects.

The benefit of our approach is that it is easy to support multiple
rendering models (gdk, export to TeX, gnome-print, bonobo component,
etc...).

The problem with the GnomeCanvas is that the "best" way to use it would be
to code specific a canvas item type for each geometric object type.  But that
way the geometric engine would be tied to the GnomeCanvas.  And this is
contrary to our way of proceeding.

So now if we really want to use the GnomeCanvas then we have to use a more
subtle strategy.

Bye, Laurent.
-- 
Laurent Gauthier                         ;; mailto:Laurent.Gauthier@alcatel.fr
Alcatel -- Network Management Unit -- Support Team ;; Voice: +33 1 69-63-17-74
Route de Nozay, 91460 Marcoussis (France)          ;;   Fax: +33 1 69-63-15-18