[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: [Uml-devel] Re: karbon/umbrello
From:       Dirk_Schönberger <dirk.schoenberger () sz-online ! de>
Date:       2003-05-27 19:26:40
[Download RAW message or body]

> > > > > But how do you want to implement rendering?
> > > >
> > > > YourVeryOwnRenderingVisitor v.visit( *morph );
> >
> > the clean way, yes, but i don't think its going to be very efficient for
> > editing applications. for simple generators/exporters this is fine, but
for
> > karbon, kivio and umbrello, i don't think that's the best choice. there
> > should be some kind of kpainter integration.

> VObject::draw() is to me not much different from VVisitor::visitVObject().

> > i think for editing or vector graphic manipluation applications you need
a
> > higher degree of responsiveness in the painting. changes should be
> > immediate. you shouldn't have to re-visit the entire graph just to
redraw a
> > single node.

> Nobody forces you to start your traversal with the document each time.

One problem of the visitor pattern is that you limit the recognized element
types, which could become
problematic if you want to use the hierarchy in a generic way. Not
everything in a specialized graphics editor should be implemented as, say, a
path / composite. You e.g. loose the possibility to write element specific
metadata,
like, e.g. the radius in a circle element.
But I think we already had this discussion.

Regards
Dirk

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic