[whatwg] Comments on <canvas> tag

I really like that idea. But I think you'd put the method on
CanvasRenderingContext2D instead of canvas itself?

foo.getContext("2d").drawElement(document.getElementById("ds1title"), 45,
60);


In the latest Flash player, you can do something similar with
BitmapData.draw(), but there are additional arguments for matrix transform,
blending mode, clip rectangle and smoothing options. I'd certainly want to
at least be able to scale and clip what I'm drawing.

Peter


On 5/17/06, Gervase Markham <gerv at mozilla.org> wrote:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20060520/d3438ec4/attachment.htm>

Received on Saturday, 20 May 2006 08:28:27 UTC