improve creation of click points, so that we can have a pixel be a perfect square, even if the canvas isn't
This commit is contained in:
@@ -18,8 +18,9 @@ struct
|
||||
, canvasHeight
|
||||
) : app_type =
|
||||
let
|
||||
val xClickPoints = ClickPoints.generate (wStart, wFinish, canvasWidth)
|
||||
val yClickPoints = ClickPoints.generate (hStart, hFinish, canvasHeight)
|
||||
val (xClickPoints, yClickPoints) =
|
||||
ClickPoints.generate
|
||||
(windowWidth, windowHeight, canvasWidth, canvasHeight)
|
||||
|
||||
val maxPoints = Int.max (canvasWidth, canvasHeight)
|
||||
val squares = Vector.tabulate (maxPoints, fn _ =>
|
||||
|
||||
Reference in New Issue
Block a user