Simplify Foreground

This commit is contained in:
2025-10-25 13:12:00 +01:00
parent 5fce0772f8
commit ff03efc41f
8 changed files with 6 additions and 21 deletions
-5
View File
@@ -136,7 +136,6 @@ putShape sh =
PutForeground $
defaultForeground
& fsPos .~ m
& fsRad .~ radBounds bnds
& fsSPic .~ noPic (uncurryV translateSHxy (- m) sh)
where
bnds = shapeBounds sh
@@ -151,9 +150,6 @@ shapeBounds = fromMaybe (0, 0, 0, 0) . boundPoints . shapePoints
midBounds :: (Float, Float, Float, Float) -> Point2
midBounds (n, s, e, w) = V2 ((n + s) / 2) ((e + w) / 2)
radBounds :: (Float, Float, Float, Float) -> Float
radBounds (n, s, e, w) = max (n - s) (e - w) / 2
girderV' ::
-- | height
Float ->
@@ -167,7 +163,6 @@ girderV' ::
girderV' h d w x y =
defaultForeground
& fsPos .~ m
& fsRad .~ dist m x
& fsSPic .~ noPic sh
where
m = midPoint x y