|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.BinaryOperation
public class BinaryOperation
Binary operations used in set*() drawing methods. All 16 binary mappings are coded into one integer ( [oldBit,newBit] -> resultBit).
interface BitMask
,
interface RasterGraphics
Field Summary | |
---|---|
static int |
BIN_OP_0010
Old & Not(New) /= Old subtract New/ .. code = 0010. |
static int |
BIN_OP_0100
Not(Old) & New /= New subtract Old/ .. code = 0100. |
static int |
BIN_OP_1011
Old | Not(New) .. code = 1011. |
static int |
BIN_OP_1101
Not(Old) | New .. code = 1101. |
static int |
BIN_OP_AND
And .. code = 0001. |
static int |
BIN_OP_DUMMY
Dummy .. code = 0011. |
static int |
BIN_OP_EQUAL
Equal .. code = 1001. |
static int |
BIN_OP_NAND
Not(And) .. code = 1110. |
static int |
BIN_OP_NEGATE
Negate .. code = 1100. |
static int |
BIN_OP_NOR
Not(Or) .. code = 1000. |
static int |
BIN_OP_NSET
Not(Set) .. code = 1010. |
static int |
BIN_OP_ONE
One .. code = 1111. |
static int |
BIN_OP_OR
Or .. code = 0111. |
static int |
BIN_OP_SET
Set .. code = 0101. |
static int |
BIN_OP_SUB_INV
|
static int |
BIN_OP_SUBTRACT
|
static int |
BIN_OP_XOR
Xor .. code = 0110. |
static int |
BIN_OP_ZERO
Zero .. code = 0000. |
Constructor Summary | |
---|---|
BinaryOperation()
|
Method Summary | |
---|---|
static boolean |
boolOp(int op,
boolean canvas,
boolean brush)
Returns the binary-op result. |
static int |
stationaryOp(int op)
Returns the stationary closure of a binary operation (0 in brush plane must not change anything). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BIN_OP_ZERO
public static final int BIN_OP_NOR
public static final int BIN_OP_0100
public static final int BIN_OP_SUB_INV
public static final int BIN_OP_NEGATE
public static final int BIN_OP_0010
public static final int BIN_OP_SUBTRACT
public static final int BIN_OP_NSET
public static final int BIN_OP_XOR
public static final int BIN_OP_NAND
public static final int BIN_OP_AND
public static final int BIN_OP_EQUAL
public static final int BIN_OP_SET
public static final int BIN_OP_1101
public static final int BIN_OP_DUMMY
public static final int BIN_OP_1011
public static final int BIN_OP_OR
public static final int BIN_OP_ONE
Constructor Detail |
---|
public BinaryOperation()
Method Detail |
---|
public static final boolean boolOp(int op, boolean canvas, boolean brush)
op
- Binary operation code.canvas
- The original (canvas) boolean value.brush
- The drawn (brush) boolean value.
public static final int stationaryOp(int op)
op
- The binary operation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |