W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2006

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

From: Sven Drieling <sd@sven-drieling.de>
Date: Wed, 2 Aug 2006 15:25:42 +0200
Message-ID: <200608021518.11667.sd@sven-drieling.de>
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:)
Received on Wednesday, 2 August 2006 06:25:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:28 UTC