Skip to content

Instantly share code, notes, and snippets.

@brettz9
Created March 25, 2011 06:32
Show Gist options
  • Select an option

  • Save brettz9/886450 to your computer and use it in GitHub Desktop.

Select an option

Save brettz9/886450 to your computer and use it in GitHub Desktop.
// Using only direct canvas method wrappers (which use the same
// name as official canvas methods):
ctx.shadowColor('green').shadowBlur(2).shadowOffsetX(5).shadowOffsetY(10);
// Using one utility method (at the end) amongst direct canvas method wrappers:
ctx.shadowColor('green').shadowBlur(2).$shadowOffset(5, 10);
// Using custom utility exclusively with its own simplified
// non-canvas (but easily derived) syntax:
ctx.$shadow({color:'green', blur:2, offset:[5, 10]});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment