[whatwg] Comments on <canvas> tag
Gervase Markham
gerv at mozilla.org
Wed May 17 08:51:47 PDT 2006
Lachlan Hunt wrote:
> That's unfortunate because text can often be an important part of an
> image. Consider a graph or chart generated from a table of data
> elsewhere in the page, it's important to correctly label the axis and
> for such labels to remain in the image when it's exported to PNG (or any
> other image format).
>
> Could this feature be considered for a future revision of the spec, if
> it's not going to make it into this one?
This came up in Vlad's presentation at XTech today. My suggestion was to
implement drawDiv() or drawElement(), in addition to drawWindow(). That
way, you could fix the potentially hairy text rendering problem with one
simple API call, which could be made using the backup accessible content
which you had placed inside the <canvas> tag anyway. Everyone wins.
<canvas id="foo">
<table>
<tr>
<th id="ds1title">Data Set 1</th>
<th id="ds2title">Data Set 2</th>
...
foo.drawElement(document.getElementById("ds1title"), 45, 60);
(or something like that; you get the idea).
Gerv
More information about the whatwg
mailing list