clip_8 | Iconic Instruction Language

2.3  Parameters

Selectors can be parameterised.

A PARAMETER is defined by a dash-dotted line, attached to the core selector rectangle.

By using an object as a parameter, the dimensions of the parameter object modify the selection location.

Parameterise a selector: Unlike the ordinary selection, the selection location is determined by the dimensions of another object. (1) The selector area, as usual, restricts the set of objects (i.e. no objects outside the area will be affected). `pX`, `pY`, `pXY` can be used to attach a PARAMETER object. via a dash-dotted line. (2) A parameter object attached to `pX` will be evaluated based on its width. (3) The selection location will be offset from `p0` by the `width` of the parameter object. (4) Likewise, the selection location can be offset in y-direction by the `height` of an object by attaching it as a parameter to `pY`, or `pXY` for both directions.
[selectionset 16,16 #9E005D] expected to pass.

p0 pY pX pXY  ==>  p0 pY pX pXY  :    p0 pY pX pXY

Same as above, this time the parameter object has a higher width.
[selectionset 16,16 #9E005D] expected to pass.

p0 pY pX pXY  ==>  p0 pY pX pXY  :    p0 pY pX pXY

Same as above. (1) Neither the x/y location of the parameter object nor the size of the primary selector area has an effect on the final selection locationhas. aOffset is always calculated from `p0` and in the direction towards the used attachment point `pX`, `pY`, `pXY`
[selectionset 16,16 #9E005D] expected to pass.

p0 pY pX pXY  ==>  p0 pY pX pXY  :    p0 pY pX pXY

Even though the calculated selection location can be outside the area of the primary selector, there is no way of selecting an object that is outside the selection set defined by the primary selector (i.e. the upper-right box is a the tselection position but it is not in the set of elements that intersect with the dashed rectangle of the primary selector).
[selectionset 16,16 #9E005D] expected to pass.

p0 pY pX pXY  ==>  p0 pY pX pXY  :    p0 pY pX pXY

A parameter at`pXY` uses an object‘s `width` in x-direction and its `height` in y-direction as an offset from `p0`.
[selectionset 16,16 #9E005D] expected to pass.

p0 pY pX pXY  ==>  p0 pY pX pXY  :    p0 pY pX pXY