PEN oPen

Post Reply
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

PEN oPen

Post 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)
….
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: PEN oPen

Post 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?
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: PEN oPen

Post 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 :?:
Last edited by ukoenig on Thu Nov 01, 2018 5:17 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: PEN oPen

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

Re: PEN oPen

Post 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!)
Regards,
Günther
---------------------------------
office@byte-one.com
jds
Posts: 106
Joined: Sat Dec 05, 2009 12:44 pm

Re: PEN oPen

Post by jds »

It works, thank you all
Post Reply