Created
March 3, 2015 13:49
-
-
Save barning/4d16a1c03405b9c30c2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ctx = new C2S(width,height); | |
ctx.translate(width/2,height/2); | |
var poly=[ v2.x, v2.y, v3.x, v3.y, v4.x, v4.y, v5.x, v5.y,v6.x, v6.y ]; | |
ctx.beginPath(); | |
ctx.moveTo(poly[0], poly[1]); | |
for( item=2 ; item < poly.length-1 ; item+=2 ){ctx.lineTo( poly[item] , poly[item+1] )} | |
ctx.closePath(); | |
//ctx.fillStyle = "rgba(255,255,255,0)"; | |
ctx.strokeStyle = 'rgb('+r+','+g+','+b+')'; | |
ctx.lineWidth = 5; | |
ctx.lineJoin = "miter"; | |
//ctx.fill(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment