1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 15:00:38 +00:00
QB64-PE/internal/help/_SOURCE.txt

46 lines
1.3 KiB
Plaintext
Raw Normal View History

2016-03-18 11:36:04 +00:00
{{DISPLAYTITLE:_SOURCE}}
2017-10-10 14:55:21 +00:00
The [[_SOURCE]] statement establishes the image SOURCE using a handle created by [[_LOADIMAGE]], [[_NEWIMAGE]] or [[_COPYIMAGE]].
{{PageSyntax}}
2017-10-10 14:55:21 +00:00
: [[_SOURCE]] {{Parameter|handle&}}
{{PageDescription}}
2017-10-10 14:55:21 +00:00
* The handle is a [[LONG]] integer value from the [[_SOURCE (function)|_SOURCE]] function or a handle created by [[_NEWIMAGE]].
2016-03-18 11:36:04 +00:00
* If the handle is designated as 0, it refers to the current [[SCREEN]] image.
2017-10-10 14:55:21 +00:00
* A source image can only supply information to a program. [[POINT]] and [[GET (graphics statement)|GET]] might require a source other than the one currently active.
{{PageExamples}}
{{CodeStart}} '' ''
2016-03-18 11:36:04 +00:00
{{Cl|SCREEN}} 13
a = {{Cl|_NEWIMAGE}}(320,200,13)
{{Cl|_DEST}} a
{{Cl|PSET}} (100, 100), 15
{{Cl|_SOURCE}} a
{{Cl|_DEST}} 0
{{Cl|PRINT}} {{Cl|POINT}}(100, 100) '' ''
{{CodeEnd}}
{{OutputStart}}
15
{{OutputEnd}}
2017-10-10 14:55:21 +00:00
: ''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.
2017-10-10 14:55:21 +00:00
===More examples===
See the examples in:
* [[Bitmaps]]
* [[SAVEIMAGE]]
* [[SaveIcon32]]
{{PageSeeAlso}}
* [[_DEST]]
* [[_SOURCE (function)]]
2016-03-18 11:36:04 +00:00
* [[POINT]], [[GET (graphics statement)]]
2019-04-15 01:15:33 +00:00
{{PageNavigation}}
<