sub_arctic.style
Class max_rule
java.lang.Object
|
+--sub_arctic.style.op1_placement_rule
|
+--sub_arctic.style.op2_placement_rule
|
+--sub_arctic.style.op3_placement_rule
|
+--sub_arctic.style.max_rule
- public class max_rule
- extends op3_placement_rule
This class provides a composition placement rule for computing the max
of two things and optionally adds an offset to that.
- See Also:
composer
,
composition_part
Constructor Summary |
max_rule(int referent1,
int referent_num1,
int referent_coord1,
int referent2,
int referent_num2,
int referent_coord2)
Constructor which defaults to a zero offset (hence computing a simple
max). |
max_rule(int referent1,
int referent_num1,
int referent_coord1,
int referent2,
int referent_num2,
int referent_coord2,
int referent3,
int referent_num3,
int referent_coord3)
Full constructor. |
Method Summary |
int |
eval(composer comp_obj)
Evaluate the rule to produce a value. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
max_rule
public max_rule(int referent1,
int referent_num1,
int referent_coord1,
int referent2,
int referent_num2,
int referent_coord2,
int referent3,
int referent_num3,
int referent_coord3)
- Full constructor.
- Parameters:
int
- referent1 designator for first object we are computed
from. This must be one of PART, PARM, or CONST.int
- refernent_num1 Number of part or parameter being refered to
(or a constant value if referent == CONST).int
- referent_coord1 designator for which coordinate of the referent
This must either be one of LEFT, RIGHT, TOP,
BOTTOM, HCENTER, or VCENTER, or it must be
constructed from a feature point number (FPN)
using either: (FPN << FEATURE_SHIFT) | FEATURE_X
to designate the x value of a feature point,
or as (FPN << FEATURE_SHIFT) | FEATURE_Y to
designate the y value of a feature point.int
- referent2 designator for second object we are computed
from. This must be one of PART, PARM, or CONST.int
- refernent_num2 Number of part or parameter being refered to
(or a constant value if referent == CONST).int
- referent_coord2 designator for which coordinate of the referent
This must either be one of LEFT, RIGHT, TOP,
BOTTOM, HCENTER, or VCENTER, or it must be
constructed from a feature point number (FPN)
using either: (FPN << FEATURE_SHIFT) | FEATURE_X
to designate the x value of a feature point,
or as (FPN << FEATURE_SHIFT) | FEATURE_Y to
designate the y value of a feature point.int
- referent3 designator for offset object we are computed
from. This must be one of PART, PARM, or CONST.int
- refernent_num3 Number of part or parameter being refered to
(or a constant value if referent == CONST).int
- referent_coord3 designator for which coordinate of the referent
This must either be one of LEFT, RIGHT, TOP,
BOTTOM, HCENTER, or VCENTER, or it must be
constructed from a feature point number (FPN)
using either: (FPN << FEATURE_SHIFT) | FEATURE_X
to designate the x value of a feature point,
or as (FPN << FEATURE_SHIFT) | FEATURE_Y to
designate the y value of a feature point.
max_rule
public max_rule(int referent1,
int referent_num1,
int referent_coord1,
int referent2,
int referent_num2,
int referent_coord2)
- Constructor which defaults to a zero offset (hence computing a simple
max).
- Parameters:
int
- referent1 designator for first object we are computed
from. This must be one of PART, PARM, or CONST.int
- refernent_num1 Number of part or parameter being refered to
(or a constant value if referent == CONST).int
- referent_coord1 designator for which coordinate of the referent
This must either be one of LEFT, RIGHT, TOP,
BOTTOM, HCENTER, or VCENTER, or it must be
constructed from a feature point number (FPN)
using either: (FPN << FEATURE_SHIFT) | FEATURE_X
to designate the x value of a feature point,
or as (FPN << FEATURE_SHIFT) | FEATURE_Y to
designate the y value of a feature point.int
- referent2 designator for second object we are computed
from. This must be one of PART, PARM, or CONST.int
- refernent_num2 Number of part or parameter being refered to
(or a constant value if referent == CONST).int
- referent_coord2 designator for which coordinate of the referent
This must either be one of LEFT, RIGHT, TOP,
BOTTOM, HCENTER, or VCENTER, or it must be
constructed from a feature point number (FPN)
using either: (FPN << FEATURE_SHIFT) | FEATURE_X
to designate the x value of a feature point,
or as (FPN << FEATURE_SHIFT) | FEATURE_Y to
designate the y value of a feature point.
eval
public int eval(composer comp_obj)
- Evaluate the rule to produce a value. This basically just executes the
function associated with the rule.
- Parameters:
composer
- comp_obj the composer object doing the evaluation.
This object provides access the value of other
parts, and to the set of parameters to the
composition. It also keeps some of the
evauation bookkeeping.- Returns:
- int the result of the evaluation.
- Overrides:
- eval in class op3_placement_rule