Re: [csswg-drafts] [css-shapes] CSS flexibility for `path()`s (and let’s fix paths while we’re at it?) (#9889)

OKAY. All together, I suggest then that our circle/ellipse command set be:

```
arc <by-to> <coordinate-pair> of <length-percentage>{1,2}
    [ flip? || [small|large] || rotate <angle> ]

circle <by-to> <coordinate-pair>
     [ of <length-percentage> [ <angle>{2} || skip-line ]
     | <angle> ]

ellipse <by-to> <coordinate-pair> 
        of <length-percentage>{2} 
        [ [rotate <angle>] || <angle>{2} || skip-line ]

corner <by-to> <coordinate-pair> via <coordinate-pair>
     [ of <length-percentage>
     | of <length-percentage>{2} [rotate [ <angle> | auto-first | auto-second | auto-center ]]?]
```

* `arc` is as defined already, the only change is that we're changing from `[cw | ccw]` to `flip?`
* `circle` defines a circle with the given center. 
 * You can specify the radius explicitly, along with start/end angles (0deg = top of circle), and whether to draw the line to the from the start point to the beginning of the arc. If angles are omitted, draws a full circle, starting/ending at the point closest to the start point.
 * Or you just let the radius and start angle be auto-calculate to make the arc begin at the start point, and just specify the sweep of the arc.
* `ellipse` is the same as circle, but with two radiuses and a rotation added. No shorthand form to auto-calculate radius.
* `corner` defines a rounded corner of the given radius. If elliptical, can also rotate, with some auto-rotate options to align the ellipse with the first or second line, or the bisector of the lines.

I'm slightly uncomfortable with the fact that circle/ellipse/corner all use `<by-to> <coordinate-pair>` for things that aren't the endpoint; in English it reads slightly oddly that `circle to 50px 100px` doesn't end at (50px, 100px). But I think that the benefit of making this read better are far outweighed by the downside of using different terms that mean the same thing.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9889#issuecomment-1933199569 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 8 February 2024 01:01:57 UTC