How to impemented varius pen in a printer object

Post Reply
User avatar
Sakis
Posts: 42
Joined: Fri Oct 21, 2005 2:12 pm
Location: Athens

How to impemented varius pen in a printer object

Post by Sakis »

Hello FiveWiners
I have the following code :

Code: Select all | Expand

// Printing in portrait and in landscape#include "fivewin.ch"#INCLUDE "COLORS.CH"#define PAD_LEFT            0#define PAD_RIGHT           1#define PAD_CENTER          2function 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
Enrico Maria Giordano
Posts: 8777
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 8 times
Contact:

Re: How to impemented varius pen in a printer object

Post by Enrico Maria Giordano »

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

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

How to impemented varius pen in a printer object

Post by Sakis »

Deal Enrico

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

Many thanks again.

Regards
Dionisis :D
Post Reply