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 hfortier <hf...@ultramain.com> on 2012/03/13 23:59:26 UTC
Rendering CSS in JSVGCanvas
Looked around, and some people pointed to:
http://wiki.apache.org/xmlgraphics-batik/BootSvgAndCssDom - which makes it
seem like the CSS engine is automatically started when using a JSVGCanvas.
Additionally the example provided on that page didn't make any sense to me
in the context of a JSVGCanvas.
Here is a sample SVG that renders fine in a browser, but when I try to
render in a JSVGCanvas, it renders, but the mouseover functionality does not
work. Is this supported by Batik? How can I get this working?
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="200px" height="200px" viewBox="0 0 200 200" enable-background="new 0
0 200 200" xml:space="preserve">
<rect class="hoverblack" id="square1" x="69.5" y="20.5" fill="#0000FF"
width="60" height="60"/>
<rect class="hovergreen" id="square2" x="69.5" y="120.5" fill="#FF0000"
width="60" height="60"/>
</svg>
--
View this message in context: http://batik.2283329.n4.nabble.com/Rendering-CSS-in-JSVGCanvas-tp4470592p4470592.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Rendering CSS in JSVGCanvas
Posted by Helder Magalhães <he...@gmail.com>.
Hi everyone,
> We don't support the CSS hover property. You can achieve the same basic
> effect with script however.
After the good hint from Thomas, you might be interested in taking a
look at the project status [1] to check for other possible things with
limited support and/or known caveats.
Cheers,
Helder
[1] http://xmlgraphics.apache.org/batik/status.html
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Rendering CSS in JSVGCanvas
Posted by Thomas DeWeese <th...@gmail.com>.
Hi HFortier,
We don't support the CSS hover property. You can achieve the same basic
effect with script however.
Thomas
On Tue, Mar 13, 2012 at 6:59 PM, hfortier <hf...@ultramain.com> wrote:
> Looked around, and some people pointed to:
> http://wiki.apache.org/xmlgraphics-batik/BootSvgAndCssDom - which makes it
> seem like the CSS engine is automatically started when using a JSVGCanvas.
> Additionally the example provided on that page didn't make any sense to me
> in the context of a JSVGCanvas.
>
> Here is a sample SVG that renders fine in a browser, but when I try to
> render in a JSVGCanvas, it renders, but the mouseover functionality does
> not
> work. Is this supported by Batik? How can I get this working?
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
> width="200px" height="200px" viewBox="0 0 200 200" enable-background="new 0
> 0 200 200" xml:space="preserve">
>
> <rect class="hoverblack" id="square1" x="69.5" y="20.5" fill="#0000FF"
> width="60" height="60"/>
> <rect class="hovergreen" id="square2" x="69.5" y="120.5" fill="#FF0000"
> width="60" height="60"/>
> </svg>
>
> --
> View this message in context:
> http://batik.2283329.n4.nabble.com/Rendering-CSS-in-JSVGCanvas-tp4470592p4470592.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
>