Re: SVG11: problem with rounded rect specification

Peter Moulder wrote:
> The relevant text is the first paragraph after
> http://www.w3.org/TR/SVG11/shapes.html#RectElementRYAttribute.
> 
> If exactly one of rx, ry is specified then the relevant sentences are:
> 
> # If a properly specified value is provided for rx but not for ry, then
> # the user agent processes the 'rect' element with the effective value
> # for ry as equal to rx.
> (...)
> # If ry is greater than half of the height of the rectangle, then the
> # user agent processes the 'rect' element with the effective value for
> # ry as half of the height of the rectangle.
> 
> Take the case width=100, height=10, rx=30 (and ry unspecified).
> Then by the first sentence, the effective value for ry = rx (presumably
> meaning ry=30).
> 
> The simplest interpretation of the fourth sentence is that ry isn't
> specified, so this sentence doesn't apply, and we have rx=30,ry=30.
> Which would give an interesting-looking shape given that height=10.

I find it very clear from the text that the steps are to be performed in 
order. The first two provide default values for both attributes, the 
last then deal with a special case. Reading it again, the only 
interpretation I get for the fourth sentence is that we take whatever 
value ry has irrespective of where that value came from, and limit it to 
h/2.

> Also, it doesn't seem clear how CSS rules interact with the meaning of
> "provided value".  However, I haven't carefully read
> http://www.w3.org/TR/SVG11/styling.html.  (Of course it might be nice if
> one needn't thoroughly read other parts of the spec to know whether or
> not those other parts are relevant to the interpretation of the
> shapes.html page.)

rx/ry aren't properties, they can't be specified using CSS.

-- 
Robin Berjon

Received on Saturday, 14 August 2004 13:59:02 UTC