Implement arc rendering, works for increasing angle difference < 2pi

This commit is contained in:
jgk
2021-02-20 08:16:24 +01:00
parent 2866535b52
commit 9ff7810a2d
9 changed files with 101 additions and 104 deletions
+5 -3
View File
@@ -160,7 +160,8 @@ thickLine ps t = pictures $ f ps
thickCircle :: Float -> Float -> Picture
{-# INLINE thickCircle #-}
thickCircle rad wdth = thickLine (makeArc rad (0,2*pi)) wdth
--thickCircle rad wdth = thickLine (makeArc rad (0,2*pi)) wdth
thickCircle rad wdth = thickArc 0 (2*pi) rad wdth
arcSolid :: Float -> Float -> Float -> Picture
{-# INLINE arcSolid #-}
@@ -172,8 +173,9 @@ arc startA endA rad = thickArc startA endA rad 1
thickArc :: Float -> Float -> Float -> Float -> Picture
{-# INLINE thickArc #-}
thickArc startA endA rad wdth
= thickLine (makeArc rad (startA,endA)) wdth
thickArc = ThickArc
--thickArc startA endA rad wdth
-- = thickLine (makeArc rad (startA,endA)) wdth
withAlpha :: Float -> RGBA -> RGBA
{-# INLINE withAlpha #-}