Start to generalise text input to "terminal signal" input

This commit is contained in:
2023-03-26 13:57:26 +01:00
parent cfb0a49059
commit 082ce9c9a1
39 changed files with 171 additions and 165 deletions
+6 -6
View File
@@ -13,7 +13,7 @@ import Picture
--fixedSizePicAt ::
-- Picture ->
-- Point2 ->
-- CamPos ->
-- Camera ->
-- Picture
--fixedSizePicAt pic p w =
-- setLayer DebugLayer
@@ -35,7 +35,7 @@ import Picture
-- Picture ->
-- Point2 ->
-- Configuration ->
-- CamPos ->
-- Camera ->
-- Picture
--fixedSizePicClamp xbord ybord pic p cfig w =
-- setLayer DebugLayer
@@ -70,16 +70,16 @@ fixedSizePicClampArrow xbord ybord pic p cfig w =
, setLayer DebugLayer . color white . setDepth 20 $ arrowPic
]
where
winps = screenPolygon cfig (w ^. cwCamPos)
bords = screenPolygonBord xbord ybord cfig (w ^. cwCamPos)
winps = screenPolygon cfig (w ^. cwCam)
bords = screenPolygonBord xbord ybord cfig (w ^. cwCam)
borderPoint = intersectSegPolyFirst campos p bords
windowPoint = intersectSegPolyFirst campos p winps
arrowPic = case borderPoint of
Nothing -> blank
Just bp -> thickLine 5 [bp, fromMaybe p windowPoint]
(V2 x y) = fromMaybe p borderPoint
campos = w ^. cwCamPos . camCenter
theScale = 1 / (w ^. cwCamPos . camZoom)
campos = w ^. cwCam . camCenter
theScale = 1 / (w ^. cwCam . camZoom)
--absClamp ::
-- -- | clamping value, assumed positive