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: Dean Jackson <dino@apple.com>
Date: Thu, 21 Apr 2011 05:12:39 +1000
Cc: public-fx@w3.org
Message-id: <67E28704-A9C1-4DAB-911F-FFB5EA0AE40D@apple.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

On 20/04/2011, at 11:44 AM, Tab Atkins Jr. wrote:

> 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.

Excellent. Are you responsible for that spec? And will you take this on - whatever that means, maybe an email to www-style?

> 
> 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.

I think noise() or turbulence() are good names. I don't see a need to be so exact unless we're going to add multiple algorithms.

> 
> 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'd suggest a new value for this. Just because it is possible doesn't mean we should encourage it. Do you see a chessboard and think "oh, overlapping rotated repeating gradients with hard edges"?

>  I dunno about
> haloes/star shines, but I'm not averse to them if they're useful.

It's not terribly common, but I can imagine people wanting to bling-up their site header with a little sunburst (which animates across the text as the drop shadow moves in sync). Or use <blink>.

But I'm a big fan of starting small, especially if you know that you're not making enhancements hard to add at a later stage. So probably no need for this now.

Dean
Received on Wednesday, 20 April 2011 19:13:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 20 April 2011 19:13:10 GMT