Safe HaskellSafe

Picture

Description

A Module for ASCII Pictures.

Synopsis

Documentation

type Height = Int Source #

The height of a picture.

type Width = Int Source #

The width of a picture.

type Picture = (Height, Width, [[Char]]) Source #

A picture consists of a list of rows.

height :: Picture -> Height Source #

Compute the height of a picture.

width :: Picture -> Width Source #

Compute the width of a picture.

pixel :: Char -> Picture Source #

A single character "pixel".

row :: String -> Picture Source #

A single line picture.

blank :: Height -> Width -> Picture Source #

A blank picture of given dimensions.

above :: Picture -> Picture -> Picture Source #

Put two pictures above each other.

stack :: [Picture] -> Picture Source #

Stack a list of pictures above each other.

beside :: Picture -> Picture -> Picture Source #

Put two pictures beside each other.

spread :: [Picture] -> Picture Source #

Spread a list of pictures beside each other.

tile :: [[Picture]] -> Picture Source #

Tile a list of lists of pictures.

showPic :: Picture -> String Source #

Turn a picture into a String.