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

[whatwg] Canvas tag - single or multiple contexts?

From: Gregg Tavares <gman@google.com>
Date: Mon, 21 Dec 2009 11:50:33 -0800
Message-ID: <de4bd3190912211150u2d891d46m4785dfe051e0d024@mail.gmail.com>
What is the intent of the getContext function on the <canvas> tag?

Should it be possible to get multiple simultaneous different contexts as in?

var ctx2d = canvas.getContext("2d");
var ctxText = canvas.getContext("fancy-text-api");
var ctxFilter = canvas.getContext("image-filter-api");

ctx2d.drawImage(someImage, 0, 0);
ctxText.drawText(0, 0, "hello world");
ctxFilter.radialBlur(0.1);

?

OR

is canvas only allowed 1 context at a time?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20091221/f5d9f094/attachment.htm>
Received on Monday, 21 December 2009 11:50:33 UTC

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