Percentage on objectBoundingBox

Hi,

I checked the behavior of objectBoundingBox on content with percentage values:

<clipPath clipPathUnits="objectBoundingBox" id="clip1">
<circle cx="0.5" cy="0.5" r="0.5"/>
</clipPath>
<clipPath clipPathUnits="objectBoundingBox" id="clip2">
<circle cx="50%" cy="50%" r="50%"/>
</clipPath>

>From the section “Object bounding box units” in SVG 1.1 [1] I would assume that both clipping paths do exactly the same. And yet, all SVG viewers seem to hide content completely clipped with the second clipping path. 

“”
If percentages are used within the content of a ‘pattern’, ‘clipPath’, ‘mask’ or ‘filter’ element, these values are treated according to the processing rules for percentages as defined in Units.
“”

The section about Units[2] say that percentage are resolved to the nearest viewport.

“”
The three rectangles on the right demonstrate the use of percentages. Note that the width and height of the viewport in the user coordinate system for the viewport element (in this case, the outermost svg element) are 4000 and 2000, respectively, because processing the ‘viewBox’ attribute results in a transformed user coordinate system
“”

Of course it depends if <pattern>, <mask>, <clipPath> and so on create a new viewport. I am not sure if that is ever explicitly said. Especially for userSpaceOnUse we take the nearest viewport of the affected element. Even though, what does it mean for the example above?

Greetings,
Dirk

[1] http://www.w3.org/TR/SVG11/coords.html#ObjectBoundingBox
[2] http://www.w3.org/TR/SVG11/coords.html#Units

Received on Friday, 3 January 2014 19:53:37 UTC