Skip to content

Cthulahoop/drawMethods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canvas Drawing Extensions

This is a port of some of my old ActionScript drawing methods, updated for use with HTML canvas. The intent is to make them work as close to the default drawing methods as possible, so I've extended the native CanvasRenderingContext2D object so that they are called via the context object, just like lineTo or fill. Note that they only create the path of the shape, so to see it on a canvas you will need to call fill() or stroke() to render them.

The included methods are:

  • path
  • polygon
  • roundedRect
  • star/burst
  • wedge

Please refer to the JS comments for useage.

About

A set of drawing methods that extend the capabilities of CanvasRenderingContext2D.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors