Skip to content

Instantly share code, notes, and snippets.

@siefkenj
siefkenj / example.coffee
Created October 16, 2012 05:30 — forked from devongovett/example.coffee
A CoffeeScript class that parses and renders SVG paths to the <canvas> element.
# fill path to ctx
Path.fill(ctx, "M250 150 L150 350 L350 350 Z")
# stroke
Path.stroke(ctx, "M250 150 L150 350 L350 350 Z")
# clip
Path.render(ctx, "M250 150 L150 350 L350 350 Z")
ctx.clip()