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

List:       koffice-devel
Subject:    Re: Flake vector shapes
From:       Jaham <jaham () gmx ! net>
Date:       2006-09-03 15:23:07
Message-ID: 200609031723.08051.jaham () gmx ! net
[Download RAW message or body]

On Sunday, 3. September 2006 07:54, Thorsten Zachmann wrote:
> Hello Thomas,
>
> > Ok, I have some test code. With extra emphasis on test!
> > Its here to show the structures and effects, not to be perfect. I broke
> > the big rule to not put all classes in one file for example.
> >
> > The idea is that shapes like a 'Rectangle', 'Star', 'Circle' etc will
> > have a UserData object which stores the properies specific for that type
> > and it will update or regenerate the path based on these items. So,
> > underwater the path is fully constructed (avoiding separate paint etc)
> > but the user never notices this.
> >
> > The tool uses the userData to create a strategy for the current object
> > which then does things specific for the shape type. I implemented the
> > Star object to do something different. Its a silly example but the point
> > is that there _is_ a strategy, not how accurate it is doing things.
> >
> > What I didn't do yet is add a couple of widgets. A widget to alter the
> > number of points a star has, for example. This GUI would be shown on
> > creation time, among others.
> >
> > Again, this is the most beta code you have seen in quite some time as its
> > meant to be a quick way to explain the ideas. Not a final solution.
>
> Some remarks after I have tested the code. You have changed the PathTool to
> something it is not meant to be. You changed it to a shape manipulation
> that changes a special shape. The path tool however is there for
> manipulation the single path of an object e.g. move points, delete points,
> make curves out of lines and not for manipulating a special shape. Jan has
> allready pointed out that we should have a different tool for that to
> manipulate parameters of a specific shape.
>

I agree. When manipulating a "special shape" not all points of the underlying 
path should be exposed. Only these needed for changing the special shapes 
properties (e.g only two handles for a star shape). So the underlying class 
should have a different method for painting the objects decoration (aka its 
handles) and different behaviour of the pointsAt( QREctF) method to only 
return its special handles inside the given rectangle.

Thomas: I would favour something like inkscape does, so if my explanation 
seems unclear, please look at how that might look like.

Ciao Jan
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://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