Hi Guys and Gals
my knowledge of QB64 goes on! Each day and each moment is a good source of knowledge.
Reading this thread my attention falls on the use of SCREEN
https://www.qb64.org/wiki/SCREEN and of PCOPY
https://www.qb64.org/wiki/index.php/PCOPY.
Well what's about the last one?
I remember in QB45 that you can use PCOPY only for being video pages, so the number that you can use is depending from the SCREEN mode set in the code. A different value activates an error.
In QB64 PCOPY has got a special feature: when you use PCOPY with QB64 screen mode (32bit color) you can specify any digit as name of a screen video page to use as canvas. It's a magic feature because you needn't create a _NEWIMAGE with the same dimensions and attribute (32bit color), PCOPY does it by itself.
What is bad? Only the wiki documentation that shows this feature in a demonstration code, but no words into the help.
Here wiki example 1 that shows this feature of PCOPY
SCREEN _NEWIMAGE(640, 480, 32) 'any graphics mode should work without setting up pages SetupCursor
' other program code
PCOPY _DISPLAY, 100 'any page number as desination with the _DISPLAY function as source
as you can see with my little mod
it needn't _DISPLAY , and you can copy among as many as you want (under the limit of RAM avaiable on the machine) screen video pages with no effort of declaring it before to use.
SCREEN _NEWIMAGE(640, 480, 32) 'any graphics mode should work without setting up pages SetupCursor
' other program code
PCOPY 0, 100 ' _DISPLAY, 100 'any page number as desination with the _DISPLAY function as source
Moreover PCOPY uses dimensions of screen active
run this code to see
a&
= _NEWIMAGE(640, 480, 32) 'any graphics mode should work without setting up pages
SetupCursor
' other program code
PCOPY 0, 100 ' _DISPLAY, 100 'any page number as desination with the _DISPLAY function as source
PS _SOURCE doesn't seem to affect PCOPY working
Good news added to my knowledge.