title: rotate text around its center in pycairo
body: <p>community.</p>
  
  <p>I know that there are many answers here, manuals, tutorials and references over the internets and amny more about this question. Also I know that knowledge of linear algebra is required.
  But when I think about time to figuring out all the theory and solving exercises in practice - my head is blowing off and I can't do the simplest things :(</p>
  
  <p>Please, if you know a little fast solution how to make rotation of text over its center before rendering it - tell me, pleeease.</p>
  
  <p>For now I have:</p>
  
  <pre><code>#...
  cr.move_to(*text_center)
  myX, myY = text_center[0] - (width / 2), text_center[1] + (height / 2)
  
  cr.save()
  cr.translate(myX, myY)
  cr.rotate(radians(text_angle))
  cr.show_text(letter)
  cr.restore()
  #...
  </code></pre>
  
  <p>But my letter isn't rotating around itself. It's just like falling down to the right side :(
  I know that my code isn't right. Maybe I miss transformation but I don't know how to make it right.</p>
  
  <p><strong>UPDATE:</strong> Unfortunately, text are not affected by translations, so</p>
  
  <pre><code>cr.translate(10000, 10000)
  cr.rotate(radians(15))
  cr.show_text("hello")
  </code></pre>
  
  <p>will be exactly the same as</p>
  
  <pre><code>cr.rotate(radians(15))
  cr.show_text("hello")
  </code></pre>
  
  <p>And I don't know how to make text rotation over its center without making new surface or something (like new layer in graphic processor) :(</p>