Microsoft KB Archive/63160

= CALL PENMODE & PENSIZE Work with CALL LINE, Not CIRCLE or LINE =

Article ID: 63160

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft BASIC Interpreter 2.0
 * Microsoft BASIC Interpreter 2.1 for Macintosh
 * Microsoft BASIC Interpreter 3.0 for Macintosh
 * Microsoft BASIC Compiler 6.0b
 * Microsoft QuickBasic Compiler for Macintosh 1.0

-



This article was previously published under Q63160



SUMMARY
The LINE, CIRCLE, and PSET statements in QuickBASIC always have a 1-pixel width and a COPY masking mode, and are not affected by the CALL PENSIZE, CALL PENMODE, or CALL PENPATTERN ROM routines.

If you want routines that are affected by CALL PENSIZE, CALL PENMODE, or CALL PENPATTERN, you can use CALL LINE (or CALL LINETO), CALL FRAMEOVAL, or other ROM routine CALLs.

This information applies to Microsoft QuickBASIC version 1.00 for the Apple Macintosh, to Microsoft BASIC Interpreter versions 2.00, 2.10, and 3.00 for the Apple Macintosh, and to Microsoft BASIC Compiler version 1.00 for the Apple Macintosh.



MORE INFORMATION
Note that CALL LINE (Page 389) is a ROM routine, whereas the LINE statement (Page 177) is part of the QuickBASIC language (in the &quot;Microsoft QuickBASIC for Apple Macintosh: Language Reference&quot;).

The following code segment is a modification of the sample program on Page 395 of the &quot;Microsoft QuickBASIC for Apple Macintosh: User's Guide.&quot; The program prints the eight PENMODEs (COPY, OR, XOR, BIC, NOT COPY, NOT OR, NOT XOR, NOT BIC, respectively numbered 8 through 15) on the screen, giving an example of each with the LINETO ROM call and the LINE statement.

Code Example
DEFINT a-z DIM pattern(3) LINE (200,10)-(300,250),,bf ' FOR y = 10 to 250 step 2    'create a background for drawing LINE (300,y)-(400,y)      ' NEXT

FOR i = 0 to 3 : READ pattern(i) : NEXT 'create the pen pattern DATA -32446,9240,6180,17025

CALL PENPAT(VARPTR(pattern(0))) 'set up the pen pattern CALL PENSIZE (12,12)            'set up the pen size mode = 8

FOR y = 20 to 230 step 30 CALL PENMODE(mode)             'set up the pen mask CALL MOVETO(1,y+8) READ mode$ : PRINT mode mode$  'print the mask #,type CALL MOVETO (100,y) CALL LINETO (400,y)            'draw a line with the pen LINE (100,y+2)-(400,y+2)       'show that LINE statement won't draw it    mode = mode + 1 NEXT WHILE MOUSE(0) <> -1 : WEND DATA &quot; COPY&quot;,&quot; OR&quot;,XOR,BIC,NOT COPY,NOT OR,NOT XOR,NOT BIC

Additional query words: BasicCom MQuickB

Keywords: KB63160

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.