FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour PEN oPen
Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
PEN oPen
Posted: Thu Nov 01, 2018 09:38 AM

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:=3fntArial3:nHeight
nCol2:=4
fntArial3:nWidth
PRINT oPrn FROM USER
PAGE
oPrn:Box(nRow2,nCol2,nRow2+=8.5fntArial3:nHeight,nCol2+=40fntArial3:nWidth)
….

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: PEN oPen
Posted: Thu Nov 01, 2018 11:22 AM

Just pass oPen as the fifth parameter to the Box() method.

EMG

Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: PEN oPen
Posted: Thu Nov 01, 2018 04:24 PM

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?

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: PEN oPen
Posted: Thu Nov 01, 2018 05:10 PM
DId You define the pen like

define PEN oPen width 5 OF oPRINT

sample lineprinting :
oPRINT:Line ( nFil, nCol, nTop, nBot, oPen )

regards
Uwe :-)
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.
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: PEN oPen
Posted: Thu Nov 01, 2018 05:15 PM
5 is too small. Try 50. Anyway, this is a working sample:

Code (fw): Select all Collapse
#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
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: PEN oPen
Posted: Thu Nov 01, 2018 06:09 PM

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
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: PEN oPen
Posted: Thu Nov 01, 2018 06:40 PM

I don't see any difference between using or not OF oPrn.

EMG

Posts: 124
Joined: Sat Dec 05, 2009 12:44 PM
Re: PEN oPen
Posted: Thu Nov 01, 2018 06:44 PM

It works, thank you all

Continue the discussion