xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ionut Ciocirlan" <ionut.ciocir...@avandor.com>
Subject Re: unknown size of svg
Date Fri, 19 Aug 2005 15:46:20 GMT
Hi Thomas,


----- Original Message ----- 
From: "Thomas DeWeese"


|
| > 2) if the line above shows I'm looking at the very wrong thing in the 
docs
| > 
(http://xml.apache.org/batik/javadoc/org/apache/batik/swing/svg/JSVGComponent.html)
| > then please point me in the right direction
|
|    You are not using the Canvas/Component you are using the transcoders.
| (batik.transcoder...)

I am aware of this; I was actually thinking about instantiating a 
JSVGComponent with the sole purpose of getting the  Dimension2D size after 
building the GVT tree, manipulating the SVG DOM, and getting back to doing 
the usual transcoding part. Guess this would be the most difficult and 
clumsy way, and am really trying to avoid it.

|
| > 3) my prefered choice would obviously be to do this from ECMA scripting, 
or
| > any other way that could just be contained in the SVG file.
|
|    You are lucky as this is probably the simplest way to accomplish
| this.  With the transcoder you can have it run 'onload' "event handlers"
| that are in the document (as ECMA script).  These onload event
| handlers should be able to get the BBox of the flowText element and
| use that to set the width/height of the outermost SVG element.
|

This got my hopes high, but... the flowText element has no getBBox() method. 
I tried to 'force' it implement Interface SVGLocatable by doing <flowText 
id="myText"  ... transform="scale(2) scale(0.5)"> (got inspired from 
http://www.w3.org/TR/SVG/types.html#InterfaceSVGLocatable) ... but not 
working.

Any idea how I could get past this issue?


Thanks,
Ionut 


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


Mime
View raw message