[reportlab-users] How to use textobject.setTextTransform()

Rüdiger Mähl reportlab-users@reportlab.com
Wed, 26 Jun 2002 15:59:47 +0200


>> [I asked for an explanation of textobject.setTextTransform(a,b,c,d,e,f)=
]

Bill gave me an example:
> [...]
> angle = 270
> co = cos ( angle * pi / 180.0 )
> si = sin ( angle * pi / 180.0 )
> t.setTextTransform ( co, -si, si, co, 8.2 * inch, ( 9 - 2.5 * ( p % 4 ) =
+ 0.125 ) * inch )
> [...]

Thanks, Bill. That helped a lot, but the rotation angle was somehow 
wrong when I tried the formula with my values.
-----

Jerome pointed me to other possibilities:
> [...]
> AFAICT, please correct me if I'm wrong, you can 
> achieve the same results calling
> the methods : translate, skew, rotate and scale
> in the appropriate order on the canvas object
> you draw on. This would probably be easier to
> use and understand.
> [...]

Good idea, that worked! Thank you, Jerome!

Rüdiger
______________________________________________________________________________
All inclusive! 100 MB Speicher, SMS 50% günstiger, 32 MB Attachment-Größe, 
Preisvorteile und mehr unter http://club.web.de/?mc=021104