Thursday, December 25, 2008

question: is svg path data definition retarded?

Imagine you were going to write an XML description of a polygon type structure... Wouldn't you do something like:

<poly>
<pt x="100" y="100"/>
<pt x="300" y="100"/>
<pt x="200" y="300"/>
</poly>

There are probably a lot of variations, but wouldn't it look something like that?

I mean... it's kinda a no brainer, right? Sort of hard to screw up, though there are probably a lot of ways to get it right.

If you were handing this out as a homework assignment in an XML 101 class, what grade you would give someone who came up with something like this:

<path d="M 100 100 L 300 100 L 200 300 z"/>

What if they went on to tell you, you could also write it in any of the following acceptable forms:

<path d="M 100 100 L 300 100 L 200 300 z"/>
<path d="M 100,100 L 300,100 L 200,300 z"/>
<path d="M 100 100L300 100L200 300 z"/>

Would you think they were being smart by saving space?

What if they told you:

  • the "M" meant "move to the absolute position"

  • the "m" meant "the point which relative to the last point"

  • the "L" meant "draw a line to the absolute position"

  • the "l" meant "draw a line the point which relative to the last point"


Would you think they were really smart? Or would you think they were pretty dumb?

Would you recommend it for inclusion in the W3 SVG standard?

I'm just wondering... cuz to me... it seems pretty stupid.

Way to drop the ball... I really would not have thought someone could screw that up so badly.

No comments:

Post a Comment