Wow, bummer -- that's a surprise and disappointment to me that the canvas 2d API isn't more like PostScript in that way. Filling then stroking the same path is a very common operation.
NeWS's dialect of PostScript (but not standard Adobe PostScript) had currentpath / setpath operators to save and restore the current path as a first class object, so you could use it any number of times later in different contexts. I wish the canvas 2d api had that too, plus some set operations on regions.
It'd be fun and worth coding up a WebGL renderer, I think! Then you can pass all the points in one big chunk of memory, and draw it from any direction, with lighting and shadows!
NeWS's dialect of PostScript (but not standard Adobe PostScript) had currentpath / setpath operators to save and restore the current path as a first class object, so you could use it any number of times later in different contexts. I wish the canvas 2d api had that too, plus some set operations on regions.
http://bitsavers.trailing-edge.com/pdf/sun/NeWS/NeWS_1.1_Man...
It'd be fun and worth coding up a WebGL renderer, I think! Then you can pass all the points in one big chunk of memory, and draw it from any direction, with lighting and shadows!