[html5] Points in a <CANVAS> element

John S. Urban urbanjost at comcast.net
Fri Feb 1 17:37:07 PST 2008

More simply put, points are an essential graphic element. A<CANVAS> element 
apparently provides no support for them.
even a CALCOMP graphics library from thirty years ago provided a way to 
generate points. If the obvious
ways to support them (ie a separate procedure such as Point(x,y) or the 
rendering of a point when a polyline of
zero length is encountered) do not exist then how is a point supposed to be 
generated?  There is beauty in simplicity, but
this is a lack of basic functionality. Many people will be forced to kludge 
their codes to change a null line to a
line of 1 unit in length, or to filter for lines of zero length and draw a 
circle and so on.  So what is the supported method
for generating points? A simple example would be most helpful.

\----- Original Message ----- 
From: "Ian Hickson" <ian at hixie.ch>
To: "John S. Urban" <urbanjost at comcast.net>
Cc: <help at lists.whatwg.org>
Sent: Friday, February 01, 2008 3:46 AM
Subject: Re: [html5] Points in a <CANVAS> element

> On Thu, 31 Jan 2008, John S. Urban wrote:
>> 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.
> The spec currently says that empty line segments are removed before
> stroking, so the aforementioned behaviour is per spec. Why would we move
> away from interoperability? (Removing empty line segments also solves
> issues with rectangles and so I don't really want to remove it.)
> (This was recently changed, by the way.)
>> I am currently working around this by processing all my polylines thru
>> JavaScript procedures. Look at the example at
>>   http://home.comcast.net/~urbanjost/canvas/vogle4.html
>> 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?
> I don't know.
> -- 
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.' 

More information about the Help mailing list