W3C home > Mailing lists > Public > public-fx@w3.org > July to September 2010

RE: CSS 2D transforms rotate with center point

From: Patrick Dengler <patd@microsoft.com>
Date: Tue, 17 Aug 2010 21:53:55 +0000
To: Dirk Schulze <vbs85@gmx.de>, Simon Fraser <smfr@me.com>
CC: "public-fx@w3.org" <public-fx@w3.org>
Message-ID: <4A2DB3AE4504E944AF122BBFBA7FBA1F53A056B6@TK5EX14MBXC116.redmond.corp.microsoft.com>
One more note here.  

There is an issue with having to calculate cx,cy in SVG Transforms that we should address across the board.

http://www.w3.org/Graphics/SVG/WG/track/issues/2208


Patrick Dengler
Microsoft - Internet Explorer
SVG Working Group

-----Original Message-----
From: public-fx-request@w3.org [mailto:public-fx-request@w3.org] On Behalf Of Dirk Schulze
Sent: Friday, June 11, 2010 10:24 AM
To: Simon Fraser
Cc: public-fx@w3.org
Subject: Re: CSS 2D transforms rotate with center point

Am 11.06.2010 19:03, schrieb Simon Fraser:
> On Jun 11, 2010, at 1:10 AM, Dirk Schulze wrote:
>
>    
>> Am 11.06.2010 07:43, schrieb Dirk Schulze:
>>      
>>> Hi,
>>>
>>> is it possible to extend rotate(<angle>) in the CSS 2D transforms spec [1] with two optional arguments for the center of the rotation cx and cy to rotate(<angle>  [,<number>,<number>])? This would make CSS transforms more compatible with SVGTransforms [2].
>>>
>>> Dirk
>>>
>>> [1] http://dev.w3.org/csswg/css3-2d-transforms/#transform-functions
>>> [2] http://www.w3.org/TR/SVG11/coords.html#TransformAttribute
>>>
>>>        
>> <number>  is of course the wrong value here,<translation-value>  is better. So the definition for rotate would be:
>>
>> rotate(<angle>  [,<translation-value>,<translation-value>])
>>
>> if no cx or cy is specified, the rotation is about the origin of the element. Using cx, cy would result in translate(cx, cy) rotate(<angle>) translate(-cx,-cy).
>>      
> It seems pretty arbitrary to just supply an origin for rotation. Why not for scale() and skewX()/skewY()?
>
> Also, to be consistent, we'd have to allow a 3-axis origin for rotate3d(), rotateX(), rotateY() and scale3d() as well.
>
> Simon
>
>
>    
At first, there is no rotateX, rotateY and scale3d and rotate3d is not 
covered by the current Spec 1.1 or 1.2 of SVG and transform-origin can 
just cover rotate(angle, cx, cy), it it is the only transform function. 
The specification for 3D transforms on SVG is still a draft and it looks 
like it will orientate to CSS 3d transforms in the future.

I would agree, that there are ways to work arround a missing rotate 
center point for web developers. But the problem is the backward 
compatibility to SVG 1.1. If CSS transforms gets also used by SVG, we 
would not allow rotate with a center point. But this feature is widely 
used and many SVG examples would be broken without this feature.

Dirk
Received on Tuesday, 17 August 2010 21:54:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 17 August 2010 21:54:31 GMT