Explanation
PRESET, PSET Statements
Draw a specified point on the screen.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
PRESET [STEP] (x!,y!) [,color%] |
PSET [STEP] (x!,y!) [,color%] |
STEP | Specifies that the x! and y! are expressed relative to the current graphics cursor location. |
(x!,y!) | The screen coordinates of the pixel to be set. |
color% | A color attribute that sets the pixel color. If color% is omitted, PRESET uses the current background and PSET uses the current foreground color. |
Available color attributes depend on your graphics adapter and screen mode. Coordinate values depend on the graphics adapter, screen mode, and most recent VIEW and WINDOW statements. |
'This example requires a color graphics adapter.
SCREEN 1
FOR i% = 0 TO 320
PSET (i%, 100)
FOR delay% = 1 TO 100: NEXT delay%
PRESET (i%, 100)
NEXT i%
See also: | SCREEN | VIEW | WINDOW | Color Attributes | Screen Modes |