[Cairo] Help with rotated text
BlitzMax Forums/Brucey's Modules/[Cairo] Help with rotated text
| ||
I'm using Cairo to create a PDF page. Everything works as expected, but with only (my) problem: I'm trying to write a text (on the left side of my 'page') and it must be rotated by 90°. I know the problem is related with the matrix (the rotation center is the 'origin' - I presume - of the canvas-page-surface) and I get wrong rotation... Any help please? |
| ||
If you don't want to mess about with affine transformation matrices, you can always use Rotate(angle). Perhaps something like this pseudo code : Save MoveTo : position Rotate : to desired angle ShowText Restore Save() and Restore() are useful because it will forget anything you have changed between them - So, if you move the pen somewhere on the page inside the Save/Restore block, the pen will return to it's original location. (likewise with colours, rotation, scale etc). This might be useful, if you really want to use the matrix : http://en.wikipedia.org/wiki/Transformation_matrix |
| ||
Perfect!!! It works as expected! Thank you very much! |