Re: feImage coordinates question

Erik Dahlstrom wrote:
> ...
>> Why is it different from the default of
>>          the filter effects region? (BTW, adding primitiveUnits =
>>          objectBoundingBox without adding x, y, width, and height
>>          breaks Batik.)
> 
> I'm not exactly sure of the history, but I think it's deliberate, there 
> are other examples in the spec using the same convention e.g <mask> and 
> <pattern>.

My interpretation has always been that userSpaceOnUse is usually what 
you want to work with (after all, that's basically what you normally use 
as well), but objectBoundingBox is more useful if you want to specify a 
portion of the bounding box (obviously), which is what is done with the 
filter effects region.

>  From 15.7.3:
> [[ If there are no referenced nodes (e.g., for ‘feImage’ or 
> ‘feTurbulence’), or one or more of the referenced nodes is a standard 
> input (one of SourceGraphic, SourceAlpha, BackgroundImage, 
> BackgroundAlpha, FillPaint or StrokePaint), or for ‘feTile’ (which is 
> special because its principal function is to replicate the referenced 
> node in X and Y and thereby produce a usually larger result), the 
> default subregion is 0%,0%,100%,100%, where percentages are relative to 
> the dimensions of the filter region. ]]
> 
> I agree that it could be made more clear, anyway the last part of the 
> sentence is where it matters. If you don't explicitly specify 
> x,y,width,height on the filter primitive element (feImage in this case), 
> then the default (lacuna) filter primitive subregion is the filter 
> region. You can try yourself what happens if you put the same values in 
> explicitly (x="0%" y="0%" width="100%" height="100%"), the rendering is 
> completely different since the percentages are relative to the viewport 
> not to the filter region.

Just to clarify: I assume percentages used for x,y,width,height of a 
filter primitive subregion (at least when 
primitiveUnits="userSpaceOnUse") are ALWAYS relative to the filter 
region? (And not relative to the viewport if specified and relative to 
the filter region if not specified...)

Received on Monday, 12 July 2010 09:43:26 UTC