home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
GBOXDRW2.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
3KB
|
58 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME GBOXDRW2.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
'.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
$INCLUDE "DAS-NBV1.INC"
SCREEN 12
CLS
GraphicSETUP
COLOR 7, 0
? "┌─────────────────────────────────────────────────────────────────────────
? "│ GBoxDRAWtt ( C1%, R1%, C2%, R2%, Mask%, Tclr?, Bclr? )
? "│
? "│ PURPOSE: draw a one pixel box border with two colors
? "│ this makes drawing shadowed boxes one call instead of 4
? "│ PARAMS: C1% left-most column ( 0 -> 639 )
? "│ R1% top most row ( 0 -> 479 )
? "│ C2% right most column
? "│ R2% bottom most row
? "│ Mask% bit-mapped mask for ON/OFF pixels but 0 = Solid border
? "│ Tc? top/left color ( 0 -> 15 )
? "│ Bc? bottom/right ( 0 -> 15 )
? "└─────────────────────────────────────────────────────────────────────────
DELAY 1
'┌──────────────────────────────
C1% = 270 : C2% = C1% + 99 '│ box corners
R1% = 220 : R2% = R1% + 99 '│
'│
BorderWidth% = 4 '│ border width in pixels
'│
FOR X% = 1 TO BorderWidth% '│ draw the border
GBoxDRAWtt C1%, R1%, C2%, R2%, 0, 11, 1 '│ two-toned box
INCR C1%, 1 : DECR C2%, 1 '│ move in for next box
INCR R1%, 1 : DECR R2%, 1 '│
NEXT '│
GBoxFILL C1%, R1%, C2%, R2%, "", 3, 9 '│ fill inside of box
GBoxDRAWtt C1%, R1%, C2%, R2%, 0 , 1, 11 '│ draw "lip" of the button
'│
WHILE NOT INSTAT : WEND '│
CLS '│
SCREEN 0 '└─────────────────────────────