Fix arc rendering, allowing them to rotate
This commit is contained in:
+5
-5
@@ -88,7 +88,7 @@ polygonCol = PolygonCol 0
|
||||
|
||||
color :: RGBA -> Picture -> Picture
|
||||
{-# INLINE color #-}
|
||||
color c pic = OverPic id id (const c) pic
|
||||
color c pic = OverPic id id 0 (const c) pic
|
||||
|
||||
translate3 :: Float -> Float -> Point3 -> Point3
|
||||
{-# INLINE translate3 #-}
|
||||
@@ -96,11 +96,11 @@ translate3 a b (x,y,z) = (x+a,y+b,z)
|
||||
|
||||
translate :: Float -> Float -> Picture -> Picture
|
||||
{-# INLINE translate #-}
|
||||
translate x y pic = OverPic (translate3 x y) id id pic
|
||||
translate x y pic = OverPic (translate3 x y) id 0 id pic
|
||||
|
||||
setDepth :: Float -> Picture -> Picture
|
||||
{-# INLINE setDepth #-}
|
||||
setDepth d pic = OverPic (\(x,y,_) -> (x,y,-d)) id id pic
|
||||
setDepth d pic = OverPic (\(x,y,_) -> (x,y,-d)) id 0 id pic
|
||||
|
||||
setLayer :: Int -> Picture -> Picture
|
||||
{-# INLINE setLayer #-}
|
||||
@@ -112,7 +112,7 @@ scale3 a b (x,y,z) = (x*a,y*b,z)
|
||||
|
||||
scale :: Float -> Float -> Picture -> Picture
|
||||
{-# INLINE scale #-}
|
||||
scale x y pic = OverPic (scale3 x y) ((*) x) id pic
|
||||
scale x y pic = OverPic (scale3 x y) ((*) x) 0 id pic
|
||||
|
||||
rotate3 :: Float -> Point3 -> Point3
|
||||
{-# INLINE rotate3 #-}
|
||||
@@ -121,7 +121,7 @@ rotate3 a (x,y,z) = (x',y',z)
|
||||
|
||||
rotate :: Float -> Picture -> Picture
|
||||
{-# INLINE rotate #-}
|
||||
rotate a pic = OverPic (rotate3 a) id id pic
|
||||
rotate a pic = OverPic (rotate3 a) id a id pic
|
||||
|
||||
--rotateRad a = Rotate a
|
||||
--{-# INLINE rotateRad #-}
|
||||
|
||||
Reference in New Issue
Block a user