oPen with printer

oPen with printer

Postby byte-one » Thu Jan 23, 2020 2:19 pm

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
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: oPen with printer

Postby karinha » Thu Jan 23, 2020 3:28 pm

Code: Select all  Expand view

   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 - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7794
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: oPen with printer

Postby MaxP » Thu Jan 23, 2020 4:23 pm

How the pen is created in the source code ?
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm

Re: oPen with printer

Postby byte-one » Thu Jan 23, 2020 4:39 pm

DEFINE PEN oPen1 WIDTH nPixel COLOR CLR_HBLUE
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: oPen with printer

Postby MaxP » Thu Jan 23, 2020 4:53 pm

Try

DEFINE PEN oPen1 WIDTH nPixel COLOR CLR_HBLUE OF oPrn
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm

Re: oPen with printer

Postby byte-one » Thu Jan 23, 2020 6:37 pm

Also with the clausula "OF oPrn" the oPrn:line and oPrn:box are different!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: wilsongamboa and 46 guests