add functionality to draw in different colours

This commit is contained in:
2025-07-11 16:39:39 +01:00
parent 040fc67c80
commit 7028391298
5 changed files with 35 additions and 29 deletions

View File

@@ -24,7 +24,7 @@ struct
val maxPoints = Int.max (canvasWidth, canvasHeight)
val squares = Vector.tabulate (maxPoints, fn _ =>
Vector.tabulate (maxPoints, fn _ => 0))
Vector.tabulate (maxPoints, fn _ => {r = 0, g = 0, b = 0, a = 0}))
in
{ mode = AppType.NORMAL_MODE
, squares = squares
@@ -43,10 +43,10 @@ struct
, openFilePath = ""
, fileBrowser = Vector.fromList []
, fileBrowserIdx = 0
, r = 0.0
, g = 0.0
, b = 0.0
, a = 1.0
, r = 0
, g = 0
, b = 0
, a = 1
, modalNum = 0
}
end