W3C home > Mailing lists > Public > www-style@w3.org > December 2009

Re: [css3-2d-transforms] skew(<angle> [, <angle>])

From: Brendan Kenny <bckenny@gmail.com>
Date: Wed, 2 Dec 2009 15:42:39 -0600
Message-ID: <ab96c3ef0912021342r7196eb57h2dfa4bdf32b2538@mail.gmail.com>
To: "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
Cc: www-style@w3.org
I hadn't noticed this, but it's a very good point. For those a little
rusty on their transforms, a determinant of 1 is important because it
means that the area of the figure being transformed in preserved. This
is true for skewX() and skewY(), but not for skew(<angle>,<angle>) as

As far as I know this function doesn't really correspond to anything
in widespread use and it gives results that aren't necessarily what
the user wants. I think the best interpretation could be a skew in one
direction followed by a skew in the other, but since that operation
would be order dependent, it still could lead to relatively surprising

Is there a compelling reason to include it?

2009/12/2 Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>:
> Simon Fraser:
>>skew(a, b) results in the this matrix: [1 tan(b) tan(a) 1 0 0].
> Zack Weinberg:
>> For what it's worth, this is the matrix that Gecko produces for
>> skew(ThetaX, ThetaY):
>>     |  1           tan(ThetaX)  0|
>>     |  tan(ThetaY) 1            0|
>>     |  0           0            1|
>> skewx(theta) is treated as identical to skew(theta, 0) and
>> skewy(theta) is treated as identical to skew(0, theta).
>> I have no position on whether this is useful to authors or
>> mathematically meaningful.
>> zw
> Interesting ...
> Then the naming is misleading.
> Because the determinant is not 1 for arbitrary angles,
> this is not really skewing, it is a mixture of skewing and scaling
> or something even more general...
> skewX and skewY are defined to be the same as in SVG, therefore those
> are simple and really related to skewing/shearing, because the determinant
> is 1.
> SVG has no skew without X or Y, therefore currently the problem occurs
> only with the undefined property in the CSS3 proposal.
> Maybe more useful to have a vector and an angle as value
> to be able to share along the vector instead of having this surprising
> transformation not related to skew or shear.
> Or with two angles alpha and beta one could define it as
> something like
> rotate(-alpha) skewX(beta) rotate(alpha)
> to get something meaningful
> Olaf
> http://mathworld.wolfram.com/ShearMatrix.html
Received on Wednesday, 2 December 2009 21:43:14 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:30 UTC