diff --git a/dotscape b/dotscape index 30b6863..56c02f8 100755 Binary files a/dotscape and b/dotscape differ diff --git a/fcore/app-with.sml b/fcore/app-with.sml index f749b20..7780220 100644 --- a/fcore/app-with.sml +++ b/fcore/app-with.sml @@ -1007,8 +1007,8 @@ struct { mode , mouseX , mouseY - , xClickPoints - , yClickPoints + , xClickPoints = _ + , yClickPoints = _ , windowWidth , windowHeight , arrowX @@ -1033,6 +1033,9 @@ struct if canvasWidth = 0 then 0 else Int.min (canvasWidth - 1, arrowX) val arrowY = if canvasHeight = 0 then 0 else Int.min (canvasHeight - 1, arrowY) + val (xClickPoints, yClickPoints) = + ClickPoints.generate + (windowWidth, windowHeight, canvasWidth, canvasHeight) in { mode = mode , mouseX = mouseX diff --git a/fcore/normal-mode.sml b/fcore/normal-mode.sml index 402fef5..2f7076f 100644 --- a/fcore/normal-mode.sml +++ b/fcore/normal-mode.sml @@ -134,7 +134,7 @@ struct fun realToInt x = Real32.toInt IEEEReal.TO_NEAREST x - fun getDrawMessage (model: app_type) = + fun getDrawMessage (model: app_type, initialMsg) = let val { canvasWidth @@ -165,8 +165,9 @@ struct , yClickPoints ) val drawMsg = DRAW_SQUARES_AND_DOTS {squares = squares, dots = dotVec} + val drawMsg = DRAW (drawMsg) :: initialMsg in - (model, [DRAW drawMsg]) + (model, drawMsg) end fun changePixel (model: app_type, hIdx, vIdx, pixel) = @@ -179,7 +180,7 @@ struct (layer, hIdx, vIdx, maxSide, pixel, layerTree) val model = AppWith.layerTree (model, layerTree, hIdx, vIdx) in - getDrawMessage model + getDrawMessage (model, []) end fun addPixel (model: app_type, hIdx, vIdx) = @@ -338,8 +339,14 @@ struct let val model = AppWith.parsedLayerTree (model, layerTree, canvasWidth, canvasHeight) + + val graphLines = + if #showGraph model then GraphLines.generate model + else Vector.fromList [] + val initialMsg = DRAW_GRAPH graphLines + val initialMsg = [DRAW initialMsg] in - getDrawMessage model + getDrawMessage (model, initialMsg) end fun enterBrowseMode model = diff --git a/green.dsc b/green.dsc new file mode 100644 index 0000000..d71b39b --- /dev/null +++ b/green.dsc @@ -0,0 +1,3 @@ +24 3 { +[ {0 1 0 1 0 0 0 1 } {1 0 22 0 0 0 0 1 } {1 1 22 1 239 239 239 1 } {1 2 22 2 0 0 0 1 } {23 1 23 1 0 0 0 1 } ] +}