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 "Marco Herrn (JIRA)" <ji...@apache.org> on 2014/12/12 10:29:13 UTC
[jira] [Created] (BATIK-1099) Changing an SVGAnimateElement at
runtime doesn't work
Marco Herrn created BATIK-1099:
----------------------------------
Summary: Changing an SVGAnimateElement at runtime doesn't work
Key: BATIK-1099
URL: https://issues.apache.org/jira/browse/BATIK-1099
Project: Batik
Issue Type: Bug
Components: GVT
Affects Versions: 1.7
Reporter: Marco Herrn
Modifying an existing SVGAnimateElement at runtime leads to no visible change.
See for example this SVG snippet:
<g id="someId">
<line ... />
<line ... />
<animate dur="0.2" from="0" to="1" repeatCount="indefinite"
attributeName="stroke-opacity"
calcMode="discrete"/>
<animate dur="0.2" from="0" to="1" repeatCount="indefinite"
attributeName="fill-opacity"
calcMode="discrete"/>
</g>
Trying to change this at runtime with the following code:
canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new Runnable() {
public void run() {
for (SVGElement elm : currentlySelectedElements) {
elm.setAttributeNS(null, "stroke", "green");
Set<SVGAnimateElement> animateElements= getAnimateElements(elm);
for (SVGAnimateElement anim : animateElements) {
anim.setAttributeNS(null, "dur", "1");
}
}
}
});
should result in a slower blinking frequency. However the blinking frequency stays the same. The stroke color is changed, however. So this seems to be a problem only with SVGAnimateElements.
See http://stackoverflow.com/questions/27439359 for more details about the problem
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org