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

NextPrevUpTopContentsIndex

copy-area

Function
Summary

Copies a rectangular area from one port to another.

Package

graphics-ports

Signature

copy-area 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-area copies a rectangular area from one port to another, taking account of transformations.

In drawing-mode :compatible (old drawing mode), copy-area does exactly the same as copy-pixels.

In drawing-mode :quality (the default) it copies a rectangular area from one port to another. The transform , mask , mask-transform, compositing-mode and shape-mode of to-port 's graphics-state are used. The to-port and from-port need not be the same depth. They can be the same object. The from-x and from-y values are interpreted as pixel positions in the window coordinates of from-port , that is, they are not transformed by from-port 's transform.

Notes

The main difference between copy-area and copy-pixels in drawing-mode :quality is when copying from a displayed window.

copy-area always copies using the right transformation of the target, but it means that it may copy from an obscured part of the window and hence copy the wrong thing. copy-pixels generates an exposure event on the target port instead of copying obscure areas, but to do that it has to ignore the transformation.

Examples
(example-edit-file "capi/graphics/compositing-mode")
See also

copy-pixels
graphics-state
Drawing - Graphics Ports


CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017

NextPrevUpTopContentsIndex