| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
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-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |