community.
I know that there are many answers, manuals, manuals and links on the Internet, and I ask more about this. I also know that knowledge of linear algebra is required. But when I think about the time to understand the whole theory and solutions of exercises in practice - my head is blowing, and I can not do the simplest things: (
Please, if you know a little quick solution on how to make the text rotate above its center before rendering it - tell me, pleeease.
Now I have:
#... 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()
But my letter does not revolve around itself. It's just like falling down on the right side :( I know my code is wrong. Maybe I will skip the transformation, but I don't know how to do it right.
UPDATE: Unfortunately, the text is not affected by translations, therefore
cr.translate(10000, 10000) cr.rotate(radians(15)) cr.show_text("hello")
will be exactly the same as
cr.rotate(radians(15)) cr.show_text("hello")
And I donβt know how to rotate the text above its center without creating a new surface or something (for example, a new layer in the GPU): (
source share