remove some dead code
This commit is contained in:
@@ -2,14 +2,6 @@ structure AppWith =
|
||||
struct
|
||||
open AppType
|
||||
|
||||
fun updateSquares (squares, newX, newY, item) =
|
||||
let
|
||||
val yAxis = Vector.sub (squares, newX)
|
||||
val yAxis = Vector.update (yAxis, newY, item)
|
||||
in
|
||||
Vector.update (squares, newX, yAxis)
|
||||
end
|
||||
|
||||
fun changeSquaresSize (squares, newCanvasWidth, newCanvasHeight) =
|
||||
let
|
||||
val maxPoints = Int.max (newCanvasWidth, newCanvasHeight)
|
||||
@@ -27,124 +19,6 @@ struct
|
||||
Vector.tabulate (maxPoints, fn _ => {r = 0, g = 0, b = 0, a = 0}))
|
||||
end
|
||||
|
||||
fun addSquare (app, newX, newY, arrowX, arrowY) : app_type =
|
||||
let
|
||||
val
|
||||
{ mode
|
||||
, squares
|
||||
, arrowX = _
|
||||
, arrowY = _
|
||||
, canvasWidth
|
||||
, canvasHeight
|
||||
, windowWidth
|
||||
, windowHeight
|
||||
, xClickPoints
|
||||
, yClickPoints
|
||||
|
||||
, showGraph
|
||||
, mouseX
|
||||
, mouseY
|
||||
, openFilePath
|
||||
, fileBrowser
|
||||
, fileBrowserIdx
|
||||
, r
|
||||
, g
|
||||
, b
|
||||
, a
|
||||
, layer
|
||||
, layerTree
|
||||
, modalNum
|
||||
} = app
|
||||
|
||||
val item = {r = r, g = g, b = b, a = a}
|
||||
val squares = updateSquares (squares, newX, newY, item)
|
||||
in
|
||||
{ mode = mode
|
||||
, squares = squares
|
||||
, arrowX = arrowX
|
||||
, arrowY = arrowY
|
||||
, canvasWidth = canvasWidth
|
||||
, canvasHeight = canvasHeight
|
||||
, windowWidth = windowWidth
|
||||
, windowHeight = windowHeight
|
||||
, xClickPoints = xClickPoints
|
||||
, yClickPoints = yClickPoints
|
||||
|
||||
, showGraph = showGraph
|
||||
, mouseX = mouseX
|
||||
, mouseY = mouseY
|
||||
, openFilePath = openFilePath
|
||||
, fileBrowser = fileBrowser
|
||||
, fileBrowserIdx = fileBrowserIdx
|
||||
, r = r
|
||||
, g = g
|
||||
, b = b
|
||||
, a = a
|
||||
, layer = layer
|
||||
, layerTree = layerTree
|
||||
, modalNum = modalNum
|
||||
}
|
||||
end
|
||||
|
||||
fun deleteSquare (app, deleteX, deleteY, arrowX, arrowY) =
|
||||
let
|
||||
val
|
||||
{ mode
|
||||
, squares
|
||||
, arrowX = _
|
||||
, arrowY = _
|
||||
, canvasWidth
|
||||
, canvasHeight
|
||||
, windowWidth
|
||||
, windowHeight
|
||||
, xClickPoints
|
||||
, yClickPoints
|
||||
|
||||
, showGraph
|
||||
, mouseX
|
||||
, mouseY
|
||||
, openFilePath
|
||||
, fileBrowser
|
||||
, fileBrowserIdx
|
||||
, r
|
||||
, g
|
||||
, b
|
||||
, a
|
||||
, layer
|
||||
, layerTree
|
||||
, modalNum
|
||||
} = app
|
||||
|
||||
val item = {r = 0, g = 0, b = 0, a = 0}
|
||||
val squares = updateSquares (squares, deleteX, deleteY, item)
|
||||
in
|
||||
{ mode = mode
|
||||
, squares = squares
|
||||
, arrowX = arrowX
|
||||
, arrowY = arrowY
|
||||
, canvasWidth = canvasWidth
|
||||
, canvasHeight = canvasHeight
|
||||
, windowWidth = windowWidth
|
||||
, windowHeight = windowHeight
|
||||
, xClickPoints = xClickPoints
|
||||
, yClickPoints = yClickPoints
|
||||
|
||||
, showGraph = showGraph
|
||||
, mouseX = mouseX
|
||||
, mouseY = mouseY
|
||||
, openFilePath = openFilePath
|
||||
, fileBrowser = fileBrowser
|
||||
, fileBrowserIdx = fileBrowserIdx
|
||||
, r = r
|
||||
, g = g
|
||||
, b = b
|
||||
, a = a
|
||||
, layer = layer
|
||||
, layerTree = layerTree
|
||||
, modalNum = modalNum
|
||||
}
|
||||
end
|
||||
|
||||
fun squares (app, newSquares) =
|
||||
let
|
||||
val
|
||||
|
||||
Reference in New Issue
Block a user