views:

13

answers:

0

I have to build a SVG image containing some rotated text elements. I want to achieve the following:

  • Each text element shall be rotated around its center point by a degree.
  • The resulting (imaginary) bounding box of the rotated text shall be translated, so that it's upper left is at position x,y.
  • We don't know the content, i.e., the width, of the text elements beforehand.

What is the best way to do that?

(I have a basic understanding of SVG and I am able to look up the spec on my own. So I know about transform and rotate(), translate()... However, I struggle with this specific case.)