Transfer Mode Constants
The transfer mode constants are used as values to the style frame slottransferMode
, and the view slotviewTransferMode
. For more information on how these are used, see "Gray Transfer Modes".
Table 6-1 Truth table for
modeCopy
- The source pixel is drawn over the destination pixel.
modeOr
- Non-white pixels are drawn over the destination pixels, but the destination pixels under white pixels are left untouched.
modeXor
- The pixels are combined with a bitwise XOR, exclusive or, operation. This can create unexpected results when used with mid-level grays. For example, the result of combining a
0xA
pixel (75% gray) with a0x7
pixel (about 50% gray) isBxor(0xA,0x7)
=0xD
which is a dark gray. This mode is most often used with a black and white source image. The black pixels invert the destination pixels and the white pixels have no effect on the destination bitmap.
modeBic
- The pixels are combined with a bitwise BIC, bit clear, operation. The BIC operation's truth table is show in Table 6-1.
- This mode is most useful when using a black source image to erase the destination bitmap. It is also useful when drawing white text on a dark background, set the
textPattern
orfillPattern
slots for the text to black. It can have strange effects when combining two gray pixels. For example, source0xA
and destination0xB
produce0x1
, but source0xA
and destination0x5
produce0x5
.
modeNotCopy
- The source image is inverted and then merged with destination bitmap using
modeCopy
.
modeNotOr
- The source image is inverted and then merged with destination bitmap using
modeOr
.
modeNotXor
- The source image is inverted and then merged with destination bitmap using
modeXor
.
modeNotBic
- The source image is inverted and then merged with destination bitmap using
modeBic
.
modeMask
- The bitmap's mask is drawn with
modeBic
, then the "normal" bitmap image is drawn inmodeOr
.
modeBic
Source Destination BIC 0 0 0 0 1 1 1 0 0 1 1 0
![]()
![]()
![]()
![]()
© Apple Computer, Inc.
26 APR 1997Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help