2024-08-08 01:37:46 +01:00
|
|
|
signature GRAPH_LINES =
|
|
|
|
|
sig
|
2024-08-13 23:49:34 +01:00
|
|
|
val generate: AppType.app_type -> Real32.real vector
|
2024-08-08 01:37:46 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
structure GraphLines :> GRAPH_LINES =
|
2024-08-08 00:18:03 +01:00
|
|
|
struct
|
2024-09-21 13:23:25 +01:00
|
|
|
fun generate (app: AppType.app_type) =
|
2024-08-13 23:49:34 +01:00
|
|
|
let
|
|
|
|
|
val {windowWidth, windowHeight, xClickPoints, yClickPoints, ...} = app
|
|
|
|
|
in
|
2024-09-21 13:23:25 +01:00
|
|
|
Vector.concat (List.tabulate (Vector.length xClickPoints, fn xIdx =>
|
|
|
|
|
let
|
|
|
|
|
val xpos = Vector.sub (xClickPoints, xIdx)
|
|
|
|
|
in
|
|
|
|
|
Vector.concat (List.tabulate (Vector.length yClickPoints, fn yIdx =>
|
|
|
|
|
ClickPoints.getDrawDot
|
|
|
|
|
(xpos, Vector.sub (yClickPoints, yIdx), windowWidth, windowHeight)))
|
|
|
|
|
end))
|
2024-08-13 23:49:34 +01:00
|
|
|
end
|
2024-08-08 00:18:03 +01:00
|
|
|
end
|