qbasic.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.
PRESET, PSET Statements
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Draw a specified point on the screen.
 
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.
 
Example:
    '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 and Values    Screen Modes