ex.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
PAINT Statement Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example uses PAINT to create a magenta fish with a cyan tail. Note:
' This example requires a color graphics adapter.
 
' To try this example:
' 1. Choose New Project from the File menu
' 2. Copy the code example below to the code window
' 3. Press F5 to run the example
 
 CONST PI = 3.1415926536#
 CLS                                 ' Clear the screen
 SCREEN 1
 CIRCLE (190, 100), 100, 1, , , .3   ' Outline fish body in cyan
 CIRCLE (265, 92), 5, 1, , , .7      ' Outline fish eye in cyan
 PAINT (190, 100), 2, 1              ' Fill in fish body with magenta
 LINE (40, 120)-STEP(0, -40), 2      ' Outline tail in magenta
 LINE -STEP(60, 20), 2
 LINE -STEP(-60, 20), 2
 PAINT (50, 100), 1, 2               ' Paint tail cyan & draw gills in black
 CIRCLE (250, 100), 30, 0, PI * 3 / 4, PI * 5 / 4, 1.5
 FOR Y = 90 TO 110 STEP 4
         LINE (40, Y)-(52, Y), 0         ' Draw comb in tail
 NEXT
 DO
 LOOP WHILE INKEY$ = ""              ' Press any key to continue
 WIDTH 80
 SCREEN 0