TFont:nOrientation

Post Reply
Eric.Developer
Posts: 7
Joined: Wed Apr 07, 2010 10:14 am
Contact:

TFont:nOrientation

Post by Eric.Developer »

Hello everyone,

In printing, the text rotation is not changing:

Code: Select all

   nAngle:=90
   oFont1:= TFont():New('Courier New',,150,.F.,,,nAngle)
   oFont2:= TFont():New('Courier New',,150,.F.,,,nAngle)
   
   msginfo(oFont1:nOrientation) // SHOW 90
   
   PRINTER oPrinter FROM USER PREVIEW NAME "teste"
   
   oPrinter:setFont(oFont1)

   oPrinter:StartPage()
   oPrinter:Say( 150, 40, 'teste1', oFont1)   
   oPrinter:Say( 300, 40, 'teste2', oFont2)
   oPrinter:Say( 450, 40, 'teste3', oFont2, 1550 )
 
Tested Win XP, Win7/64, Win10/64

how to solve? Thanks.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: TFont:nOrientation

Post by Enrico Maria Giordano »

Eric.Developer wrote:

Code: Select all

   nAngle:=90
   oFont1:= TFont():New('Courier New',,150,.F.,,,nAngle)

Code: Select all

   nAngle:=900
   oFont1:= TFont():New('Courier New',,150,.F.,,nAngle)
Please note: nAngle is the sixth parameter.

EMG
Eric.Developer
Posts: 7
Joined: Wed Apr 07, 2010 10:14 am
Contact:

Re: TFont:nOrientation

Post by Eric.Developer »

Now it works, thank you Enrico.

note: The names of some properties and parameters are changed:

Code: Select all

METHOD New( 1-cFaceName, 2-nWidth, 3-nHeight, 4-lFromUser, 5-lBold, 6-nEscapement, 7-nOrientation, ...) 
Post Reply