oPen with printer

Post Reply
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

oPen with printer

Post by byte-one »

If i define a pen with DEFINE PEN.... then the width of pen are different in methods fron tPrinter()!

oPrn:Box( nZeile+nPenw/2,nPenw/2,nNextzeile,oPrn:nHorzRes()-nPenw/2, oPen)
oPrn:line(nZeile,linksrand,nZeile,rechtsrand,oPen)
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: oPen with printer

Post by karinha »

Code: Select all

   PRINT oPrn NAME "Relatório do Certificado do Aluno" PREVIEW MODAL

        DEFINE FONT oFontDisc NAME "Arial" SIZE 0, -10 BOLD           OF oPrn
        DEFINE FONT oFont     NAME "Arial" SIZE 0, -10 BOLD           OF oPrn
        DEFINE FONT oFontSubl NAME "ARIAL" SIZE 0, -10 BOLD UnderLine OF oPrn
        DEFINE FONT oFontList NAME "ARIAL" SIZE 0, -22 BOLD           OF oPrn

        DEFINE PEN oPen1 WIDTH 12 COLOR CLR_HBLUE                     OF oPrn
        DEFINE PEN oPen2 WIDTH 12 COLOR CLR_AMARELO                   OF oPrn
        DEFINE PEN oPen3 WIDTH  4 COLOR CLR_BLACK                     OF oPrn
 
        oPrn:SetPage(9)     //->Folha A4
        oPrn:SetPortrait()  //->Vertical

        ResLinha  := oPrn:nLogPixely()/2.54
        ResColuna := oPrn:nLogPixelx()/2.54

        PAGE

            nLinTopLog1 :=  0.90 //->Lado de Cima   - Topo - Inicio
            nColTopLog1 :=  0.50 //->Lado Esquerdo  - Inicio
            nLinBotLog1 := 14.60 //->Final da Linha - Lado de Baixo
            nColBotLog1 := 20.50 //->Final do Logo  - Lado Direito

            nLinTopLog2 :=  1.20 //->Lado de Cima   - Topo - Inicio
            nColTopLog2 :=  0.70 //->Lado Esquerdo  - Inicio
            nLinBotLog2 := 14.40 //->Final da Linha - Lado de Baixo
            nColBotLog2 := 20.30 //->Final do Logo  - Lado Direito

            oPrn:Cmtr2Pix( @nLinTopLog1, @nColTopLog1 )
            oPrn:cmtr2Pix( @nLinBotLog1, @nColBotLog1 )

            oPrn:Box( nLinTopLog1, nColTopLog1, nLinBotLog1, nColBotLog1, oPen1 )

            oPrn:Cmtr2Pix( @nLinTopLog2, @nColTopLog2 )
            oPrn:cmtr2Pix( @nLinBotLog2, @nColBotLog2 )

            oPrn:Box( nLinTopLog2, nColTopLog2, nLinBotLog2, nColBotLog2, oPen2 )
 
Regards.
João Santos - São Paulo - Brasil
User avatar
MaxP
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm
Contact:

Re: oPen with printer

Post by MaxP »

How the pen is created in the source code ?
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Re: oPen with printer

Post by byte-one »

DEFINE PEN oPen1 WIDTH nPixel COLOR CLR_HBLUE
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
MaxP
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm
Contact:

Re: oPen with printer

Post by MaxP »

Try

DEFINE PEN oPen1 WIDTH nPixel COLOR CLR_HBLUE OF oPrn
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

Re: oPen with printer

Post by byte-one »

Also with the clausula "OF oPrn" the oPrn:line and oPrn:box are different!
Regards,
Günther
---------------------------------
office@byte-one.com
Post Reply