Re: Mask and Clip behavior

On Fri, Feb 10, 2012 at 3:52 PM, Jeremie Patonnier
<jeremie.patonnier@gmail.com> wrote:
> Hello all,
>
> I'm currently experimenting with Clip and Mask.
>
> I ran a little test case to figure how maskUnits, maskContentUnits and
> clipPathUnits work.
> You can see it here : http://jsfiddle.net/JeremiePat/JdQd4/
>
> Most of the time, when I'm using the value "objectBoundingBox" for those
> attributes, my tests (on the left side) does not follow my expectations (on
> the right side) (at least with Firefox, Chrome and Opera).
> I read the spec carefully and I wonder if I made false expectations, if I
> made mistake in my code or if it's just all those browsers that are buggy.
>
> Could you tell me if what I expect is right (and in that case, I'm ready to
> report bugs to browser vendors) or if I missed something in the spec (and in
> that case, I wish to discuss how to clarify the spec)?
>
> Thank you all

The *Units attributes don't change the meaning of percentages, they
just change the size of userspace units so that one unit is the size
of the object bounding box.  In effect, this turns userspace units
into bounding box-relative percentages, just in the range [0,1]
instead of [0%, 100%].

You can see this working correctly in <http://jsfiddle.net/SBZub/1/>,
where I've adjusted the lengths in objectBoundingBox contexts to be
numbers rather than percentages.

~TJ

Received on Saturday, 11 February 2012 00:22:39 UTC