- From: honyk <j.tosovsky@email.cz>
- Date: Sat, 21 Sep 2013 00:29:01 +0200
- To: <www-svg@w3.org>
Dear All, in my svg files I use lot of circles and render a text on them. As the circle itself cannot be used as the textPath target, the final code is quite complicated. As a proof take the fact I cannot write the required code from the scratch without looking into the spec. I cannot remember the order and meaning all of those arc primitive options. It would be nice if the final code could be more readable. Yes, I mean to add a bit of 'syntactic sugar' for something what is already in the spec. By that new primitive I mean the simple circle. With the center in the last coord, with the specified diameter and starting at Ymin. The direction (clockwise/ccw) would be defined by diameter sign (+/-). I propose 'D' symbol as 'd'iameter. It would be case insensitive (relative/absolute doesn't matter here). Please compare: <circle cx="200" cy="200" r="150"/> <path d="M200 50A150 150 0 1 1 200 350A150 150 0 1 1 200 50"/> <path d="M200 200D300"/> donut: <path d="M200 50A150 150 0 1 1 200 350A150 150 0 1 1 200 50M200 100A100 100 0 1 0 200 300A100 100 0 1 0 200 100"/> <path d="M200 200D300 D-200"/> The main difference between A and D is the final coord, which in case of D stays in the center. In the future I would even mark the circle element as deprecated in favor of this new path syntax (it is shorter and can be used also for text rendering). Thanks, Jan
Received on Friday, 20 September 2013 22:29:28 UTC