Skip to content

Instantly share code, notes, and snippets.

@brettz9
Created March 25, 2011 06:32
Show Gist options
  • Save brettz9/886447 to your computer and use it in GitHub Desktop.
Save brettz9/886447 to your computer and use it in GitHub Desktop.
// Chaining is usable for custom methods or direct canvas wrappers:
var ctx = C2D2([1000, 450])
.$shadow({color:'green', blur:2, offset:[5, 10]})
.$line({color:'red', width:5, xy:[[75, 50], [100,75], [100,25]]})
.$fill({color:'blue', xy:[[175, 150], [200,175], [200,125]]});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment