Improve cursor rendering

This commit is contained in:
2021-03-08 00:25:57 +01:00
parent c9ae76594b
commit 79b6a4fc32
4 changed files with 23 additions and 53 deletions
+5 -20
View File
@@ -11,6 +11,7 @@ module Picture
, circleSolid
, circle
, line
, lineCol
, text
, pictures
, translate
@@ -58,16 +59,6 @@ import Control.Lens
black :: RGBA
black = (0,0,0,1)
--polygonD :: Float -> [Point2] -> Picture
--{-# INLINE polygonD #-}
--polygonD d (a:b:c:ps) = blank
-- { _scPosTri = mapVC (\(x,y) -> (x,y,d)) tris
-- , _scColTri = mapVC (const black) tris
-- }
-- where twoPs = zip (b:c:ps) (c:ps)
-- tris = toVC $ concatMap (\(x,y)-> [a,x,y]) twoPs
--polygonD _ _ = blank
polygon :: [Point2] -> Picture
{-# INLINE polygon #-}
polygon = Polygon 0
@@ -76,16 +67,6 @@ polygonCol :: [(Point2,RGBA)] -> Picture
{-# INLINE polygonCol #-}
polygonCol = PolygonCol 0
--polygon :: [Point2] -> Picture
--{-# INLINE polygon #-}
--polygon (a:b:c:ps) = NLeaf $ emptyScene
-- { _scPosTri = fmap zeroZ tris
-- , _scColTri = fmap (const black) tris
-- }
-- where twoPs = zip (b:c:ps) (c:ps)
-- tris = toVC $ concatMap (\(x,y)-> [a,x,y]) twoPs
--polygon _ = blank
color :: RGBA -> Picture -> Picture
{-# INLINE color #-}
color c pic = OverPic id id 0 (const c) pic
@@ -154,6 +135,10 @@ line :: [Point2] -> Picture
{-# INLINE line #-}
line = Line 0
lineCol :: [(Point2,RGBA)] -> Picture
{-# INLINE lineCol #-}
lineCol = LineCol 0
thickLine :: [Point2] -> Float -> Picture
{-# INLINE thickLine #-}
thickLine ps t = pictures $ f ps