[whatwg] Adding SVG Filter-like functionality to Canvas 2D Context

Robert O'Callahan robert at ocallahan.org
Mon Jul 6 13:54:08 PDT 2009

On Tue, Jul 7, 2009 at 2:09 AM, <hansschmucker at gmail.com> wrote:

> SVG Filters are a relatively easy spec, where the most important parts can
> be implemented in a matter of hours.

Speaking as an implementor of SVG filters, I don't believe you :-).

Am I the only one seeing any benefit for this or does anybody else think
> that would be hope for such a proposal?

I agree that we need a convenient way to use filters with canvas. But I
would rather not create an entirely new object model.

How about a drawImageWithFilter method that takes the same set of parameters
as drawImage plus a reference to an SVG <filter> element? The image is used
for Source/SourceAlpha and the size of the image establishes the object
bounding box for filter and filter primitive units. Since drawImage can draw
a canvas, this seems completely flexible.

"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090707/3351b1b9/attachment-0002.htm>

More information about the whatwg mailing list