Re: SVG as Image in Mozilla

codedread <[email protected]>
Newsgroups gmane.comp.mozilla.devel.svg
Organization http://groups.google.com
Message-ID <[email protected]>
The point of SVG is to have truly scalable images.  The SVG image
itself may not have explicit dimensions.

The <svg> element gets a width/height attributes so you can set those
explicitly.  These attributes default to 100% though so you can also
set the containing element to the size you want and the image will
scale to it.

If you want to scale an SVG image, you can remove the explicit width/
height  (so they default to 100%) and then scale the containing
element (the <div> in an inline case or the <object> in a referenced-
SVG case).  You can also change the value of the viewBox attribute on
the <svg> element to change the scale and position of the image.

HTH,
Jeff Schiller

On Jul 26, 4:16 am, Natarajan Thanikachalam
<[email protected]> wrote:
> Hi,
>
> As I understand, Mozilla renders SVG as a document, rather than as an
> Image, given this, can you please help me on
>
> 1) How do I get to know the dimensions of an SVG (doc/image)?
> 2) How do I scale an SVG (doc/image)?
>
> Many Thanks for your help in advance,
> Kind Regards,
>
> Natarajan.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.