Re: Urgent Help

Hi Ganesh,

On 19 Apr 2005, at 00:29, ganesh jothikumar wrote:

>  I have a requirement wherin I will have to zoom the svg image. I know 
> that this can be done using CTRL key. But can this be done 
> programaticaly.

Firstly, you might want to ask this question on 
svg-developers@yahoogroups.com.
This email list is for discussing the SVG print specification, not 
really
the behaviour of an implementation.

Having said that, a programmatic zoom is indeed possible in the SVG
language (on any viewer). You have a few choices:

- if you have scripting (such as the Adobe viewer or Batik) you can
   modify the currentScale attribute on the SVGDocument element via
   Javascript.

- if you have animation you can have an element in the SVG document
   that animates the viewBox attribute on the root <svg> element.

There are also a few other ways (such as putting a transform on a <g>
element that wraps everything you want to zoom).

I suggest the first option (using javascript). If you do a search
for "svg currentScale" you'll probably find code.

Dean

Received on Tuesday, 19 April 2005 12:20:14 UTC