Re: Canvas in FX

On Mon, Nov 22, 2010 at 4:04 PM, Charles Pritchard <chuck@jumis.com> wrote:
> Hello FX list.
>
> Some time, long ago, Doug expressed interest in developing SVG to better use
> the HTML [canvas] tag. Recently on the WHATWG mailing list, Robert
> O'Callahan shared an idea for Canvas, to help with resolution independence,
> and I think it fits nicely as an SVG+CSS Canvas note. I want to stress, that
> getContext and getCSSCanvasContext are and should remain two separate APIs,
> as they have differing semantics.
>
> WebKit introduced getCSSCanvasContext quite some time ago:
> http://webkit.org/blog/176/css-canvas-drawing/
>
> Robert's proposal would make reasonable sense for a CSSCanvasContext, and
> could work especially well when a canvas object is used inside of an SVG
> graph, provided  canvas is apprised of scale re-size events of its parent
> group.
>
> This is intended strictly for CSSCanvas, even though I'm using the
> HTMLCanvas tag:
>
> <svg><g style="scale(1.5, 1.5)"><canvas></canvas></g></svg>
>
> Tweaking Robert's proposal, the canvas backing store would be scaled by 1.5
> times, so that, when displayed, it matches the same resolution as the <g>.
>
> I realize this is my first post on the list, and I haven't fully explained
> the use case. But I thought I'd start somewhere.
>
> The canvas backing store is a bitmap. That's how it works. That backing
> store size could be dynamically increased and decreased, to best match the
> css resolution of its containing group.
>
> Integrating that trick into SVG+CSS Canvas would make it easier for authors
> to use Canvas within an SVG document, keeping the bitmap resolution in line
> with the SVG resolution, and optimizing for a smaller resolution when the
> containing element is indeed smaller.

Apologies, but I don't understand whatsoever what you're trying to do
here.  I followed the thread where you originally talked with roc, but
I can't understand how you got from there to here, or even what "here"
is.

Could you try to explain what you're trying to achieve in a different way?

~TJ

Received on Tuesday, 23 November 2010 23:05:30 UTC