开发者

SVG: how to position bounding box of rotated text

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 do开发者_JAVA百科n'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.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜