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

List:       koffice-devel
Subject:    Re: About a Vector Plugin for Flake
From:       Thomas Zander <zander () kde ! org>
Date:       2006-07-26 8:18:04
Message-ID: 200607261018.04434.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 26 July 2006 07:46, Thorsten Zachmann wrote:
> Ok maybe first of all I describe what we need for flake. We need a base
> cass which describes a vector path as defined in SVG. This was class
> will then be used for all graphical shapes which consist of a vector
> path. e.g. a rectangular, a circle, a line, a bezier curve, a
> freehandline. With this design, we can modify all objects with the same
> tools.

I agree.

> We need to have separate objects for this so that we can store them as
> this kind of objects in odf e.g. as a rect and not as a path. After an
> object has modified by adding more points or moving them around the
> base method of saving a svg path will then be used.

I do think you should avoid creating different objects for different types 
of shapes.
Flake has a mechanism to create objects by passing a KoProperties object 
to the KoShapeFactory of your type.  The properties can state what kind 
of object it is.  A rect, a star or whatever you want.
The resulting shape will then be constructed with the proper vector paths 
already set and you can add a  
Enum VectoryType {Foo, Bar};  VectoryType &vectoryType(); 
on your shape so the tools and the saving method will be able to save 
things out as a specific type instead of a generic type.

-- 
Thomas Zander

[Attachment #5 (application/pgp-signature)]

_______________________________________________
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