copy-pixels-to-stream

Generic Function

Package: common-graphics

Arguments: stream texture texture-info to-box-or-position from-box-or-nil paint-operation

Implements the bit block transfer operation, generalized to pixels. Pixels from texture are copied onto stream using paint-operation to combine them with the existing ones. Note that the function copy-to-stream does much the same thing as this function and does not require the use of separate texture and texture-info objects.

from-box-or-nil is either a box object or nil. If it is a box, it is the box in texture from which copying occurs. If it is nil, then the whole pixmap is copied.

to-box-or-position is either a box object or a position object. If it is a box, it is the box in stream which is modified. If it is a position, then the pixmap is copied with its upper-left corner at that position without stretching the pixmap.

Thus, if from-box-or-nil is nil and to-box-or-position is a position, then the entire pixmap is drawn at the specified position without stretching it.

The box to be copied is intersected with the texture dimensions and stream clipping box and the resultant box is the set of pixels actually copied. If texture is a bitmap, 1's are copied as stream's foreground color, 0's as its background color. If texture-info is nil, one that matches the stream is used.

When the destination area (to-box-or-nil) is a box of a different size than the source bitmap, the copied area is stretched rather than clipped to make it fit the destination area. Clipping is performed when the source area (from-box-or-nil) is a box of a different size than the source bitmap.

Note: incompatible change in release 6.0: in releases prior to 6.0, when a frame-with-single-child instance was passed to this operator, the operator was actually applied to the child (the result of applying frame-child to the frame-with-single-child instance. In release 6.0, this redirection no longer occurs. If you intend this operator to apply to the frame-child, pass that to this operator rather than the parent. This is a non-backward-compatible-change. See the release notes for more information.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.