REM getput.bas - Example program for illustration of GET and PUT REM graphicc commands. This program is a part of QB2C package. REM This is a QB2C code. Run it with: brun getput -u REM Date: 09.May 1999 REM Author: Mario Stipcevic (stipcevi@rudjer.irb.hr) w% = 60: h% = 54 :REM Choose stamp dimensions wi% = 5 * (w% + 6) - 6 he% = 4 * (h% + 6) - 6 SCREEN (100, 100), wi%, he% :REM Open a window REM One 10c stamp: LOADGIF (0, 0), "toon.gif", 1 :REM Load the GIF into the window SET TFON Hel, 10 XTEXT (4, 10), "10c" input "Press Enter to continue..."; a$ DIM DYNAMIC a?(w% * h%) :REM Reserve space for one stamp REM Stamps: GET (0, 0), a?, w%, h% :REM Get the picture into array a?() XCLS :REM Clear the graphics screen FOR x% = 0 TO wi% STEP w% + 6 FOR y% = 0 TO he% STEP h% + 6 PUT (x%, y%), a?, w%, h% NEXT NEXT input "Press Enter to continue..."; a$ REM Holes: SET PMTS 0, 3 :REM Set Marker type and width FOR y% = h% + 3 TO he% STEP h% + 6 FOR x% = 3 TO wi% STEP 6 MARKER (x%, y%), 1 :REM Draw black hole NEXT NEXT FOR x% = w% + 3 TO wi% STEP w% + 6 FOR y% = 3 TO he% STEP 6 MARKER (x%, y%), 1 :REM Draw black hole NEXT NEXT XUPDATE input "Press Enter to end..."; a$ END