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
Modifier and TypeFieldDescriptionactionsReDoactionsUnDo(package private) Board
board(package private) DotsCanvas
dc(package private) static boolean
debug(package private) static boolean
debugDelete(package private) static boolean
debugDoit(package private) Tr
t(package private) static String
zz -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add actionvoid
addBoardLink
(Board board) add board(package private) boolean
ColourArea
(String[] sa) colour areavoid
defineArea
(String[] sa) define area called by 'A id fx fy colourdo it(package private) String
do it 1void
doRedo()
do redodoSwitchAction
(char c0, char c1, String[] sa) do switch actionvoid
doUndo()
do undoset up line Cubicboolean
draw LQset up straight lineprivate String
draw Ovalset up control pointset up end pointvoid
dump salineDelete
(String s) line delete(package private) void
logging link to Log.mesboolean
moveCursor
(String[] sa) move cursor(package private) String[]
my split routineboolean
pan screenremoveEndPointFromLine
(Line line, int c) remove End Point From LineremovePointsFromLine
(Line line) remove End Points From Line(package private) boolean
setLayerName
(String[] s) set layer nameboolean
setLayerOrder
(String[] sa) set layer order(package private) String
do switch on A(package private) String
do switch on L(package private) String
do switch on M(package private) String
do switch on O(package private) String
do switch on P(package private) String
do switch on Zboolean
zoom minusboolean
zoom 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
-