QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The _SOURCE statement establishes the image SOURCE using a handle created by _LOADIMAGE, _NEWIMAGE or _COPYIMAGE.

Syntax

_SOURCE handle&

Description

Example(s)


SCREEN 13
a = _NEWIMAGE(320,200,13)
_DEST a
PSET (100, 100), 15
_SOURCE a
_DEST 0
PRINT POINT(100, 100) 


 15

Explanation: Create a new image with handle ‘a’, then use _DEST to define the image to draw on. Draw a pixel then set the source to ‘a’ and use POINT to show what color is in that position. White (15) and is the color set with PSET. Use _DEST 0 for the screen to display the results.

More examples

See the examples in:

See Also