Am 24.01.2017 um 23:20 schrieb Gilad Denneboom:
Thanks, but surely PDFont.getStringWidth() will return the width of the
text string on its own, not of the rect that surrounds it when it is
rotated, right?

No. You'll need to so some math (cosine).

https://en.wikipedia.org/wiki/Trigonometric_functions

Tilman



On Tue, Jan 24, 2017 at 11:02 PM, Tilman Hausherr <[email protected]>
wrote:

Am 24.01.2017 um 22:53 schrieb Gilad Denneboom:

I can't figure out
how the moveTextPositionByAmount works...

It is relative to the previous position since the start of the text mode.
It starts at 0,0.

Basically what I would like is to be able to calculate the height and width
of the text, so I could figure out where on the page to place it so that
the center of both objects are aligned.


See the DrawPrintTextLocations example on how to calculate the height.
It's quite tricky. The width you can get by PDFont.getStringWidth().




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to