B
This commit is contained in:
parent
e5e8880e41
commit
518da4a923
1019 changed files with 15877 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
module CircleBitmapExample where
|
||||
|
||||
import Circle
|
||||
import Bitmap
|
||||
import Control.Monad.ST
|
||||
|
||||
drawCircle :: (Color c) => Image s c -> c -> Point -> Int -> ST s (Image s c)
|
||||
drawCircle image colour center radius = do
|
||||
let pixels = map Pixel (generateCirclePoints center radius)
|
||||
forM_ pixels $ \pixel -> setPix image pixel colour
|
||||
return image
|
||||
Loading…
Add table
Add a link
Reference in a new issue