[whatwg] [canvas] Multiple closePath() after beginPath()?

Sven Drieling sd at sven-drieling.de
Wed Aug 2 06:25:42 PDT 2006


Hello,

is it allowed to use multiple closePath() calls after beginPath()? This
works with Opera 9.00 to draw two triangles but the paired method names
beginPath() and closePath() makes the impression that only
one closePath() could follow one beginPath() call. Maybe a closeSubpath()
method?

ctx.beginPath();

ctx.moveTo( 60,  50);
ctx.lineTo(110,  110);
ctx.lineTo( 10,  110);
ctx.closePath();

ctx.moveTo(180,  50);
ctx.lineTo(230, 110);
ctx.lineTo(130, 110);
ctx.closePath();
                                    
ctx.stroke();

 
tschuess
      [|8:)




More information about the whatwg mailing list