| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |
Pixels to be painted on a device make a reference to three separate places: the destination, the source and a texture. These pixels are combined to create the actual pixel to be placed into the destination.
Such a combination is defined by a bitwise logical operation, called
the paint operation. In Allegro CL, there are 256 possible paint
operations that are given numbers from 0 to 255. There are eight
possible minterms (of the three places):
po-dst
,
po-ds~t
,
po-d~st
,
po-~dst
,
po-d~s~t
,
po-~ds~t
,
po-~d~st
, and
po-~d~s~t
where d is destination, s is source
and t is texture (and ~ is the logical not operation). Each minterm
may be present or absent from a paint operation.
A source pixel is copied to the corresponding destination pixel whenever the minterm representing the state of that pixel in the source, destination and texture pixmaps is present in the paint operation. (The minterm is "present" if its bit is on in the paint argument.) Thus there are 256 possible operations. Minterms are given the following weights (and to aid programming, named constants set to them):
po-dst 128 po-ds~t 64 po-d~st 32 po-~dst 8 po-d~s~t 16 po-~ds~t 4 po-~d~st 2 po-~d~s~t 1
Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |