<polygon> element attributes...

Hi,

I don't know about Joe Bloggs and his dog, but I'd want to put 'cx' and
'cy' attributes into the DTD for the polygon element?

As I've been reading the spec and writing code, I've been collecting
some ideas, suggestions and questions.  These are not recommendations,
just some things off the top of my head...  Unfortunately I'm a
researcher by employment and I tend to question everything ;)

Other than the above:

Would it be better to use <polyline verts="x,y;x,y;x,y;"/>?  It just
seems less error prone to me.  You still have to walk the verts string
twice, to work out how many sets there are, allocate the array then fill
it.  This would also allow you to strip all white space from the string
before you parse it without affecting the numerical representations.

Some suggestions around the <path> element:

Same suggestion as above.  Use , and ; as coordinate separators. 
Especially here, this would allow you to do things like
d="D100,100,,,50" to draw a circle. (IMHO the r? arguments should be
before the a? arguments...) This doesn't increase the size of minimal
representation, but does make it a lot easier (and less error prone) to
parse.  Manual editors would leave spaces to make their eyes happy, but
people won't normally manually edit a file where minimal size is a
criteria?  The current spec seems to prefer white space as a
separator...  I'd worry that during editing/processing it's too easy to
remove this space.

How about 'z' to close a path and 'Z' to close a path and fill it? 
Otherwise you have to fiddle with the styles in the middle of a lot of
paths that I can think of...

Shouldn't there also be path equivalents to rect and polygon?

Just in trying to parse and represent <path> and <data> it seems to me
that they are going to be very hard to reflect into the DOM in a way
that is manageable.

That's enough for now...

 -Jeremy

-- 
  |   "Come home my prodigal son, come home and lets be one,
--+--  don't want to see you cry, don't make me tell you why,
  |    you've lived in a house with me, my blood has set you free,
  |    in the world you'll surely die, nothing else will satisfy." -MIC

Received on Sunday, 13 June 1999 20:21:29 UTC