- From: Nikos Andronikos via GitHub <sysbot+gh@w3.org>
- Date: Mon, 08 Aug 2016 11:00:38 +0000
- To: public-svg-issues@w3.org
nikosandronikos has just labeled an issue for
https://github.com/w3c/svgwg as "DoC_positiveResponse":
== Shorter equivalent path for the <circle> element ==
Currently, the spec defines an equivalent path for a `<circle>`
element as follows:
> Mathematically, a ‘circle’ element is mapped to an equivalent ‘path’
element that consists of four elliptical arc segments, each covering
a quarter of the circle. The path begins at the "3 o'clock" point on
the radius and proceeds in a clock-wise direction (before any
transformations).
[Source](https://svgwg.org/svg2-draft/shapes.html#CircleElement)
I would change that definition to use just two elliptical arcs,
starting from 12 o'clock.
```js
let cx = circle.cx.baseVal.value;
let cy = circle.cy.baseVal.value;
let r = circle.r.baseVal.value;
let equivalentPathData = [
{ type: "M", values: [cx, cy-r] },
{ type: "A", values: [r, r, 0, 0, 0, cx, cy+r] },
{ type: "A", values: [r, r, 0, 0, 0, cx, cy-r] }
];
```
See https://github.com/w3c/svgwg/issues/153
Received on Monday, 8 August 2016 11:01:05 UTC