Text Only
|
Text with Attachments
QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: acjacques on October 30, 2019, 02:33:43 pm
Title:
How copy a part of screen ?
Post by:
acjacques
on
October 30, 2019, 02:33:43 pm
Friends;
How use _COPYIMAGE(0) to capture only a part of screen ?
The copied area wil be further placed in the screen with _PUTIMAGE
Sorry for such so beginners question...
Thanks
Title:
Re: How copy a part of screen ?
Post by:
Petr
on
October 30, 2019, 03:55:29 pm
Why not use PUTIMAGE directly?
Code: QB64:
[Select]
'program copy 320x240 screen part (yellow rectangle) to next screen:
SCREEN
_NEWIMAGE
(
1980
,
1050
,
32
)
CLS
,
&HFFFF0000
LINE
(
0
,
0
)
-
(
320
,
240
)
,
&HFFFFFF00
,
BF
ScreenPart&
=
_NEWIMAGE
(
320
,
240
,
32
)
_PUTIMAGE
,
0
,
ScreenPart&
,
(
0
,
0
)
-
(
320
,
240
)
'copy current (0) screen from area 0,0 to 320, 240 full to new screen named ScreenPart&
PRINT
"Press key to view screen ScreenPart:"
SLEEP
SCREEN
ScreenPart&
'or use _putimage (destinationX, destionationY) - (destinationX2, destionationY2), destination, source, (sourceX1, sourceY1) - (sourceX2, sourceY2)
Text Only
|
Text with Attachments