How to impemented varius pen in a printer object

How to impemented varius pen in a printer object

Postby Sakis » Sat Nov 19, 2005 11:35 pm

Hello FiveWiners
I have the following code :
Code: Select all  Expand view
// Printing in portrait and in landscape

#include "fivewin.ch"
#INCLUDE "COLORS.CH"

#define PAD_LEFT            0
#define PAD_RIGHT           1
#define PAD_CENTER          2


function Main()
  local oPrn, oFont, oPen1 , oPen2
   Local nLinI, nColI, nLinF, nColF

   
   
     PRINT oPrn NAME "Εκτύπωση σε LandScape..." PREVIEW
    DEFINE PEN oPen1 WIDTH  2  OF oPrn
    DEFINE PEN oPen2 WIDTH  6  OF oPrn
    oFont:= Tfont():New ( ,,,.T.,,,,,,,,,,,,oPrn)
   
      oPrn:SetPage(9)  //a4
      oPrn:SetLandscape() // HORIZONTAL
     
      PAGE
         nLinI :=  2.3
         nColI :=  1.3
         nLinF := 19.5
         nColF := 28.5
         oPrn:Cmtr2Pix(@nLinI, @nColI)
         oPrn:cmtr2Pix(@nLinF, @nColF)
         oPrn:Box(nLinI, nColI, nLinF, nColF, oPen2)
         oPrn:CmSay(1.5,13,"CUSTOMER FILE" , oFont,,CLR_BLACK,,PAD_CENTER)
         nLinI:=3.3
         nColI:=9.5
         nLinF:=10.5
         nColF:=9.5
         oPrn:Cmtr2Pix(@nLinI, @nColI)
         oPrn:cmtr2Pix(@nLinF, @nColF)
         oPrn:Line(nLinI, nColI, nLinF, nColF,oPen1)
         nRStart:=0.9
         nCStart:=1.5
         oPrn:Cmtr2Pix(@nRstart, @nCstart)
         oPrn:SayBitMap(nRStart,nCstart,"C:\TEMP\1st.bmp",3.4,0.65)
         nRStart:=0.9
         nCStart:=25
         oPrn:Cmtr2Pix(@nRStart,@nCStart)
         oPrn:SayBitMap(nRStart,nCStart,"C:\TEMP\Container.bmp",1.2,0.65)
         
      ENDPAGE

oPen1:End()
oPen2:end()
oFont:End()

   ENDPRINT

return nil


And the two definable pens with different widths not shown correctly on the preview or the final printing . The final print out consist from a thin pen (oPen1) only.

What can i do for this?

Any help would be appreciate..
Thanks in advance
Dionisis
User avatar
Sakis
 
Posts: 42
Joined: Fri Oct 21, 2005 2:12 pm
Location: Athens

Re: How to impemented varius pen in a printer object

Postby Enrico Maria Giordano » Sun Nov 20, 2005 10:18 am

The preview deals with pixels not with printer points. Try to increase the pen width and you'll see the difference.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

How to impemented varius pen in a printer object

Postby Sakis » Sun Nov 20, 2005 4:09 pm

Deal Enrico

Many thanks for your answer. As always you have 100% right. You heat into the spot.

Many thanks again.

Regards
Dionisis :D
User avatar
Sakis
 
Posts: 42
Joined: Fri Oct 21, 2005 2:12 pm
Location: Athens


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 53 guests