allow width and height to have a different number of click points
This commit is contained in:
@@ -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\
|
||||
|
||||
Reference in New Issue
Block a user