Safe Haskell | None |
---|
Functions for drawing lines, squares and so on pixel by pixel
- data Canvas a
- canvasWidth :: Canvas a -> Int
- canvasHeight :: Canvas a -> Int
- imageToCanvas :: Pixel a => Image a -> Either String (Canvas a)
- canvasToImage :: Pixel a => Canvas a -> Image a
- getColor :: Pixel a => Int -> Int -> Canvas a -> a
- setColor :: Pixel a => Int -> Int -> a -> Canvas a -> Canvas a
- drawLine :: Pixel a => Int -> Int -> Int -> Int -> a -> Canvas a -> Canvas a
- drawPolygon :: Pixel a => [(Int, Int)] -> a -> Canvas a -> Canvas a
- drawRectangle :: Pixel a => Int -> Int -> Int -> Int -> a -> Canvas a -> Canvas a
- drawSquare :: Pixel a => Int -> Int -> Int -> a -> Canvas a -> Canvas a
Documentation
canvasWidth :: Canvas a -> IntSource
Canvas width
canvasHeight :: Canvas a -> IntSource
Canvas height
canvasToImage :: Pixel a => Canvas a -> Image aSource
Convert Canvas to Image
drawLine :: Pixel a => Int -> Int -> Int -> Int -> a -> Canvas a -> Canvas aSource
Draw a line with specified color
drawPolygon :: Pixel a => [(Int, Int)] -> a -> Canvas a -> Canvas aSource
Draw a polygon with specified color