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 ard <ar...@yahoo.com> on 2012/11/15 21:57:08 UTC
scaling SVG Document
I'm trying to scale the entire contents of an SVG Document in memory. Is there a
pre-written method to do this? I've been searching the Batik documentation
around SVGDOMImplementation but haven't found anything.
If there isn't, to write such a method, it seems the procedure would be to add a
group element which groups the entire contents of the svg, append a use element
with a transform attribute, and modify the height and width attributes of the
svg element.
For this, is it necessary to parse the original svg, then output the modified
svg into another SVG Document, or is there a pre-written method allowing to, for
example, insert a group element which groups the entire svg content?
Regarding this, I noticed the method
Element SVGDOMImplementation.GElementFactory.create(String prefix, Document doc)
but I don't understand it's usage. Any pointers on where to look for
information, ideally a usage example, would be greatly appreciated.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: scaling SVG Document
Posted by ard <ar...@yahoo.com>.
Thanks!
Thomas DeWeese <thomas.deweese <at> gmail.com> writes:
>
>
> Hi Ard,
> Why don't you just adjust the width and height of the outermost SVG element?
>
> Thomas
>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: scaling SVG Document
Posted by Thomas DeWeese <th...@gmail.com>.
Hi Ard,
Why don't you just adjust the width and height of the outermost SVG
element?
Thomas
On Thu, Nov 15, 2012 at 12:57 PM, ard <ar...@yahoo.com> wrote:
> I'm trying to scale the entire contents of an SVG Document in memory. Is
> there a
> pre-written method to do this? I've been searching the Batik documentation
> around SVGDOMImplementation but haven't found anything.
>
> If there isn't, to write such a method, it seems the procedure would be to
> add a
> group element which groups the entire contents of the svg, append a use
> element
> with a transform attribute, and modify the height and width attributes of
> the
> svg element.
>
> For this, is it necessary to parse the original svg, then output the
> modified
> svg into another SVG Document, or is there a pre-written method allowing
> to, for
> example, insert a group element which groups the entire svg content?
>
> Regarding this, I noticed the method
>
> Element SVGDOMImplementation.GElementFactory.create(String prefix,
> Document doc)
>
> but I don't understand it's usage. Any pointers on where to look for
> information, ideally a usage example, would be greatly appreciated.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>