Page 1 of 1
PEN oPen
Posted: Thu Nov 01, 2018 9:38 am
by jds
How can I incorporate in the following simple programming extract a PEN control (f.e. a PEN width 5) to become a BOX with thicker lines
DEFINE FONT fntArial3 NAME "Arial" SIZE 0, -12 BOLD OF oPrn
nRow2:=3*fntArial3:nHeight
nCol2:=4*fntArial3:nWidth
PRINT oPrn FROM USER
PAGE
oPrn:Box(nRow2,nCol2,nRow2+=8.5*fntArial3:nHeight,nCol2+=40*fntArial3:nWidth)
….
Re: PEN oPen
Posted: Thu Nov 01, 2018 11:22 am
by Enrico Maria Giordano
Just pass oPen as the fifth parameter to the Box() method.
EMG
Re: PEN oPen
Posted: Thu Nov 01, 2018 4:24 pm
by jds
and how to introduce the PEN command before passing it as the fifth parameter
I tried already with
define PEN oPen width 5 for example
but it did not work?
Re: PEN oPen
Posted: Thu Nov 01, 2018 5:10 pm
by ukoenig
DId You define the pen like
define PEN oPen width 5
OF oPRINT
sample lineprinting :
oPRINT:Line ( nFil, nCol, nTop, nBot, oPen )
regards
Uwe
Re: PEN oPen
Posted: Thu Nov 01, 2018 5:15 pm
by Enrico Maria Giordano
5 is too small. Try 50. Anyway, this is a working sample:
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oPrn, oPen
PRINT oPrn PREVIEW
DEFINE PEN oPen WIDTH 50
PAGE
oPrn:Ellipse( 0, 0, 1000, 2000, oPen )
ENDPAGE
ENDPRINT
DELETEOBJECT( oPen )
RETURN NIL
EMG
Re: PEN oPen
Posted: Thu Nov 01, 2018 6:09 pm
by byte-one
The thickness from a pen must be calculated in dependence to the used printer! (or give the OF oPrint clausula as ukoenig say!)
Re: PEN oPen
Posted: Thu Nov 01, 2018 6:40 pm
by Enrico Maria Giordano
I don't see any difference between using or not OF oPrn.
EMG
Re: PEN oPen
Posted: Thu Nov 01, 2018 6:44 pm
by jds
It works, thank you all