[html5] Points in a <CANVAS> element

John S. Urban urbanjost at comcast.net
Thu Jan 31 19:41:31 PST 2008

The HTML5 specification appears to say to ignore a line composed of just a moveTo() call in a <CANVAS> element,
but both the opera(1) and firefox(1) browsers appear to ignore any polyline that does not change the position. That is,
    moveTo(x,y) lineTo(x,y)
does not produce a point. I think it should.

I have been collecting my experiences with the <CANVAS> implementations in the opera(1) and firefox(1) browsers at
where I have this note ...

# POINTS: Neither browser showed a line of zero length, even when it contained two points (The HTML5 proposal currently says to ignore a path with "less than two" points in it; it does not imply lines of null length are ignored though). In order to make points easy to render I think a path composed of just a move and/or a move and then draws(s) to the same point should show a circle with a diameter equal to the current line width or a square with a side equal to the current line width or a minimum of one unit (or pixel) in order to make points visible. Maybe an option to display markers of different styles at such "points" would be nice (an X, a +, a hollow circle, ...)

I am currently working around this by processing all my polylines thru JavaScript procedures. Look at the
example at
that makes simple points show up. Does anyone else think the browsers are wrong in not making a point or marker
to represent polylines whose elements all have the same coordinates?

Why would someone put a moveTo() in a file without intending it to render something?

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/help-whatwg.org/attachments/20080131/910cf406/attachment-0001.htm>

More information about the Help mailing list