DEST
From QB64 Wiki
The _DEST statement sets the current write page. All graphics will go to this image when _DEST is set.
Syntax:
_DEST imageHandle&
Description:
- imageHandle& is the handle of the image that will act as the current write page.
- If imageHandle& is an invalid handle, an invalid handle error occurs. Always check for bad handle values of -1 first!
Code Examples:
SCREEN 13 a = _NEWIMAGE(320,200,13) b = _NEWIMAGE(320,200,13) _DEST a ' set destination image to handle a PSET (100, 100), 15 _DEST b ' set destination image to handle b CIRCLE (100, 100), 50, 15 _CLEARCOLOR 0 ' makes color 0 (black) transparent _PUTIMAGE , b, a ' put what is on image b to image a (a circle) _PUTIMAGE , a, 0 ' put what is on image a to the screen (handle 0)
- Set the SCREEN mode to graphic (13)
- Make a new image with handle 'a' that has the size 320 * 200 with 256 colors (13)
- Make yet another new image with handle 'b' that has the same size and colors.
- Set the drawing destination to handle 'a'
- Draw a dot on the current destination handle (a)
- Set the drawing destination to handle 'b'
- Draw a circle on the current destination handle (b)
- Set color 0 (black) to be transparent so that the black in the circle will not overdraw the dot.
- Put the image with the circle to the image with the dot.
- Put the image that now has both a circle and a dot to the screen (image 0)
Note: Use _SOURCE when you need to POINT at a image.
See also:
