home *** CD-ROM | disk | FTP | other *** search
- Rem * Title : Draw An Ellipse
- Rem * Author : DBS-MB
- Rem * Date : 1st August 99
- rem ==========================================
- rem DARK BASIC EXAMPLE PROGRAM 5
- rem ==========================================
- rem This program will draw a ellipse on screen
- rem ------------------------------------------
-
- rem Set the ink to red and paper color to black
- ink rgb(244,0,0),0
-
- rem Draw 1000 ellipses to the screen
- for t=0 to 1000
- rem Get a random ink color
- ink rgb(rnd(255),rnd(255),rnd(255)),1
-
- rem where on screen to draw ellipse
- left=rnd(640)
- top=rnd(480)
-
- rem Width of ellipse
- ellipsewidth=rnd(100)
-
- rem Height of ellipse
- ellipseheight=rnd(100)
-
- rem Draw a ellipse
- ellipse left,top,ellipsewidth,ellipseheight
- next t
-
- rem Set the ink to white and paper color to black
- ink rgb(244,214,210),1
-
- rem Print a message on screen
- text 200,240,"press the spacebar to quit"
-
- rem Will wait for you to press any key
- suspend for key
-
- rem End the program
- end
-