SOURCE - QB64 Wiki

SOURCE

From QB64 Wiki

Jump to: navigation, search

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


Syntax:

_SOURCE handle&


Description:

  • The handle is a LONG integer value from the _SOURCE function or a handle created by _NEWIMAGE.
  • If the handle is designated as 0, it refers to the current SCREEN image.
  • A source image can only supply information to a program. POINT and GET might require a source other than the present one.


Code Examples:

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.



See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page