Initial work on a Karbon CDR import filter

Thorsten Zachmann t.zachmann at zagge.de
Sat Jan 28 16:14:06 GMT 2012


On Saturday, January 28, 2012 16:24:16 Friedrich W. H. Kossebau wrote:
> Hi Thorsten,
> 
> Am Samstag, 28. Januar 2012, 05:03:23 schrieb Thorsten Zachmann:
> > > Some questions:
> > > Initially I tried to create directly a KarbonDocument object, not
> > > another
> > > SVG file. But then I found out that shapes like e.g. Rectangle and
> > > Ellipsis are only provided by factories from plugins, so I cannot
> > > create them directly from code, is that correct? Do I really have to
> > > instead create a SVG file as output?
> > 
> > The filters work mostly by converting one file format into a native file
> > format of calligra. In case of Karbon native file formats are odg and
> > svg. This has some benefits as it allows e.g. filter chaining. And that
> > is the prefered way of implementing a filter.
> > However it is also possible to do it differently but that means you need
> > to link against the shapes code which is not nice.
> 
> And not possible here, as e.g. the API/symbols of the rectangle and
> ellipsis shapes are not exported from the plugin.

Yes it is not possible to use the API that is why I said you need to include 
the code into your own code and compile it there once more. That is what the 
svg filter did before karbon got native svg support.

Thorsten



More information about the calligra-devel mailing list