All Manuals > CAPI User Guide and Reference Manual > 22 GRAPHICS-PORTS Reference Entries

copy-pixels Function

Summary

Copies a rectangular area from one port to another.

Package

graphics-ports

Signature

copy-pixels to-port from-port to-x to-y width height from-x from-y &rest args

Arguments
to-port
A graphics port.
from-port
A graphics port.
to-x
A real number.
to-y
A real number.
width
A real number.
height
A real number.
from-x
A real number.
from-y
A real number.
args
graphics-state parameters passed as keyword arguments.
Description

The function copy-pixels copies a rectangular area from from-port to to-port. The transform, mask, mask-transform, compositing-mode and shape-mode from to-port's graphics-state are all used, unless overridden in args. to-port and from-port need not have the same depth and can be the same object.

The corners of the copied rectangle are (from-x from-y), (from-x+width from-y), (from-x+width from-y+height) and (from-x from-y+height), which are interpreted as pixel positions in the window coordinates of from-port, that is, they are not transformed by from-port's transform. The top left of the rectangle is copied to (to-x to-y) in to-port's coordinates.

When to-port's drawing-mode is :quality the target is generally fully transformed, except that when it copies from a visible window it may generate expose events when copying from an obscured part, and in drawing-mode :quality it ignores the transformation in this case.

If to-port's drawing-mode is :compatible then the image is not scaled or rotated. For more information about drawing-mode, see 13.2.1 The drawing mode and anti-aliasing.

Notes

copy-pixels can be used to draw to an output-pane inside the display-callback of that pane, but it cannot be used to copy from the output-pane inside its display-callback (the result of such an operation is not defined).

See also

copy-area
output-pane
13 Drawing - Graphics Ports


CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:33:02