|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface to define standard constraint encoding constants. Important note: you don't normally need to know or use these internal encodings. Instead you can use the std_constraint_consts interface and std_function class which hides all the internals behind a nicer API.
Constraints with 0, 1, 2, or 3 operands are supported. Operands (depended upon object parts) are encoded in 6 bits with a code indicating which object in the upper 3 bits and a part code in the lower 3. Objects that can be depended upon include: self, parent, previous sibling, next sibling, first child, last child, min child, and max child. Parts of those objects that can be depended upon include: x, y, x2 (right), y2 (bottom), w, h, horizontal center, vertical center, visible, enabled, part_a (object specific), and part_b (object specific).
Constraints are internally encoded as follows:
8 6 6 6 5 KKKKKKKK AAAAAA BBBBBB CCCCCC 0 00000 clip(A, B+K, C-K) KKKKKKKK AAAAAA BBBBBB CCCCCC 1 00000 wrap(A, B+K, C-K) [K is 8 bit unsigned] 16 6 5 5 KKKKKKKKKKKKKKKK XXXXXX 00000 00001 64 0 operand operations [K is 16 bit signed] 16 6 5 5 KKKKKKKKKKKKKKKK AAAAAA 00001 00001 31 1 operand operations ... [K is 16 bit signed] KKKKKKKKKKKKKKKK AAAAAA 11111 00001 15 6 6 5 KKKKKKKKKKKKKKK AAAAAA BBBBBB 00010 30 2 operand operations ... [K is 15 bit signed] KKKKKKKKKKKKKKK AAAAAA BBBBBB 11111Where KKK represents a constant, AAA, BBB, and CCC represent parameter objects, and XXX represents bits used to encode an op code.
Field Summary | |
static int |
EXTERNAL_TEST_MASK
Mask for testing external. |
static int |
EXTERNAL_TEST_VAL
Value for testing external. |
static int |
HORIZONTAL
Orientation code indicating horizontal constraint. |
static int |
NONE_TEST_MASK
Mask for testing none. |
static int |
NONE_TEST_VAL
Value for testing none. |
static int |
NOT_ORIENTED
Orientation code indicating constraint that is neither horizontal or vertical in nature. |
static int |
OBJCODE_FIRST_CHILD
Code to reference local neighborhood object: first child |
static int |
OBJCODE_LAST_CHILD
Code to reference local neighborhood object: last child |
static int |
OBJCODE_MASK
Mask for accessing object code in object/part encoding. |
static int |
OBJCODE_MAX
Largest valid object code. |
static int |
OBJCODE_MAX_CHILD
Code to compute the maximum of some part among child objects |
static int |
OBJCODE_MIN_CHILD
Code to compute the minimum of some part among child objects |
static int |
OBJCODE_NEXT_SIBLING
Code to reference local neighborhood object: next sibling |
static int |
OBJCODE_PARENT
Code to reference local neighborhood object: parent |
static int |
OBJCODE_PREV_SIBLING
Code to reference local neighborhood object: previous sibling |
static int |
OBJCODE_SELF
Code to reference local neighborhood object: self |
static int |
OBJCODE_SHIFT
Shift value for accessing object code in object/part encoding. |
static int |
OBJCODE_SOME_CHILD
Special object code to designate some child object during mark out-of-date phase. |
static java.lang.String[] |
OBJCODE_strings
Table of strings for object code names. |
static java.lang.String[] |
OBJCODE_tags
Table of very terse strings for object code names. |
static int |
OBJPART_MASK
Mask to limit an encode to just the low order 6 bits (for an object/part encoding. |
static int |
OP_add
Op code for A + B + K |
static int |
OP_and
Op code for A & B & (K | 0xffff8000) |
static int |
OP_ave
Op code for (A + B)/2 + K |
static int |
OP_centered
Op code for (A-self.wh)/2 + K |
static int |
OP_clip
Op code for clip(A, B+K, C-K) |
static int |
OP_div
Op code for A / B + K |
static int |
OP_external
Op code that indicates a separate external (or heavyweight) constraint is being applied. |
static int |
OP_far_edge_just
Op code for A - self.wh - K |
static int |
OP_fill
Op code for B - A - K |
static int |
OP_if_enabled
Op code for (if enabled then A else B) + K |
static int |
OP_if_visible
Op code for (if visible then A else B) + K |
static int |
OP_konst
Op code for a constant constraint |
static int |
OP_mask
Op code for A & (K|0xffff0000) |
static int |
OP_max
Op code for max(A, B) + K |
static int |
OP_min
Op code for min(A, B) + K |
static int |
OP_mod
Op code for A % B + K |
static int |
OP_mult
Op code for A * B + K |
static int |
OP_NONE
Special op code that indicates that no constraint should be applied |
static int |
OP_not_mask
Op code for ~A & (K|0xffff0000) |
static int |
OP_offset
Op code for A + K |
static int |
OP_or
Op code for (A | B) & (K | 0xffff8000) |
static int |
OP_parent_fun1
Op code for parent.fun1(A,K) |
static int |
OP_parent_fun2
Op code for parent.fun2(A, B, K) |
static int |
OP_rotx
Op code for rotate_x(theta, B)+K |
static int |
OP_roty
Op code for rotate_y(theta, B)+K |
static int |
OP_self_fun1
Op code for self.fun1(A,K) |
static int |
OP_self_fun2
Op code for self.fun2(A, B, K) |
static int |
OP_subtract
Op code for A - B + K |
static int |
OP_wrap
Op code for wrap(A, B+K, C-K) |
static int |
OP_xor
Op code for A ^ B) & (K | 0xffff8000) |
static int |
OP0_LOBITS
Fixed low order bits for 0-op constraint encoding. |
static int |
OP0_MASK
Mask value for extracting op codes from 0-op constraints. |
static int |
OP0_MAX
Largest valid 0-op op code |
static int |
OP0_MIN
Lowest valid 0-op op code |
static int |
OP0_SHIFT
Shift value for extracting op codes from 0-op constraints. |
static java.lang.String[] |
OP0_strings
Table of strings for 0-op op code names |
static java.lang.String[] |
OP0_tags
Table of terse strings for 0-op op code names |
static int |
OP1_LOBITS
Fixed low order bits for 1-op constraint encoding. |
static int |
OP1_MASK
Mask value for extracting op codes from 1-op constraints. |
static int |
OP1_MAX
Largest valid 1-op op code |
static int |
OP1_MIN
Lowest valid 1-op op code |
static int |
OP1_SHIFT
Shift value for extracting op codes from 1-op constraints. |
static java.lang.String[] |
OP1_strings
Table of op code name strings |
static java.lang.String[] |
OP1_tags
Table of terse op code name strings |
static int |
OP2_LOBITS
Fixed low order bits for 2-op constraint encoding. |
static int |
OP2_MASK
Mask value for extracting op codes from 2-op constraints. |
static int |
OP2_MAX
The largest valid 2-op op code |
static int |
OP2_MIN
Lowest valid 2-op op code |
static int |
OP2_SHIFT
Shift value for extracting op codes from 2-op constraints. |
static java.lang.String[] |
OP2_strings
Table of op code name strings. |
static java.lang.String[] |
OP2_tags
Table of terse op code name strings. |
static int |
OP3_LOBITS
Fixed low order bits for 3-op constraint encoding. |
static int |
OP3_MASK
Mask value for extracting op codes from 3-op constraints. |
static int |
OP3_MAX
Highest valid 3-op op code |
static int |
OP3_MIN
Lowest valid 3-op op code |
static int |
OP3_SHIFT
Shift value for extracting op codes from 3-op constraints. |
static java.lang.String[] |
OP3_strings
Table of op code name strings |
static java.lang.String[] |
OP3_tags
Table of terse op code name strings |
static int |
PARTCODE_CENTER
Code to reference the horizontal or vertical center of an object (which is x+w/2 or y+h/2). |
static int |
PARTCODE_ENABLED
Code to reference the enabled part of an object |
static int |
PARTCODE_MASK
Mask to extract part code from object/part encoding. |
static int |
PARTCODE_MAX
Largest valid part code |
static int |
PARTCODE_PART_A
Code to reference the part_a part of an object |
static int |
PARTCODE_PART_B
Code to reference the part_b part of an object |
static int |
PARTCODE_SHIFT
Shift value to extract part code from object/part encoding. |
static java.lang.String[] |
PARTCODE_strings_h
Table of strings for horizontal part names. |
static java.lang.String[] |
PARTCODE_strings_v
Table of strings for vertical part names. |
static java.lang.String[] |
PARTCODE_tags_h
Table of very terse strings for horizontal part names. |
static java.lang.String[] |
PARTCODE_tags_v
Table of very terse strings for vertical part names. |
static int |
PARTCODE_VISIBLE
Code to reference the visible part of an object |
static int |
PARTCODE_WH
Code to reference the w or h part of an object |
static int |
PARTCODE_XY
Code to reference the x or y part of an object. |
static int |
PARTCODE_XY2
Code to reference the x2 or y2 part of an object (which is x+w or y+h). |
static int |
VERTICAL
Orientation code indicating vertical constraint. |
Field Detail |
public static final int HORIZONTAL
public static final int VERTICAL
public static final int NOT_ORIENTED
public static final int OBJCODE_SELF
public static final int OBJCODE_PARENT
public static final int OBJCODE_FIRST_CHILD
public static final int OBJCODE_LAST_CHILD
public static final int OBJCODE_MAX_CHILD
public static final int OBJCODE_MIN_CHILD
public static final int OBJCODE_PREV_SIBLING
public static final int OBJCODE_NEXT_SIBLING
public static final int OBJCODE_MAX
public static final int OBJCODE_MASK
public static final int OBJCODE_SHIFT
public static final int OBJCODE_SOME_CHILD
public static final java.lang.String[] OBJCODE_strings
public static final java.lang.String[] OBJCODE_tags
public static final int PARTCODE_XY
public static final int PARTCODE_XY2
public static final int PARTCODE_WH
public static final int PARTCODE_CENTER
public static final int PARTCODE_VISIBLE
public static final int PARTCODE_ENABLED
public static final int PARTCODE_PART_A
public static final int PARTCODE_PART_B
public static final int PARTCODE_MAX
public static final int PARTCODE_MASK
public static final int PARTCODE_SHIFT
public static final java.lang.String[] PARTCODE_strings_h
public static final java.lang.String[] PARTCODE_strings_v
public static final java.lang.String[] PARTCODE_tags_h
public static final java.lang.String[] PARTCODE_tags_v
public static final int OBJPART_MASK
public static final int OP3_SHIFT
public static final int OP3_MASK
public static final int OP3_LOBITS
public static final int OP3_MIN
public static final int OP_clip
public static final int OP_wrap
public static final int OP3_MAX
public static final java.lang.String[] OP3_strings
public static final java.lang.String[] OP3_tags
public static final int OP0_SHIFT
public static final int OP0_MASK
public static final int OP0_LOBITS
public static final int OP0_MIN
public static final int OP_NONE
public static final int OP_external
public static final int OP_konst
public static final int OP0_MAX
public static final java.lang.String[] OP0_strings
public static final java.lang.String[] OP0_tags
public static final int NONE_TEST_MASK
public static final int NONE_TEST_VAL
public static final int EXTERNAL_TEST_MASK
public static final int EXTERNAL_TEST_VAL
public static final int OP1_SHIFT
public static final int OP1_MASK
public static final int OP1_LOBITS
public static final int OP1_MIN
public static final int OP_self_fun1
public static final int OP_parent_fun1
public static final int OP_not_mask
public static final int OP_mask
public static final int OP_centered
public static final int OP_offset
public static final int OP_far_edge_just
public static final int OP1_MAX
public static final java.lang.String[] OP1_strings
public static final java.lang.String[] OP1_tags
public static final int OP2_SHIFT
public static final int OP2_MASK
public static final int OP2_LOBITS
public static final int OP2_MIN
public static final int OP_add
public static final int OP_subtract
public static final int OP_mult
public static final int OP_div
public static final int OP_mod
public static final int OP_and
public static final int OP_or
public static final int OP_xor
public static final int OP_min
public static final int OP_max
public static final int OP_ave
public static final int OP_rotx
public static final int OP_roty
public static final int OP_if_enabled
public static final int OP_if_visible
public static final int OP_self_fun2
public static final int OP_parent_fun2
public static final int OP_fill
public static final int OP2_MAX
public static final java.lang.String[] OP2_strings
public static final java.lang.String[] OP2_tags
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |