W3C home > Mailing lists > Public > www-svg@w3.org > September 2010

How to position bounding box of rotated text?

From: Jan-Felix Schwarz <jan-felix.schwarz@student.hpi.uni-potsdam.de>
Date: Thu, 9 Sep 2010 20:09:22 +1000
Message-ID: <99A73352-7203-4CEB-9DBA-9216DFDEDB4C@student.hpi.uni-potsdam.de>
To: <www-svg@w3.org>
Hello,

I am mailing to the list because I struggle to position a rotated text element in the desired manner. I want to achieve the following:

 - A text element shall be rotated by `a` degree.
 - The resulting (imaginary) bounding box of the rotated text shall be translated, so that its upper left is at position `x,y`.
 - I don't know the content, i.e., the width, of the text element beforehand.

How can I achieve that without any post-processing like JavaScript in the browser? Is it possible to wrap the text element with some other element which makes up a bounding box and can be absolutely positioned?

Hoping some of you experts can lead me on the right track here. Thanks in advance!

Cheers,
Jan
Received on Thursday, 9 September 2010 10:11:45 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:46 GMT