« Return to Thread: Repainting a JSVGCanvas

Re: Repainting a JSVGCanvas

by Cameron McCormack-4 :: Rate this Message:

Reply to Author | View in Thread

aaaa aaaa:

> I have following classes (SVGArea and SVGAreaPainter) which displays
> the document. The SVGArea is used by the SVGAreaPainter. The
> SVGAreaPainter has a lot methods. The one that makes the mouseover
> effect for some elements is
>
> private void addMouseOverEffect(Element el, String color) {
> Element mouseOver = doc.createElementNS(svgNS, "set");
> mouseOver.setAttributeNS(null, "attributeName", "fill");
> mouseOver.setAttributeNS(null, "attributeType", "XML");
> mouseOver.setAttributeNS(null, "to", color);
> mouseOver.setAttributeNS(null, "begin", "mouseover");
> el.appendChild(mouseOver);
> Element mouseOut = doc.createElementNS(svgNS, "set");
> mouseOut.setAttributeNS(null, "attributeName", "fill");
> mouseOut.setAttributeNS(null, "attributeType", "XML");
> mouseOut.setAttributeNS(null, "to", el.getAttribute("fill"));
> mouseOut.setAttributeNS(null, "begin", "mouseout");
> el.appendChild(mouseOut);
> }

Are these changes being made in the UpdateManager’s thread?  If not,
then it might explain the problem.  See:

  http://xmlgraphics.apache.org/batik/faq.html#N10215

--
Cameron McCormack ≝ http://mcc.id.au/

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

 « Return to Thread: Repainting a JSVGCanvas