Re: Proposal for clarifying edge-cases for the rx and ry handling on the rect element

Erik Dahlstrom:
> I was given ACTION-2367 to propose wording for clarifying the handling
> of rx and ry on rect elements[2].
…
> I propose to change that to the following algorithm (in pseudocode):
>
> if(rx)
>  clamp(rx, width/2)
>
> if(ry)
>  clamp(ry, height/2)
>
> if(rx && !ry) {
>  ry = rx;
>  clamp(ry, height/2);
> }
>
> if(!rx && ry) {
>  rx = ry;
>  clamp(ry, width/2);
> } 

I don’t have an opinion on whether clamping should happen in this order
or such that the two clamp() calls happen just before the assignment
statements they follow.

I’ll just briefly note though that the CSS3 Borders and Backgrounds
module defines clamping of box boder radii in a different way:

  http://dev.w3.org/csswg/css3-background/#the-border-radius

which is basically to reduce all four corner radii uniformly until they
fit, IIUC.

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

Received on Wednesday, 25 February 2009 04:38:18 UTC