copy-to-stream

Generic Function

Package: common-graphics

Arguments: pixmap-or-cursor stream &optional to-box-or-position from-box-or-nil (mode po-replace)

Copies a pixmap object or a cursor object to a graphical stream. Replaces the older function copy-pixels-to-stream, which required the use of separate texture and texture-info objects.

If from-box-or-nil is a box, this function copies the from-box-or-nil portion of pixmap-or-cursor to the to-box-or-position portion of stream, using a particular pixel-combination mode. If from-box-or-nil is nil, the whole pixmap or cursor is copied.

If to-box-or-position is a box, the pixmap-or-cursor is copied to that box and is stretched (if necessary) as with copy-pixels-to-stream. If to-box-or-position is a position, then the pixmap or cursor is copied without stretching so its upper left corner is at the position. If to-box-or-position is nil (the default), then the pixmap or cursor is copied without stretching to position 0,0 of stream.

If pixmap-or-cursor has a mask texture, then copy-pixels-with-mask-to-stream is called internally in order to use it. Otherwise copy-pixels-to-stream is called internally. If pixmap-or-cursor has a pixmap-handle, then that is used for drawing the pixmap, and otherwise the its texture is used.

The existing symbols po-replace, po-paint, po-xor, po-invert, po-fill, and po-erase are bound to the commonly-used pixel-combination modes. A pixel-combination mode, or paint operation, is an integer that is used by the OS to determine how each pair of source and destination pixel colors map to a result color.

Instead of passing a pixmap object, a cursor object, pixmap handle, or a symbol bound to either a pixmap, cursor, or pixmap handle may be passed.

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.