sjm.examples.sling
Class ScaleAssembler
java.lang.Object
|
+--sjm.parse.Assembler
|
+--sjm.examples.sling.ScaleAssembler
- public class ScaleAssembler
- extends Assembler
This class augments the stack with default scale arguments,
and then uses a FunctionAssembler with a
Scale object to work on the assembly.
A scale requires five source functions, namely: aFrom, a,
aTo, bFrom, and bTo. This allows, for example, a scale to
map coordinates from an "a" coordinate system to a "b"
coordinate system. The Sling language only accepts two
arguments in a scale function: bFrom and bTo,
and defaults the "a" system to be time. For example, the
Sling language function scale(-pi, pi) implies
the internal scale function scale(0, t, 1, -pi,
pi). This class slips the arguments (0, t, 1) into
the stack, and then uses a normal Scale object
to work on the assembly.
|
Method Summary |
void |
workOn(Assembly a)
Slip the arguments (0, t, 1) into the stack, and use a normal
Scale object to work on the assembly. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ScaleAssembler
public ScaleAssembler()
workOn
public void workOn(Assembly a)
- Slip the arguments (0, t, 1) into the stack, and use a normal
Scale object to work on the assembly.
- Overrides:
- workOn in class Assembler
- Parameters:
Assembly - the assembly to work on