You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Maik Schürer <Ma...@proveo.de> on 2006/06/28 16:36:33 UTC

How to rotate a complete SVG ?

Hi there,
I want to rotate the whole SVG (root Element) for a given value of 
degrees. How can I do that?
Best regards,
Maik


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


Re: How to rotate a complete SVG ?

Posted by André Ávila <as...@nextech.com.br>.
Hi Maik,

If you're using the JSVGCanvas you can simply create a rotate
AffineTransform, concatenate it with the current transform (obtained by
calling getRenderingTransform()) and apply the fnal transform to the
JSVGCanvas (with setRenderingTransform()).

----- Original Message ----- 
From: "Maik Schürer" <Ma...@proveo.de>
To: <ba...@xmlgraphics.apache.org>
Sent: Wednesday, June 28, 2006 11:36 AM
Subject: How to rotate a complete SVG ?


> Hi there,
> I want to rotate the whole SVG (root Element) for a given value of
> degrees. How can I do that?
> Best regards,
> Maik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


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


RE: How to rotate a complete SVG ?

Posted by sugawara <su...@humane-systems.co.jp>.
Hi Maik,

Rotation is not available for the root element.
Instead, you can do it by specifying a <g> element
with a transform attribute like follows:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="400px" height="400px" version="1.1"
xmlns="http://www.w3.org/2000/svg">
    <g transform="rotate(45 200 200)">
        <!-- all elements under ur original root element here -->
    </g>
</svg>

Hope it helps,
Shin

> -----Original Message-----
> From: Maik SchEer [mailto:Maik.Schuerer@proveo.de]
> Sent: Wednesday, June 28, 2006 11:37 PM
> To: batik-users@xmlgraphics.apache.org
> Subject: How to rotate a complete SVG ?
>
>
> Hi there,
> I want to rotate the whole SVG (root Element) for a given value of
> degrees. How can I do that?
> Best regards,
> Maik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>



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