[html5] Points in a <CANVAS> element

Ian Hickson ian at hixie.ch
Fri Feb 1 00:46:55 PST 2008


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