W3C home > Mailing lists > Public > www-style@w3.org > February 2011

Re: Filter Templates

From: Rik Cabanier <cabanier@gmail.com>
Date: Thu, 24 Feb 2011 15:45:58 -0800
Message-ID: <AANLkTinVGiGqaThFAfhZ=ZJERFDN7=4+stLfnXwpY9up@mail.gmail.com>
To: Chris Lilley <chris@w3.org>
Cc: Alistair MacDonald <al@bocoup.com>, Dean Jackson <dino@apple.com>, Rik Cabanier <cabanier@adobe.com>, Cameron McCormack <cam@mcc.id.au>, Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>, "public-fx@w3.org" <public-fx@w3.org>
On Thu, Feb 24, 2011 at 3:17 PM, Chris Lilley <chris@w3.org> wrote:

> On Thursday, February 24, 2011, 11:01:51 PM, Alistair wrote:
>
> AM>  I would think it would be quite important to cover the basic
> AM> overlay     primitives offered in most graphics packages, such as:
> AM>
> AM>  Screen
> AM>  Blend
> AM>  Add
> AM>  Multiply
> AM>  Exclusion
> AM>  Dodge
> AM>  Hard-light
> AM>  Soft-light
> AM>  Burn
> AM>  Difference (difference is also great for getting visual test
> results when comparing builds)
> AM>  Etc
> AM>
> AM>  ( I am aware we have some of these filter already available to SVG )
>
> They are in the compositing spec, and we have all of them.
>
>
> http://dev.w3.org/SVG/modules/compositing/master/Overview.html#containerElementCompositingOperators


that looks close to the Adobe imaging model with the exception of 'isolate'.
Is that always assumed to be true?


>
>
> AM>  Could anyone tell me if there has been an update to the way
> AM> sources     work for filters on individual DOM elements yet? Last
> AM> time I checked     there was no way to execute the following kind
> AM> of behavior: (Using     multiple DOM elements as separate sources)
>
> <svg version="1.1" xmlns="http://www.w3.org/2000/svg">
>  <defs>
>    <filter id="srcLoadedOverlay">
>      <feImage xlink:href="url(#canvas0)" result="img1" />
>      <feImage xlink:href="url(#canvas1)" result="img2" />
>      <feImage xlink:href="url(#canvas2)" result="img3" />
>      <feBlend in="img1" in2="img2" result="blend1" mode="multiply" />
>      <feBlend in="blend1" in2="img3" mode="lighten" />
>    </filter>
>  </defs>
> </svg>
>

That seems like a very complex solution which doesn't seem applicable to
HTML.
Instead you could define blending of 2 groups like this:
<html>
....
<body>
..... <- backdrop
<div style="blend: layer;"> <- group A
  ... <- text, images, etc
  <div style="blend: multiply;"> <- group B
    .. <- text, images, etc
  </div>
</div>
This would blend group a with b and would ignore the backdrop


>
> xlink:href takes a URL directly, not wrapped in url().
>
> It would seem reasonable to state in the spec that if a canvas element is
> referenced by its id, then the graphics state of the canvas is used as the
> input to the filter. (This already works for svg elements, for example).
>
> Of course this immediately causes same-origin restrictions to apply to the
> filter.
>
>
>
Received on Monday, 28 February 2011 15:17:13 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:37 GMT