logico(3G)logico(3G)NAMElogico - specifies a logical operation for pixel writes
FORTRAN 77 SPECIFICATION
subroutine logico(opcode)
integer*4 opcode
PARAMETERS
opcode expects one of the 16 possible logical operations.
Symbol Operation
LOZERO 0
LOAND src AND dst
LOANDR src AND (NOT dst)
LOSRC src
LOANDI (NOT src) AND dst
LODST dst
LOXOR src XOR dst
LOOR src OR dst
LONOR NOT (src OR dst)
LOXNOR NOT (src XOR dst)
LONDST NOT dst
LOORR src OR (NOT dst)
LONSRC NOT src
LOORI (NOT src) OR dst
LONAND NOT (src AND dst)
LOONE 1
Only the lower 4 bits of opcode are used.
The values of LOSRC and LODST have been chosen so that
expressing an operation as the equivalent combination of them
and the FORTRAN bit manipulation intrinsics generates an
acceptable opcode value; e.g., LONAND can be written as
NOT(IAND(LOSRC, LODST)) .
DESCRIPTIONlogico specifies the bit-wise logical operation for pixel writes. The
logical operation is applied between the source pixel value (incoming
value) and existing destination value (previous value) to generate the
final pixel value. In colorindex mode all of the (up to 12) writemask
enabled index bits are changed. In RGB mode all of the (up to 32)
enabled component bits are changed.
logico defaults to LOSRC, meaning that the incoming source value simply
replaces the current (destination) value.
It is not possible to do logical operations and blend simultaneously.
When opcode is set to any value other than LOSRC, the blendfunction
sfactr and dfactr values are forced to BFONE and BFZERO repectively
(their default values). Likewise, calling blendf with arguments other
Page 1
logico(3G)logico(3G)
than BFONE and BFZERO forces the logical opcode to LOSRC.
Unlike blendf, logico is valid in all drawing modes (NORMDR, UNDRDR,
OVRDRW, PUPDRW, CURSDR) and in both colorindex and RGB modes. Like the
blendfunction, it affects all drawing operations, including points,
lines, polygons, and pixel area transfers.
When multiple destination buffers are specified (using frontb, backbu,
and zdraw ) only a single location is read and used during the logical
operation. By default, the destination value is read from the front
buffer in single buffer mode and from the back buffer in double buffer
mode. If the front buffer is not enabled in single buffer mode, the
value is taken from the z-buffer. If the back buffer is not enabled in
double buffer mode, the value is taken from the front buffer (if
possible) or from the z-buffer.
SEE ALSO
blendf, gversi, getgde
NOTES
The numeric assignments of the 16 operation names were chosen to be
identical to those defined by the X Window System. They will not be
changed in future software releases.
This routine does not function on IRIS-4D B and G models, nor does it
function on early serial numbers of the Personal Iris. Use gversi to
determine which type you have.
Some IRIS-4D GT and GTX models do support this routine. Use getgde to
determine if logico is supported.
BUGS
Personal Iris models do not support logical operations in combination
with non-solid patterns nor with zoomed pixel writes or copies. When
either of these features is selected, the default logical operation,
LOSRC, will be used regardless of the value passed to logico.
Page 2