Skip to content

Instantly share code, notes, and snippets.

@barning
Created March 3, 2015 13:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barning/4d16a1c03405b9c30c2d to your computer and use it in GitHub Desktop.
Save barning/4d16a1c03405b9c30c2d to your computer and use it in GitHub Desktop.
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