Re: Proposal: <star> element

On Mon, Apr 14, 2014 at 10:59 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Mon, Apr 14, 2014 at 9:26 AM, Gavin Kistner <phrogz@me.com> wrote:
> > "Sufficient" is not sufficient. I would call it "workaround exists". By
> the
> > same argument, SVG should get rid of the <rect>, <circle>, <ellipse>,
> > <polygon>, <polyline>, and <line> elements. After all, the <path> element
> > covers all of these.
> >
> > The discussion should not be whether or not one _can_ draw the elements,
> but
> > if doing so is sufficiently succinct and simple.
>
> ...and commonly used enough to justify the cost of adding it.
>
> Private discussion with Philip has convinced me that adding a <star>
> element (or a <polar> element, or any other particular instance of
> something that's star-like and possibly does more) is probably not
> worth it.  Stars happen, but they're not really common.


I thought so too, but searching for "SVG images" brings up a lot of artwork
that uses stars (and triangles which are also stars)
In addition, applications such as Illustrator and Inkscape offer them as
primitives alongside circles and rectangles and it's easy to find js
libraries that support them (ie http://paperjs.org/reference/path/).


> Plus, the
> bearing command, which I think *does* justify itself, makes generating
> stars fairly easy.


I don't see much value in the bearing command. Do you have any examples of
drawing applications or popular js libraries that offer this?
It is also more invasive as it impacts the already complex path command
string. See http://www.w3.org/TR/SVG2/paths.html#PathDataLinetoCommands for
all the commands that are impacted.



>  It might require some experimentation, but it's
> easy to do guess-and-check and get something decent, as opposed to
> today where it requires trig.
>
> I think a real polygon element, that just did simple regular polygons
> with an optional rotation, would probably pass the "sufficiently
> simple *and* useful" test, though.  I know it's failed in the past,
> but "too simple" isn't a great argument.  I *do* see regular polygons
> a good bit of the time, and they're simple enough that there's not
> much call for customization.  They're *even easier* to write with the
> bearing command, but I think they can justify themselves.
>
> ~TJ
>
>

Received on Monday, 14 April 2014 18:41:37 UTC