FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oPen with printer
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
oPen with printer
Posted: Thu Jan 23, 2020 02: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
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: oPen with printer
Posted: Thu Jan 23, 2020 03:28 PM
Code (fw): Select all Collapse
   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
Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: oPen with printer
Posted: Thu Jan 23, 2020 04:23 PM

How the pen is created in the source code ?

Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: oPen with printer
Posted: Thu Jan 23, 2020 04:39 PM

DEFINE PEN oPen1 WIDTH nPixel COLOR CLR_HBLUE

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: oPen with printer
Posted: Thu Jan 23, 2020 04:53 PM

Try

DEFINE PEN oPen1 WIDTH nPixel COLOR CLR_HBLUE OF oPrn

Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: oPen with printer
Posted: Thu Jan 23, 2020 06:37 PM

Also with the clausula "OF oPrn" the oPrn:line and oPrn:box are different!

Regards,
Günther
---------------------------------
office@byte-one.com

Continue the discussion