Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## stretch-mode

Arguments: window

Returns or sets with setf the stretch mode of window. The stretch mode determines how pixels are combined when using copy-pixels-to-stream to draw a pixmap on window such that the image is smaller in at least one direction. In that case, at least some pixels in the original image will map to a single displaced pixel. The stretch mode determines the color of those pixels.

The modes are:

- `:black-on-white` performs a Boolean AND operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves black pixels at the expense of white pixels.
- `:white-on-black` performs a Boolean OR operation using the color values for the eliminated and existing pixels. If the bitmap is a monochrome bitmap, this mode preserves white pixels at the expense of black pixels.
- `:color-on-color` deletes the pixels. This mode deletes all eliminated lines of pixels without trying to preserve their information.
- `:halftone` maps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels.

### GTK Note

This option is not implemented on the GTK platform. GTK does not appear to offer an option that is similar to the one that is built into the Windows bitblitting functionality. Calling (setf stretch-mode) on GTK will simply invoke the `*gtk-compatibility-warning-action*`.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version