WashNGo-2.12.0.1: WASH is a family of EDSLs for programming Web applications in Haskell.

Safe HaskellSafe-Infered

WASH.CGI.PPM

Documentation

data Pixmap Source

Constructors

Pixmap 

Fields

width :: Int
 
height :: Int
 
maximumColorValue :: Int
 
pixelFun :: Int -> Int -> Pixel
 

Instances

Read Pixmap 
Show Pixmap 

type Pixel = (Int, Int, Int)Source

showPixmap :: Pixmap -> [Char] -> (Pixel -> [Char]) -> [Char]Source

showAsciiPixel :: (Show a2, Show a1, Show a) => (a, a1, a2) -> [Char]Source

showBinaryPixel :: (Int, Int, Int) -> [Char]Source

readsPixmap :: [Char] -> [(Pixmap, [Char])]Source

readsPixmap1 :: ([Char] -> [(Pixel, [Char])]) -> String -> [(Pixmap, [Char])]Source

readsPixels :: (Monad m, Num a1, Num a, Ord a1, Ord a) => a1 -> a -> (t -> m (a2, t)) -> t -> m ([[a2]], t)Source

readsScanline :: (Monad m, Num a, Ord a) => a -> (t -> m (a1, t)) -> t -> m ([a1], t)Source

readsAsciiPixel :: (Read t2, Read t1, Read t) => [Char] -> [((t, t1, t2), String)]Source

readsBinaryPixel :: [Char] -> [((Int, Int, Int), [Char])]Source

create :: Int -> Int -> Int -> Pixel -> PixmapSource

oval :: Pixmap -> (Int, Int) -> (Int, Int) -> Pixel -> Bool -> PixmapSource

line :: Pixmap -> (Int, Int) -> (Int, Int) -> Pixel -> PixmapSource

rectangle :: Pixmap -> (Int, Int) -> (Int, Int) -> Pixel -> Bool -> PixmapSource

line1 :: Pixmap -> (Int, Int) -> (Int, Int) -> Pixel -> PixmapSource

line2 :: Pixmap -> (Int, Int) -> (Int, Int) -> Pixel -> PixmapSource

point :: Pixmap -> (Int, Int) -> Pixel -> PixmapSource

comp :: Pixmap -> Pixmap -> (Int, Int) -> Pixel -> PixmapSource

pixelAt :: Pixmap -> Int -> Int -> PixelSource

type Color = (Int, Int, Int)Source

data Picture Source

Constructors

Circle Bool 
Square Bool 
Line 
Colored Color Picture 
Translate (Double, Double) Picture 
Rotate Double Picture 
Scale (Double, Double) Picture 
Invert Picture 
And [Picture] 
Or [Picture] 

render :: Picture -> Int -> Int -> Color -> PixmapSource

renderPix :: Picture -> Color -> Double -> Double -> Double -> Maybe ColorSource