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 Cameron McCormack <cl...@csse.monash.edu.au> on 2003/06/16 10:36:59 UTC
Zero-area rect doesn't get rendered after its size is changed
Hi.
I had a look through the bugzilla to see if this was already reported,
but I couldn't see it.
This example doesn't display the rect after the script gets run:
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200">
<rect id="r" x="50" y="50" width="0" height="0" stroke="black" stroke-width="3" fill="yellow"/>
<script language="text/ecmascript">
var r = document.getElementById("r");
r.setAttribute("width", 100);
r.setAttribute("height", 100);
</script>
</svg>
I know the spec says that rendering of the rect should be disabled if
either the width or height is 0, but surely this doesn't mean even if
it's changed to a non-zero later?
Thanks,
Cameron
--
Cameron McCormack
// clm@csse.monash.edu.au
// http://www.csse.monash.edu.au/~clm/
// icq 26955922
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org
RE: Zero-area rect doesn't get rendered after its size is changed
Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "CM" == Cameron McCormack <cl...@csse.monash.edu.au> writes:
CM> Hi. I had a look through the bugzilla to see if this was already
CM> reported, but I couldn't see it.
Please do report it. Your test is a pretty good one.
CM> This example doesn't display the rect after the script gets run:
CM> <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"
CM> viewBox="0 0 200 200"> <rect id="r" x="50" y="50" width="0"
CM> height="0" stroke="black" stroke-width="3" fill="yellow"/> <script
CM> language="text/ecmascript"> var r = document.getElementById("r");
CM> r.setAttribute("width", 100); r.setAttribute("height", 100);
CM> </script> </svg>
CM> I know the spec says that rendering of the rect should be disabled
CM> if either the width or height is 0, but surely this doesn't mean
CM> even if it's changed to a non-zero later?
Correct this is a bug. Unfortunately it is a hard bug to fix, it
means that we have to have a new state for rendering nodes. Existant
but non-functional. This also gets to our (mis)handling of 'display'
(which has the same issue).
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org