You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Tonny Kohar <to...@kiyut.com> on 2007/01/05 15:05:11 UTC
bug on SVGRadialGradientElement ?
Hi,
Calling elt.getR().getBaseVal(); on SVGRadialGradientElement throw the
following exception,
org.apache.batik.dom.svg.LiveAttributeException
at org.apache.batik.dom.svg.AbstractSVGAnimatedLength
$BaseSVGLength.revalidate(Unknown Source)
at
org.apache.batik.dom.svg.AbstractSVGLength.getValueAsString(Unknown
Source)
Look at the Batik source code, it might be because the null value passed
on private void initializeLiveAttributes() at SVGOMRadialGradientElement
especially the line
r = createLiveAnimatedLength(null, SVG_R_ATTRIBUTE,
null,SVGOMAnimatedLength.OTHER_LENGTH,false);
Where as according to the SVG Spec the r value: If the attribute is not
specified, the effect is as if a value of "50%" were specified.
So it should be
r = createLiveAnimatedLength(null, SVG_R_ATTRIBUTE,
SVG_RADIAL_GRADIENT_R_DEFAULT_VALUE,SVGOMAnimatedLength.OTHER_LENGTH,false);
Regards
Tonny Kohar
--
Sketsa
SVG Graphics Editor
http://www.kiyut.com
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org