Am Mittwoch, den 23.01.2008, 21:24 +0100 schrieb Ulrich von Zadow:
> > So one could either decide that libavg supports something linke matrix()
> > for files that aren't handcrafted, or one would need the filter to
> > translate the matrix into something that libavg understands. I don't
> > know about libavg's internals, but with more complex transformations,
> > I'd think that libavg has to work with a transformation matrix
> > internally, anyway, so I'd guess it would be only a question of what to
> > expose in the XML part?
>
> You're right, it's not a question of coding it - that's not very
> complicated. It's more a question of how much documentation a new libavg
> user has to sift through to understand it. Interfaces should be complete
> but minimal :-).
Right. But one could implement matrix() and hide it from the user docs.
So machine-generated files (e.g., from Inkscape) could have it, but the
users that want to hand-craft their AVG files don't have to care.
Still it would make AVG a bit more complex, so I understand your
concerns. I'll see if there's a chance to put it in the filter.
> > AVG:
> > <div x="10" y="10"><image href="image.png/></div>
> >
> > SVG:
> > <g transform="translate(10,10)"><image xlink:href="image.png"/></g>
>
> I actually think the avg syntax is better here :-).
>
> divs also crop. How is that handled in svg?
Hm, your right, g and div don't really map losslessly. I had to think
about that a bit, but now I found out that SVG has quite a straight
forward equivalent to div: svg! ;-)
The SVG Full specification allows to have nested svg elements. So this
is the "real" svg equivalent, including clipping:
<svg x="50" y="50" width="25" height="25">
<image width="50" height="50" xlink:href="smiley.png"/>
</svg>
This has one downside: Inkscape doesn't support the creation of nested
SVGs - and I doubt it will, because Inkscape now has much advanced
clipping features. But Inkscape makes use of gs quite a lot, e.g., to
handle layers. So while it would be possible to translate AVG divs into
SVG svgs, it's not really possible to translate SVG gs into AVG.
The way my filter currently handles this is by translating gs into divs
and disable cropping for the AVG files. But this is of course not a good
solution if one wants to make use of the cropping feature. I don't know
how to solve that.
> > I didn't implement this in the filter, yet. But for the simple use case
> > of text flowing in a rect (it can flow in any shape), it might be worth
> > the work as it matches AVG's model much better than the pure <text>
> > thing.
>
> Sounds good.
I'll try to implement this, so one could get quite good conversion
results if one only uses flow text in Inkscape.
> One thing I'd like to change is to remove the cropping behaviour from
> the <words> node, because <div> nodes can always be used for this. Then
> parawidth becomes unneeded and can be replaced by width... what do
> people think about that?
That sounds good to me. The horizontal placement of text without a
parawidth/width specified would then be more compatible with SVG's
handling.
> > This just as a quick (hm, not really, I suspect... ;-)) overview about
> > some of the similarities and differences between AVG and SVG. When I
> > find the time, I might make a more detailed comparison, if anyone's
> > interested. I'm open for discussions about making AVG more compatible
> > with SVG, maybe at least for future extensions of AVG's feature set.
>
> Yes, this is definitely interesting!
Ok, I'll try to make a comparison of the features of both AVG and SVG,
and how they are designed. This could come along with an AVG2SVG filter,
which should be much more straight-forward and would allow to open AVG
files in Inkscape or view them with SVG viewers.
> I assume you want publish this at some point? Where? There's room in
> libavg svn for the development and room in the wiki for documentation :-).
That's great! I'm not sure wheres the best place for it, though, since
it will result in an Inkscape plugin. So it might be better to have it
in the Inkscape SVG, so it could ship with Inkscape once it's polished
enough. On the other hand, I don't know how much the Inkscape devs would
appreciate an AVG filter... ;-)
I'll have some of the improvements included, and then publish it one way
or the other.
Cheers,
Frederik
_______________________________________________
libavg-users mailing list
[email protected]
https://mail.datenhain.de/mailman/listinfo/libavg-users