Cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user