W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2011

Re: generators in filters (or maybe even "anywhere there are images")

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 19 Apr 2011 18:44:32 -0700
Message-ID: <BANLkTindt745vTXOv90c4MgxphC7M751zQ@mail.gmail.com>
To: Dean Jackson <dino@apple.com>
Cc: public-fx@w3.org
On Tue, Apr 19, 2011 at 6:14 PM, Dean Jackson <dino@apple.com> wrote:
> Then I was thinking that these generator effects are similar to other parts of CSS, in particular gradients. There have been some proposals in this area. For example:
>
> - WebKit's -webkit-canvas value, which allows an element to use a canvas element as an image in background, border, whatever.
> - Mozilla's -moz-element, which does the same but with the rendering of any element
>
> Examples of generators may be:
>
> - checkerboards
> - stripes
> - noise
> - star shines
>
> They don't sound too useful in isolation, but graphics artists may feel otherwise. Anyway, the important part of this message is the 3rd paragraph. I don't want to complicate the syntax or implementations. "SVG" filters provide the functionality, so it definitely isn't essential.

Yup, these are just generated images, and should probably be defined
in the Image Values module.

Of the existing Filter primitives that do this, feFlood is already
doable with the image() function (just doing "image(blue)" produces a
pure-blue image, because it's the fallback color for an empty list of
image declarations).  feImage is done with the url() function.
feTurbulence is something we should add, as perlin noise is really
useful to add a bit of non-uniformity to designs (I've seen a lot of
recent stuff where a design is done just with gradients, but with a
noise image laid on top); it should probably be a perlinnoise()
function or something.

Stripes are already doable with linear gradients.  It turns out that
you can get a checkerboard with just two linear gradients combined
together <http://leaverou.me/css3patterns/>.  I dunno about
haloes/star shines, but I'm not averse to them if they're useful.

~TJ
Received on Wednesday, 20 April 2011 01:45:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 20 April 2011 01:45:21 GMT