You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Prajakta Bhanage <pr...@yahoo.com> on 2001/11/19 11:42:50 UTC

InputStream to JSVGCanvas and retrieval in xml doc.

Hi,

I would like to know if it is possible to give an
inputstream (in svg format) to JSVGCanvas, perform
zoom, pan, rotate operations and retrieve the
transformed image in the form of a w3c xml document ?
how can this be achieved ?

-prajakta.


__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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


Re: InputStream to JSVGCanvas and retrieval in xml doc.

Posted by Prajakta Bhanage <pr...@yahoo.com>.
Thanks Bill, looks like no other way out...

-prajakta.

--- Bill Haneman <bi...@sun.com> wrote:
> Prajakta Bhanage wrote:
> > 
> > Hi,
> > 
> > I would like to know if it is possible to give an
> > inputstream (in svg format) to JSVGCanvas, perform
> > zoom, pan, rotate operations and retrieve the
> > transformed image in the form of a w3c xml
> document ?
> > how can this be achieved ?
> > 
> > -prajakta.
> Prajakta:
> 
> I am not sure if this can be achieved via JSVGCanvas
> or not (sounds like
> it should happen at the GVT layer), but I would
> recommend the simpler
> approach of using XSLT or an even simpler (sed?)
> mechanism to add the
> transforms to the outermost <g> element in the SVG
> file. 
> 
> Try adding 'transform="scale(0.5, 0.5)"', etc. to
> your <g> element by
> hand:
> 
> <svg>
>   <g transform="translate(-100,-50) scale (0.5, 0.3)
> rotate(45)
> translate (175, 50)">
> 
>   ...
>  
>   </g>
> </svg>
> 
> No need to parse the file ;-)
> 
> -Bill
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> batik-dev-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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


Re: InputStream to JSVGCanvas and retrieval in xml doc.

Posted by Bill Haneman <bi...@sun.com>.
Prajakta Bhanage wrote:
> 
> Hi,
> 
> I would like to know if it is possible to give an
> inputstream (in svg format) to JSVGCanvas, perform
> zoom, pan, rotate operations and retrieve the
> transformed image in the form of a w3c xml document ?
> how can this be achieved ?
> 
> -prajakta.
Prajakta:

I am not sure if this can be achieved via JSVGCanvas or not (sounds like
it should happen at the GVT layer), but I would recommend the simpler
approach of using XSLT or an even simpler (sed?) mechanism to add the
transforms to the outermost <g> element in the SVG file. 

Try adding 'transform="scale(0.5, 0.5)"', etc. to your <g> element by
hand:

<svg>
  <g transform="translate(-100,-50) scale (0.5, 0.3) rotate(45)
translate (175, 50)">

  ...
 
  </g>
</svg>

No need to parse the file ;-)

-Bill

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