allow width and height to have a different number of click points

This commit is contained in:
2025-02-18 11:53:28 +00:00
parent 68cbf59f04
commit 78905b59f0
9 changed files with 129 additions and 75 deletions

View File

@@ -65,19 +65,31 @@ struct
[ x1
, ",\n"
, y1
, ", r, g, b,\n"
, ",\n"
, r
, ",\n"
, g
, ",\n"
, b
, ",\n"
, x2
, ",\n"
, y2
, ", r, g, b,\n"
, ",\n"
, r
, ",\n"
, g
, ",\n"
, b
, ",\n"
, x3
, ",\n"
, y3
, ", \n"
, ",\n"
, r
, ", "
, ",\n"
, g
, ", "
, ",\n"
, b
, case tl of
[] => "\n"
@@ -99,10 +111,8 @@ struct
val _ = TextIO.output (io, fileStartString)
val functionStartString =
" fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight, r, g, b) : Real32.real vector =\n\
" fun lerp (startX, startY, drawWidth, drawHeight, windowWidth, windowHeight) : Real32.real vector =\n\
\ let\n\
\ val startX = Real32.fromInt startX\n\
\ val startY = Real32.fromInt startY\n\
\ val endY = windowHeight - startY\n\
\ val startY = windowHeight - (startY + drawHeight)\n\
\ val endX = startX + drawWidth\n\