W3C home > Mailing lists > Public > public-svg-wg@w3.org > January to March 2009

Re: ISSUE-2208 (rotate-center-point): Consider allowing rotations to be relative to their bounding box center [SVG Core 2.0]

From: Chris Lilley <chris@w3.org>
Date: Mon, 2 Feb 2009 19:15:39 +0100
Message-ID: <1948080205.20090202191539@w3.org>
To: Cameron McCormack <cam@mcc.id.au>
CC: SVG Working Group WG <public-svg-wg@w3.org>

On Friday, January 30, 2009, 1:33:27 AM, Cameron wrote:

CM> ISSUE-2208:
>> It is very common to rotate an object about its center point. This
>> requires knowing the center point, however, and in some cases this
>> can't be known without scripting. It would be handy to be able to
>> specify that a rotation happens about the center point, e.g.:

>>   <svg ...>
>>     <text x='50' y='50' transform='rotate(-90, center)'/>
>>   </svg>

CM> “center” here would mean bounding box center.  I could imagine other
CM> keywords being introduced to mean other, particular points on the
CM> object.  These keywords would be the same as those that we might define
CM> for the Layout module.

Could do the same sort of thing that CSS does for pinned background images:

  <svg ...>
    <text x='50' y='50' transform='rotate(-90, 50%, 50%)'/>
  </svg>


or rotate about top right

  <svg ...>
    <text x='50' y='50' transform='rotate(-90, 100%, 100%)'/>
  </svg>

or some arbitrary point

  <svg ...>
    <text x='50' y='50' transform='rotate(-90, 27%, 84%)'/>
  </svg>


Hopefully this would mean that

  <svg ...>
    <text x='50' y='50' transform='rotate(-90, 0%, 0%)'/>
  </svg>

and

  <svg ...>
    <text x='50' y='50' transform='rotate(-90)'/>
  </svg>

are the same. 0% looks like a solid lacuna value.

CM> “centroid” could be another one, but I’m not sure how useful that would
CM> be.





-- 
 Chris Lilley                    mailto:chris@w3.org
 Technical Director, Interaction Domain
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG
Received on Monday, 2 February 2009 18:15:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 2 February 2009 18:15:58 GMT