W3C home > Mailing lists > Public > www-svg@w3.org > February 2012

Re: Mask and Clip behavior

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 10 Feb 2012 16:21:52 -0800
Message-ID: <CAAWBYDA_x4V2rEx2Fsk2gr9Qn5=TnFod_cHZSz7HX4BY7M0mVg@mail.gmail.com>
To: Jeremie Patonnier <jeremie.patonnier@gmail.com>
Cc: www-svg <www-svg@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:34 UTC