PEN oPen

PEN oPen

Postby jds » Thu Nov 01, 2018 9: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:=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: 122
Joined: Sat Dec 05, 2009 12:44 pm

Re: PEN oPen

Postby Enrico Maria Giordano » Thu Nov 01, 2018 11:22 am

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

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

Re: PEN oPen

Postby jds » Thu Nov 01, 2018 4: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?
jds
 
Posts: 122
Joined: Sat Dec 05, 2009 12:44 pm

Re: PEN oPen

Postby ukoenig » Thu Nov 01, 2018 5: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 :?:
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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: PEN oPen

Postby Enrico Maria Giordano » Thu Nov 01, 2018 5:15 pm

5 is too small. Try 50. Anyway, this is a working sample:

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: PEN oPen

Postby byte-one » Thu Nov 01, 2018 6: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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: PEN oPen

Postby Enrico Maria Giordano » Thu Nov 01, 2018 6:40 pm

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

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

Re: PEN oPen

Postby jds » Thu Nov 01, 2018 6:44 pm

It works, thank you all
jds
 
Posts: 122
Joined: Sat Dec 05, 2009 12:44 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 43 guests