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

[whatwg] Comments on <canvas> tag

From: Gervase Markham <gerv@mozilla.org>
Date: Wed, 17 May 2006 17:51:47 +0200
Message-ID: <446B4693.40205@mozilla.org>
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
Received on Wednesday, 17 May 2006 08:51:47 UTC

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