W3C home > Mailing lists > Public > www-style@w3.org > January 2011

RE: [css3-transform] definition of skewing

From: Rik Cabanier <cabanier@adobe.com>
Date: Mon, 17 Jan 2011 16:50:07 -0800
To: Chris Marrin <cmarrin@apple.com>
CC: Simon Fraser <smfr@me.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <8A13F0222395BD428969E5BA529EFA747767253678@NAMBX01.corp.adobe.com>
Hi Chris,


  I don't see a reason to have such a function. If an author wants to do such transformations, he can use matrix().
Having no rotate(a, b) means that we can't use a transition or animation.

Ie if you have an object that rotates into view you want to transition from rotate(0, -90) to rotate(0, 0)
There is no way to do this operation with the current rotate/skew/translate primitives.
Doing it through matrix(...) doesn't work because the transition just interpolates the matrix values (which btw is pretty useless).


  Again, that's what matrix() is for. A skew(x,y) primitive would always have the issue of ordering between x and y. I think the current primitives are plenty for allowing authors to construct matrices.
The issue is also with transitions/animations.

Also, why would skew(x, y) have an issue of ordering? The matrix would be:
| 1        tan(x)   0 |
| tan(y) 1          0 |
| 0        0         1 |

It doesn't seem necessary to have a separate skewx/skewy since there is usually no need to concatenate skews...

Rik

From: Chris Marrin [mailto:cmarrin@apple.com]
Sent: Monday, January 17, 2011 2:49 PM
To: Rik Cabanier
Cc: Simon Fraser; www-style@w3.org
Subject: Re: [css3-transform] definition of skewing


On Jan 13, 2011, at 12:22 PM, Rik Cabanier wrote:


Yes,



Rotate is always around the transformation point.



Rotate(a) is defined through the matrix:

| cos(a) -sin(a) 0 |

| sin(a) cos(a)  0 |

| 0        0          1 |



Rotate(a, b) would be defined as:

| cos(a) -sin(b) 0 |

| sin(a) cos(b)  0 |

| 0        0          1 |

I don't see a reason to have such a function. If an author wants to do such transformations, he can use matrix().




This type of animation is often used in Flash to give the appearance of an object that turns into view.



Also, I believe that there should be a skew(x, y).

The way the formulas are currently defined, there is no easy way to correctly do a shear in 2 dimensions since the second shear will impact the first one.

There should either be a skew(x, y) or the recomposition logic should be rewritten.

Again, that's what matrix() is for. A skew(x,y) primitive would always have the issue of ordering between x and y. I think the current primitives are plenty for allowing authors to construct matrices.

-----
~Chris
cmarrin@apple.com<mailto:cmarrin@apple.com>
Received on Tuesday, 18 January 2011 00:50:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:36 GMT