po-xor

Constant

Package: common-graphics

A paint operation tells how a source (what you are drawing), a destination (what you are drawing on), and a texture (which affects what is being drawn on) should be combined to produce the actual result. To make a particular paint operation simply add (i.e. bitwise or) up the terms you want. For example, to construct the paint operation "destination or (source=texture)", calculate:

d or st or ~s~t Since d = (dst or ds~t or d~st or d~s~t), st = (dst or ~dst), and ~s~t = (d~s~t or ~d~s~t), d or st or ~s~t = dst or ds~t or d~st or d~s~t or ~dst or ~d~s~t = 128 + 64 + 32 + 16 + 8 + 1 = 249. Not all devices will support all of the possible paint operations. Where a device does not support an operation it will either ignore it or "do its best". To help programming, these constants are defined to allow easy access to the more useful combinations (po stands for Paint Operation)): po-erase, value 48. It represents the logical operation (and (not s) d). po-fill, value 170. It represents the logical operation t. po-invert, value 60. It represents the logical operation (xor s d). po-paint, value 252. It represents the logical operation (or s d). po-replace, value 204. It represents the logical operation s. po-xor, value 195. It represents the logical operation (or (and s d) (and (not s) (not d))).

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.