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

generate-mask

Arguments: pixmap transparent-pixel-value

Automatically creates a mask for pixmap that causes the pixmap to be transparent wherever transparent-pixel-value occurred in the pixmap's contents. The created mask texture is returned, and is set to be the mask property of the pixmap.

pixmap should be the pixmap to be given a mask. See cg-pixmaps.htm for an overview of pixmap functionality.

transparent-pixel-value should be a non-negative integer or nil. Any pixel in the contents of the pixmap that has this value will become transparent. This is done by setting the mask's pixel value to one and the main image's pixel value to zero, just as you would need to do if you constructed the pixmap's mask-contents yourself.

If transparent-pixel-value is not zero, this means that the existing main texture of the pixmap will be modified by this function. In any case, the pixmap will be given a new mask, and any mask that the pixmap had will be removed from the pixmap.

If the transparent-pixel-value argument is nil, the value of the upper-left pixel of the pixmap is taken as the value to make transparent.


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

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