Start to generalise text input to "terminal signal" input
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user