FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

copy-pixels-with-mask-to-stream

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

This function is similar to copy-pixels-to-stream except it allows you to copy a non-rectangular image. This is done by passing a mask-texture. The texture defines which pixels should be copied and which should be left unchanged.

The first five arguments are the same as for copy-pixels-to-stream. The sixth argument is mask-bitmap, a 1-bit-per-pixel texture with a 1 wherever the texture should be transparent (destination is left alone) and a 0 wherever texture should modify the destination. This function works by erasing the destination wherever there is a 1 in mask-texture and then merging in texture with the paint operation. (Since the operation is predefined, there is no paint-operation argument.)

If you use load-pixmap to load a .ico (icon) file, the third returned value is a mask bitmap suitable for using as the mask-texture argument.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.7.29.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version