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 "Pepping, Florian" <fl...@wincor-nixdorf.com> on 2006/08/14 08:49:09 UTC
Animating CSS: invalid values again
Hi,
referring to the message of Andreas Neuman from the 31 of July, I still
get an error while animating the CSS-Value "fill-opacity".
Batik / Squiggle complains the following error:
The attribute "fill-opacity" represents an invalid CSS value
("0,9853333830833435").
Original message:
For input string: "9853333830833435"
at
org.apache.batik.css.engine.CSSEngine.setMainProperties(CSSEngine.java:1
031)
at
org.apache.batik.css.engine.CSSEngine$CSSNavigableDocumentHandler.overri
deStylePropertyChanged(CSSEngine.java:2555)
at
org.apache.batik.dom.svg.SVGOMDocument.overrideStylePropertyChanged(SVGO
MDocument.java:486)
at
org.apache.batik.dom.svg.SVGStylableElement$OverrideStyleDeclaration.pro
pertyChanged(SVGStylableElement.java:749)
at
org.apache.batik.css.dom.CSSOMStyleDeclaration.setProperty(CSSOMStyleDec
laration.java:156)
at
org.apache.batik.dom.svg.SVGStylableElement.updatePropertyValue(SVGStyla
bleElement.java:179)
at org.apache.batik.anim.AnimationEngine.tick(AnimationEngine.java:319)
at
org.apache.batik.bridge.SVGAnimationEngine.access$2(SVGAnimationEngine.j
ava:1)
at
org.apache.batik.bridge.SVGAnimationEngine$AnimationTickRunnable.run(SVG
AnimationEngine.java:607)
at org.apache.batik.util.RunnableQueue.run(RunnableQueue.java:220)
at java.lang.Thread.run(Unknown Source)
I think this problem is similar to the one of Andreas. However, I tested
his example too but couldn't reconstruct the error.
Perhaps you can have a look at this problem.
Thanks Florian Pepping
########################################################
I used this example for animation:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
contentScriptType="text/ecmascript" zoomAndPan="magnify"
contentStyleType="text/css" style="shape-rendering:geometricPrecision;
text-rendering:geometricPrecision; image-rendering:optimizeQuality;
fill-rule:evenodd; clip-rule:evenodd" version="1.0" width="145.2mm"
xml:space="preserve" preserveAspectRatio="xMidYMid meet" viewBox="0 0
145.2 133.298" height="133.298mm">
<defs>
<style type="text/css" xml:space="preserve">
<![CDATA[
.str0
{stroke:#1F1A17;stroke-width:0.176;stroke-linecap:round;stroke-linejoin:
round}
.fil2 {fill:#FF0000}
.fil0 {fill:#FF0000}
.fil1 {fill:#FF0000}
.fil3 {fill:#FF0000}
]]>
</style>
</defs>
<g transform="translate(-97.0351,-1020.94)">
<g id="s1">
<rect transform="matrix(0.444444 0.2566 0 0.501264 137.723 1069.59)"
width="71.802" class="fil1 str0" id="_84631240" height="71.802"/>
<polygon id="_84630264" class="fil2 str0" points="201.547,1069.59
169.635,1088.02 169.635,1124.01 201.547,1105.58 "/>
<polygon id="_178553640" class="fil3 str0" points="201.547,1069.59
169.635,1088.02 137.723,1069.59 169.635,1051.17 "/>
</g>
</g>
<animate id="ausblenden" xlink:href="#s1"
attributeName="fill-opacity"
attributeType="XML"
from="1"
to="0"
begin ="1s; einblenden.end + 1.5s;"
dur="1.5s"
end ="ausblenden.begin + 2s"
fill="freeze"
repeatCount="1"/>
<animate id="einblenden" xlink:href="#s1"
attributeName="fill-opacity"
attributeType="XML"
from="0"
to="1"
begin ="ausblenden.end"
dur="1.5s"
end ="einblenden.begin + 2s"
fill="freeze"
repeatCount="1"/>
</svg>
Re: Animating CSS: invalid values again
Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Florian.
Pepping, Florian:
> referring to the message of Andreas Neuman from the 31 of July, I still
> get an error while animating the CSS-Value "fill-opacity".
This works for me with the latest SVN code (after removing the trailing
semicolon from the ‘ausblenden’ element’s begin attribute.
--
Cameron McCormack, http://mcc.id.au/
xmpp:heycam@jabber.org ▪ ICQ 26955922 ▪ MSN cam@mcc.id.au
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org