W3C home > Mailing lists > Public > www-svg@w3.org > March 2013

Re: Cannot change text rotation centre in SVGs

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 30 Mar 2013 20:10:19 -0700
To: David Dailey <ddailey@zoominternet.net>
CC: Antonio Roberts <antonio@hellocatfood.com>, "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <21922654-72AD-4C15-9FB8-3FF9D0D43800@adobe.com>

On Mar 30, 2013, at 8:08 AM, David Dailey <ddailey@zoominternet.net> wrote:

> I know that there was also discussion that in addition to the "center" (as
> in the center of the minimum bounding rectangle with axes parallel to the
> viewport) we might also have the "centroid" (namely the first central moment
> or center of mass) as a center of rotation. For most objects that one wishes
> to rotate the latter would convey a more natural sense of physical rotation,
> and though one can clearly calculate such through script,  part of why we
> have SVG is so that not everyone has to write script that involves the
> calculus.
> 
> Has there been movement on that front or is one of several things being
> postponed for SVG 3?

I do not think that this would go to SVG anymore. This proposal should go to the next level of CSS Transforms and is indeed very interesting. If I remember there were different algorithms to calculate this centroid and we did not agree on one yet.

Greetings,
Dirk

> 
> Cheers
> David
> 
> -----Original Message-----
> From: Dirk Schulze [mailto:dschulze@adobe.com] 
> Sent: Saturday, March 30, 2013 10:46 AM
> To: Antonio Roberts
> Cc: www-svg@w3.org
> Subject: Re: Cannot change text rotation centre in SVGs
> 
> 
> On Mar 26, 2013, at 7:56 AM, Antonio Roberts <antonio@hellocatfood.com>
> wrote:
> 
>> Currently, when you rotate text it rotates using the bottom left of 
>> the text as its centre.
> 
> That is not correct. Currently it uses (0,0) of the coordinate space of the
> text, which is (if no transform on the ancestor) the top left of the
> viewport.
> 
>> Would there ever be the possibility of allowing the text rotation 
>> centre to be either of the corners of the bounding box or the centre?
> 
> With CSS Transforms there will be a 'transform-origin' presentation
> attribute that allows you to set the origin. In your case it would be
> transform-origin="center center".
> 
> You can already try these properties prefixed on WebKit on basic shapes.
> Text seems to have a bug. I filed a bug report after your comment here.
> 
> Greetings
> Dirk
> 
>> 
>> --
>> ============================
>> antonio@hellocatfood.com
>> http://www.hellocatfood.com
>> ============================
>> 
>> 
> 
> 
> 
> 
Received on Sunday, 31 March 2013 03:10:50 UTC

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