dos_compilers/Digital Research CB-86 v2/TSTCIR.BAS
2024-06-30 11:56:20 -07:00

46 lines
896 B
QBasic
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

REM DEMONSTRATION PROGRAM FOR CIRCLE DRAWING FUNCTIONS
REM
REM PROGRAM NAME: TSTCIR.BAS
REM
%INCLUDE GRAPHCOM.BAS
%INCLUDE CIRCOM.BAS
GRAPHIC OPEN 1
CLEAR
PRINT "COMPUTING"
CALL BEG.CIR
PRINT "ENDED"
CALL PLOT.CIR
KEY% = CONCHAR% REM WAIT FOR KEYBOARD
REM SCALE THE WINDOW TO DRAW A PROPERLY PROPORTIONED CIRCLE
ASK DEVICE X.AXIS,Y.AXIS
PRINT X.AXIS,Y.AXIS
SET WINDOW 0,X.AXIS/Y.AXIS,0,1
CALL PLOT.CIR
KEY%=CONCHAR%
CALL FILL.CIR
KEY%=CONCHAR%
REM CHANGE THE VIEWPORT TO REPOSITION THE CIRCLE
SET VIEWPORT 0,.5,0,.5 REM LOWER LEFT QUARTER
CLEAR
CALL PLOT.CIR
KEY%=CONCHAR%
SET VIEWPORT .5,1,0,.5 REM LOWER RIGHT QUARTER
CALL PLOT.CIR
KEY%=CONCHAR%
SET VIEWPORT 0,.5,.5,1 REM UPPER LEFT QUARTER
CALL PLOT.CIR
KEY%=CONCHAR%
SET VIEWPORT .5,1,.5,1 REM UPPER RIGHT QUARTER
CALL PLOT.CIR
KEY%=CONCHAR%
STOP
END