W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2009

[whatwg] SVG extensions to <canvas>

From: Charles Pritchard <chuck@jumis.com>
Date: Mon, 4 May 2009 13:51:23 -0700 (PDT)
Message-ID: <2436.67.171.33.219.1241470283.squirrel@mx.visc.us>
Oliver writes:
>> I believe drawImage should be left as it currently is (basically taking
>> objects that are intrinsically bitmap-ish), and if we were to add an
>> ability
>> to draw an svg element into the canvas it should really be an simple
>> drawElement(Element) method instead, after all, why restrict it it just
>> to
>> SVG elements?

Giovanni writes:
> <svg> has an intrinsic size (like <video>,<img>, and
> <embed>/<object>), the other have not.

Adding onto Giovanni's statement:

SVG is a graphics format -- there are specifications as to how each
element should render (how it should look). HTML has no such
specifications.

While you can roll your own drawElement(Element), it will give you
unstable output. Drawing an SVG should give you stable output across all
browsers (supporting SVG).

It's possible that a CSS Box Element could be drawable, per standards. I
think that's something to be inherited from SVG-land, not an item for the
Canvas specs. I'm sure SVG will gradually borrow more from the CSS Level 3
model as it matures. Meanwhile, roll your own.

-Charles
Received on Monday, 4 May 2009 13:51:23 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:48 UTC