by zcorpan » Fri Sep 18, 2009 8:06 am
Certainly it's quite possible to understand a subject regarding canvas and vector images without being familiar with all vector image formats.
Unless you're talking about something other than the canvas feature in HTML5, then the canvas API is very much connected to this subject since the API is basically all there is to the canvas feature.
The canvas API has a toDataURL method that defaults to exporting to PNG but some browsers also support exporting to JPEG. Exporting to a vector format like SVG or PDF or EMF or EPS requires the browser to keep track more state while drawing stuff with the canvas API, but it's certainly possible and the spec suggests that a UA could support exporting to SVG.
If you want this feature supported in browsers then I suggest you file a feature request to your browser vendor.
Since keeping state is more overhead than not keeping state, and is only necessary when the author wants to export to a vector image format, maybe there should be a new IDL attribute or method added to the 2d context interface that enables exporting to vector formats. But this would only be needed if browser vendors are interested in implementing exporting to vector image formats (and don't want the overhead without opt-in).