If i print this code, i've error in coordenates. Do you know why ?
- Code: Select all Expand view
- // Printing in portrait and in landscape
#include "fivewin.ch"
#define PAD_LEFT 0
#define PAD_RIGHT 1
#define PAD_CENTER 2
function Main()
local oPrn, oFont, oPen
Local nLinI, nColI, nLinF, nColF
PRINT oPrn NAME "Impresión en Vertical.." PREVIEW
DEFINE FONT oFont NAME "Arial" SIZE 0, -10 BOLD OF oPrn
DEFINE PEN oPen WIDTH 2 OF oPrn
oPrn:SetPage(9) // A4
oPrn:SetPortrait() //Vertical
PAGE
nLinI := 0
nColI := 0
nLinF := 28.5
nColF := 20.0
oPrn:Cmtr2Pix(@nLinI, @nColI)
oPrn:cmtr2Pix(@nLinF, @nColF)
oPrn:Box(nLinI, nColI, nLinF, nColF, oPen )
oPrn:cmSay( 0 , 0 , "Superior Izquierda (0,0)" , oFont,,CLR_BLACK,,PAD_LEFT )
oPrn:cmSay( 0 , 10.5, "Superior Centro (0,10.5)" , oFont,,CLR_BLACK,,PAD_CENTER )
oPrn:cmSay( 0 , 20.0, "Superior Derecha (0, 20)" , oFont,,CLR_BLACK,,PAD_RIGHT )
oPrn:cmSay(28.0, 0 , "Inferior Izquierda (28,0)", oFont,,CLR_BLACK,,PAD_LEFT )
oPrn:cmSay(28.0, 10.5, "Inferior Centro (28,10.5)", oFont,,CLR_BLACK,,PAD_CENTER )
oPrn:cmSay(28.0, 20.0, "Inferior Derecha (28,20)" , oFont,,CLR_BLACK,,PAD_RIGHT )
ENDPAGE
ENDPRINT
return nil
Compiled with 11.4