Package curve.control
Class Interpreter
java.lang.Object
curve.control.Interpreter
The xxx file format will follow this structure. This structure will be maintained in memory.
All editor screen actions will be fed into this table.
Define hoop:
- HP width, height
Define colours:
- CO id, r,g,b
- CC id - current colour at time of saving, set at end of load
Define layer:
- LN id
- LO id1, id2, id3 - layer order
- LC id - current layer at time of saving, set at end of load
Define points(unique only to complete drawing):
- PE sid X Y layer_id - end point
- PC sid X Y layer_id - control point
- PA sid X Y layer_id colour orientation - area point
Define lines:
- LS sid ep0 ep1 colour_id(default black) width (default 1)
- LQ sid ep0 cp ep1 colour_id thickness
- LC sid ep0 cp0 cp1 ep1 colour_id thickness
- LD sid - line delete
Move cursor - for ctl z undo:
- MC x, y, lastx, lasty
- consecutive cursor will be consolidated if from the same point
Pan Screen:
- PS x, y
Zoom:
- ZM scale, last Z scale
Record all actions so they can be unrolled ctl z or re-actioned with ctl y
All measurements in cm, with two decimal places, accurate to 0.1 mm
-
Field Summary
FieldsModifier and TypeFieldDescriptionactionsReDoactionsUnDo(package private) Boardboard(package private) DotsCanvasdc(package private) static booleandebug(package private) static booleandebugDelete(package private) static booleandebugDoit(package private) Trt(package private) static Stringzz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd actionvoidaddBoardLink(Board board) add board(package private) booleanColourArea(String[] sa) colour areavoiddefineArea(String[] sa) define area called by 'A id fx fy colourdo it(package private) Stringdo it 1voiddoRedo()do redodoSwitchAction(char c0, char c1, String[] sa) do switch actionvoiddoUndo()do undoset up line Cubicbooleandraw LQset up straight lineprivate Stringdraw Ovalset up control pointset up end pointvoiddump salineDelete(String s) line delete(package private) voidlogging link to Log.mesbooleanmoveCursor(String[] sa) move cursor(package private) String[]my split routinebooleanpan screenremoveEndPointFromLine(Line line, int c) remove End Point From LineremovePointsFromLine(Line line) remove End Points From Line(package private) booleansetLayerName(String[] s) set layer namebooleansetLayerOrder(String[] sa) set layer order(package private) Stringdo switch on A(package private) Stringdo switch on L(package private) Stringdo switch on M(package private) Stringdo switch on O(package private) Stringdo switch on P(package private) Stringdo switch on Zbooleanzoom minusbooleanzoom Plus
-
Field Details
-
zz
zz -
debug
static boolean debugdebug -
debugDoit
static boolean debugDoitdebugDoit -
debugDelete
static boolean debugDeletedebugDelete -
actionsReDo
-
actionsUnDo
-
dc
DotsCanvas dcdc -
board
Board boardboard -
t
Tr tt
-
-
Constructor Details
-
Interpreter
-
-
Method Details
-
log
-
addBoardLink
-
addAction
-
mySplit
-
doUndo
public void doUndo()do undo -
doRedo
public void doRedo()do redo -
doit
-
doit1
-
doSwitchAction
do switch action- Parameters:
c0- -c1- -sa- -- Returns:
- string -
- Throws:
NotFoundException- if action not found
-
switchOnA
do switch on A- Parameters:
c1- -sa- -- Returns:
- string -
- Throws:
NotFoundException- if action not found
-
switchOnL
do switch on L- Parameters:
c1- -sa- -- Returns:
- string -
- Throws:
NotFoundException- if action not found
-
switchOnM
do switch on M- Parameters:
c1- -sa- -- Returns:
- string -
- Throws:
NotFoundException- if action not found
-
switchOnO
do switch on O- Parameters:
c1- -sa- -- Returns:
- string -
- Throws:
NotFoundException- if action not found
-
switchOnP
do switch on P- Parameters:
c1- -sa- -- Returns:
- string -
- Throws:
NotFoundException- if action not found
-
switchOnZ
do switch on Z- Parameters:
c1- -sa- -- Returns:
- string -
- Throws:
NotFoundException- if action not found
-
ColourArea
-
drawOV
-
drawPC
-
drawPE
-
removeEndPointFromLine
-
removePointsFromLine
-
lineDelete
-
setLayerName
-
setLayerOrder
-
dumpsa
-
drawLS
-
drawLQ
-
drawLC
-
moveCursor
-
panScreen
-
defineArea
-
zoomMinus
-
zoomPlus
-