Refactor arc drawing
This commit is contained in:
+9
-1
@@ -225,7 +225,15 @@ arc startA endA rad = thickArc startA endA rad 1
|
||||
|
||||
thickArc :: Float -> Float -> Float -> Float -> Picture
|
||||
{-# INLINE thickArc #-}
|
||||
thickArc = ThickArc 0
|
||||
thickArc startA endA rad wdth
|
||||
| endA - startA > pi = pictures
|
||||
[ thickArc (startA + pi) endA rad wdth
|
||||
, ThickArc 0 startA (startA + pi) r w
|
||||
]
|
||||
| otherwise = ThickArc 0 startA endA r w
|
||||
where
|
||||
r = rad + 0.5 * wdth
|
||||
w = 1 - wdth / r
|
||||
|
||||
withAlpha :: Float -> RGBA -> RGBA
|
||||
{-# INLINE withAlpha #-}
|
||||
|
||||
Reference in New Issue
Block a user