Skip to content

Instantly share code, notes, and snippets.

@nicksheffield
Created May 1, 2014 04:03
Show Gist options
  • Select an option

  • Save nicksheffield/aa6b02d384d82c1fdd0b to your computer and use it in GitHub Desktop.

Select an option

Save nicksheffield/aa6b02d384d82c1fdd0b to your computer and use it in GitHub Desktop.
Adds the circle method to 2d canvas context
CanvasRenderingContext2D.prototype.circle = function (x, y, r) {
this.beginPath();
this.arc(x, y, r, 0, 2 * Math.PI, false);
this.closePath();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment