Cleanup scope zooming

This commit is contained in:
2023-01-07 10:43:53 +00:00
parent 87ea7da1d4
commit 6b259fa200
8 changed files with 54 additions and 74 deletions
+2 -30
View File
@@ -396,7 +396,8 @@ soundPic cfig w s = fixedSizePicClampArrow 50 50 thePic p cfig (w ^. cWorld)
drawMousePosition :: Configuration -> World -> Picture
drawMousePosition cfig w =
setLayer FixedCoordLayer . winScale cfig
setLayer FixedCoordLayer
. winScale cfig
. uncurryV translate p
. scale 0.1 0.1
. text
@@ -496,32 +497,3 @@ viewClipBounds cfig w
<> g x ys
| otherwise = g x ys
g _ [] = mempty
--wallFloorsToDraw :: World -> [Wall]
--wallFloorsToDraw w = filter isVisible $ IM.elems $ wallsOnScreen w
-- where
-- onScreen wall = uncurry (lineOnScreen w) $ _wlLine wall
-- isVisible wl
-- | wl ^? wlUnshadowed == Just False = False
-- | otherwise = onScreen wl
--
--lineOnScreen :: World -> Point2 -> Point2 -> Bool
--lineOnScreen w p1 p2 = pointInPolygon p1 sp
-- || pointInPolygon p2 sp
-- || any (isJust . uncurry (intersectSegSeg p1 p2)) sps
-- where
-- sp = screenPolygon w
-- sps = zip sp (tail sp ++ [head sp])
--
--drawWallFloor :: Wall -> Picture
--drawWallFloor wl = if _wlOpacity wl == SeeThrough
-- then setDepth 0.9 . color c $ polygon [x,x +.+ n2,y+.+n2, y]
-- else blank
-- where
-- (x,y) = _wlLine wl
-- c = _wlColor wl
-- n2 = 15 *.* (vNormal . errorNormalizeVDR $ y -.- x)
--
--errorNormalizeVDR :: Point2 -> Point2
--errorNormalizeVDR (V2 0 0) = error "problem with function: errorNormalizeVDR in DodgeRendering"
--errorNormalizeVDR p = normalizeV p