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:
2025-07-11 00:57:29 +01:00
parent 8e8947379a
commit d5fda8b488
4 changed files with 23 additions and 36 deletions

View File

@@ -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 _ =>