Silverfrost Logo About Us | Contact Us
 

COPY_GRAPHICS_REGION@

Platform

Win32(ClearWin+)

Purpose

To copy screen blocks in drawing surfaces defined by %gr etc..

Syntax

 INTEGER FUNCTION COPY_GRAPHICS_REGION@(
+ DEST_GR, DX, DY, DWIDTH, DHEIGHT,
+ SRC_GR,  SX, SY, SWIDTH, SHEIGHT, COPY_MODE )
 INTEGER DEST_GR, DX, DY, DWIDTH, DHEIGHT,
+ SRC_GR, SX, SY, SWIDTH, SHEIGHT, COPY_MODE

Description

You must have at least one drawing surface open (see for example %`gr in Graphics format). DEST_GR is the handle of the destination drawing surface and SRC_GR is the source drawing surface, however, the handles specified can be the same. If you set either or both to zero then the current drawing surface is assumed for the source and/or destination.

DX, DY, DWIDTH and DHEIGHT specify the destination rectangular region.

SX, SY, SWIDTH and SHEIGHT specify the source rectangular region.

If DWIDTH = SWIDTH and DHEIGHT = SHEIGHT then a normal copy will occur. If there are any differences then the image will be 'stretched' accordingly.

copy_mode defines the method of copying. Windows defines 255 different copy methods (ROPS). The most useful are described below:

 

Hex Value

Name

Logical Description

CC0020

SRCCOPY

source (most common - a direct copy)

8800C6

SRCAND

source and destination

660046

SRCINVERT

source xor destination

440328

SRCERASE

source and not destination

EE0086

SRCPAINT

source or destination

330008

NOTSRCCOPY

not source

1100A6

NOTSRCERASE

not (source or destination)

BB0226

MERGEPAINT

not source or destination

550009

DSTINVERT

not destination

000042

BLACK

0

FF0062

WHITE

1


 

Return value

Returns 1 for success or zero for failure.

Notes

Under Win32 it is possible to stretch a drawing surface when copying from the screen to a printer but not every printer supports this mode.

See also

SCROLL_GRAPHICS@, SELECT_GRAPHICS_OBJECT@, CREATE_GRAPHICS_REGION@, DELETE_GRAPHICS_REGION@

 

 

Copyright © 1999-2017 Silverfrost Limited