[calligra] filters/karbon/xfig: Added: initial support for the different arrow types in XFigOdgWriter
Friedrich W. H. Kossebau
kossebau at kde.org
Tue Apr 3 13:28:03 BST 2012
Am Dienstag, 3. April 2012, 10:21:28 schrieben Sie:
> On Monday, April 02, 2012 17:08:50 you wrote:
> > Am Montag, 2. April 2012, 16:31:10 schrieb Thorsten Zachmann:
> > > On Monday, April 02, 2012 15:59:26 Friedrich W. H. Kossebau wrote:
> > > > Git commit d58e64df6215c434e777442a97ed20ec906c6681 by Friedrich W. H.
> > > > Kossebau. Committed on 02/04/2012 at 15:57.
> > > > Pushed by kossebau into branch 'master'.
> > > >
> > > > Added: initial support for the different arrow types in XFigOdgWriter
> > > >
> > > > M +136 -22 filters/karbon/xfig/XFigOdgWriter.cpp
> > > >
> > > > http://commits.kde.org/calligra/d58e64df6215c434e777442a97ed20ec906c66
> > > > 8
> > > > 1
> > >
> > > Maybe it would be a good idea to use the same strings for the definition
> > > as the one we use in calligra. otherwise there will be similar arrows be
> > > show in the selection box for selecting arrows.
> > > See libs/flake/styles/markers.xml for the definitions.
> >
> > Aha, had not seen that file yet, thanks for the pointer.
> > But the same is true for the selection box you mention, have never come
> > across that. Where in the UI can I see it (and thus the arrows in that
> > file)?
> >
> > Then the problem is that in XFig the arrow heads can be scaled
> > independently in width and in length, and additionally have the concept of
> > a stroke width, also settable per arrow instance.
> > Thus mapping of the XFig arrow shapes to the pre-defined in Calligra is
> > only possible if I ignore the attributes length and stroke width.
> > For the latter I was thinking to ignore that anyway, as that seems to be
> > only translatable in complicated ways which might not be worth it (at
> > least for me, itches are to be scratched by those who need it :P ).
> > For the attribute length, well, could also for now ignore it, until people
> > come and complain. I myself do not really need support for that as well.
>
> it is possible to define the width of the arrow in odf with e.g.
> draw:marker-end-width="0.686cm". The length is then calculated by the
> viewbox. However the size of the marker changes when you change the width
> of the line.
Yes, that is what I meant, width and length are not independent in ODF. I was
thinking about to simply scale the Y values of each marker instance data to
also control the ratio of width and length, but as there are no automatic
marker styles allowed in ODF that would result in quite some marker styles for
a file that has a lot of differently scaled markers of perhaps even just one
XFig marker type.
So I decided to not try to get something looking as close as possible as the
original for now. Markers in ODF are less powerful than in XFig anyway :/
Let's see what users give as feedback, for me that is sufficient.
Perhaps I should add an import dialog where the user has control about this
decisions. As I also decided to drop the info about the grouping, to get a
proper z-order (as XFig does grouping independently of the z-order).
Cheers
Friedrich
More information about the calligra-devel
mailing list