xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Fugal <h...@fugal.net>
Subject SVG element viewBox
Date Wed, 19 Jun 2002 23:31:16 GMT
Hello,
I am designing an application which will use svg intensively. I need to 
be able to change the viewBox attribute of an svg element (actually not 
the top-level svg element, but I don't suspect that makes a big 
difference).  I am hoping to use Batik, but it does not currently 
support this.  I know the 1.5 release is "focussed on supporting SVG 
scripting fully."[1]  It looks to me like Batik is coming along at a 
clipping pace, so I am optimistic that it will be able to do what I 
need.  Does anyone have an eta on being able to modify the svg element, 
specifically the viewBox attribute?

I am using the CVS version. According to the release notes beta3 
supports modifying <svg> in scripting[2] but when I try I get

SVG Error:
org.apache.batik.dom.svg.SVGOMDocument

You can see for yourself at http://rivit.cs.byu.edu/~fugalh/svg/viewbox.svg
You will notice if you pull up the DOM inspector after clicking on the 
circle that the viewBox of the svg element has indeed changed, but the 
error and white screen (the brown box indicates the new viewBox) 
indicate a problem somewhere.

I'd be glad to file a bug report in bugzilla if needed.

As an aside, other features I can live without but Batik doesn't have 
are <animate> support for changing the viewBox and createSVGPoint() so 
that I can calculate the new viewBox based on the bounding box of a 
<rect>.  The latter I worked around by implementing my own matrix 
multiplication (not hard, but harder than a one-liner).

Thanks,
Hans Fugal

1. http://xml.apache.org/batik/status.html
2. http://xml.apache.org/batik/dist/README.txt


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


Mime
View raw message