[css-masking] 'clip-path' and percentage values for basic shapes

Hi,

We had a discussion during the SVG F2F to percentage values for basic shapes on 'clip-path'. We couldn't resolve if percentage values are relative to the object bounding box or the painting bounding box. I want to come back to the discussion and put it on the mailing list first.

A reason for using object bounding box is that 'clipPath' elements resolve the values relative the object bounding box for 'clipPathUnits="objectBoundingBox"' (and to the viewport for userSpaceOnUse). It seems inconsistent if basic shapes take neither the object bounding box nor the viewport size. However, we could introduce a value "paintingBoundingBox" for clipPathUnits. It would be inconsistent with other elements like 'patter' and 'linear/radialGradient' which are not in the scope of this spec. (After all, CSS Masking is based on SVG 1.1).

A reason for painting bounding box is that it actually include the stroke of an object. Often authors want to include the stroke boundaries for visual effects as well. However, that can make it hard to predict the size of a basic shapes, since it depends on the styling of the element and not only the shape boundaries. Especially the size after applying markers or miter-limit on paths are hard to predict for authors.

It is not clear if painting bounding box takes clipping and masking into account (the later one would be expensive in calculation). I would like to avoid taking clipping into account for the boundaries of the clip shape.

HTML takes the union of all border boxes from the element and its child elements. Just as reference.

Greetings,
Dirk

[1] http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#the-clip-path

Received on Thursday, 11 October 2012 14:37:29 UTC