Re: SVGFilter and ImageData

Am 28.01.2011 um 14:58 schrieb Erik Dahlstrom:

> I think that would be nice, though it might be better to provide a syntax more similar to how shadows are implemented in canvas?


Shadows get applied to every shape that gets drawn on to the context. So it is pretty easy to get the extends of the shape with the shadow. On the other hand it is not possible to apply a group shadow as far as I know. Of course you could draw multiple shapes into another context and draw the other context with a shadow on the first context. The same would apply to filters. How do you want to set it? canvas.filter(referenceToSVGFilterObject)? And every shape runs through the filter chain before it gets drawn on the context? Would it make more sense to filter the ImageData, similar to existing solutions like [1]?
For the current concept in SVG 1.2 Filter, we would have a hard clipping area, given by the input-output-imagdata. This would limit the filter size to a maximum size, other than applying the filter to the context. 

Cheers,
Dirk


[1] http://www.nihilogic.dk/labs/imagefx/

Received on Monday, 31 January 2011 15:52:54 UTC