Re: Filters spec: CSS vs SVG

On Thu, May 12, 2011 at 12:00 AM, Erik Dahlstrom <ed@opera.com> wrote:
> On Thu, 12 May 2011 00:02:49 +0200, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>
>> On Tue, May 10, 2011 at 6:30 PM, David Dailey <ddailey@zoominternet.net>
>> wrote:
>>>
>>> Tab wrote (about feDisplacement):
>>>
>>> "This is similar to how <feImage> will remain in the SVG syntax to pull
>>> images into the filter pipeline, but the corresponding concept in the
>>> CSS syntax is just the url() function."
>>>
>>> <feFlood> would presumably be in this same category, I suppose. (Just
>>> checking to see if I get the idea.)
>>
>> Yup, just use a color instead.  (Or, if Filters absolutely require an
>> image, you can use the image() function, like "image(blue)", to
>> generate an image of the appropriate color, but I want to avoid that
>> actually being necessary wherever possible.)
>
> Is there a way in image() to get a generated image of a particular size? The
> filter primitive subregion defines that for feFlood (and all the other
> filter primitives), and also the x/y offset (in the chosen coordinatesystem)
> to the filter region.

No, image(blue) defines an image with no intrinsic dimensions.  That's
a good reason to still have a composition primitive that can define
sizing/positioning relative to the composition canvas, like what
Filters have.


> Seriously though, I agree, and it would be nice if the CSSOM provided easy
> typed access to the stylerules. I'm not yet sure if the Filter Effects spec
> is the right place to add that, sounds more like a CSSOM thing to me.

Yeah, we shouldn't be trying to define this in Filters.  Anne van
Kesteren has started work in this direction already, and if he doesn't
pick it up again later this year I will.  But it'll get done, and it
should look something like your sketches.

~TJ

Received on Thursday, 12 May 2011 16:35:34 UTC