This commit is contained in:
2025-08-26 18:51:14 +01:00
parent b87c3380b8
commit 1ebdbdd8ae
34 changed files with 210 additions and 246 deletions
+2 -2
View File
@@ -9,10 +9,10 @@ import Picture.Base
fromTopLeft :: Point2 -> ScreenPos
fromTopLeft (V2 x y) = ScreenPos (V2 (-0.5) 0.5) (V2 x (- y))
translateScreenPos :: Configuration -> ScreenPos -> Picture -> Picture
translateScreenPos :: Config -> ScreenPos -> Picture -> Picture
translateScreenPos cfig = uncurryV translate . screenPosAbs cfig
screenPosAbs :: Configuration -> ScreenPos -> Point2
screenPosAbs :: Config -> ScreenPos -> Point2
screenPosAbs cfig sp = sp ^. spScreenOff * V2 w h + sp ^. spPixelOff
where
w = fromIntegral $ cfig ^. windowX