xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maik Schürer <Maik.Schue...@proveo.de>
Subject Re: 'apply' a transform ?
Date Wed, 27 Oct 2004 12:12:23 GMT
>    Why do you care?
At runtime I build a symbol library from a SVG document.
But in my application library I want have the symbols with a position
"0px/0px" for the center of each symbol.
Of course its also possible to have multiple 'translate' in one transform,
but my (first) idea was to apply the transform to the symbol, so I have not
such a complex transform.or transform attribute is removed completely.
A little help would be to combine multiple 'translate' to one 'translate'
(without parsing the 'translate' strings and add the values) ...
Maik

----- Original Message ----- 
From: "Thomas DeWeese" <Thomas.DeWeese@Kodak.com>
To: "Batik Users" <batik-users@xml.apache.org>
Sent: Wednesday, October 27, 2004 1:43 PM
Subject: Re: 'apply' a transform ?


Hi Maik,

Maik Schürer proveo GmbH wrote:

> Can I "apply" a transform after setAttribute("transform", myTransform) to
an
> element ?
> Should means, the "apply" changes the points of <rect>, <p> etc. and the
> "transform" attribute is removed from element.
> Thanks in advance

    The short answer is 'no'.  Just to take your example of a rect
after a rotation it is no longer a rect (it would have to morph
into a path element).

    The longer answer is that using Java2D and the GVT you could
do this.  You can get the java.awt.Shape objects from
batik.gvt.ShapeNode and use
java.awt.geom.AffineTransform.createTransformedShape(Shape s) to
get the transformed geometry that can then be output as a path
with out a transform.

    Why do you care?



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message