Data types for representing pictures.

- type Point = (Float, Float)
- type Vector = Point
- type Path = [Point]
- data Picture
- blank :: Picture
- polygon :: Path -> Picture
- line :: Path -> Picture
- circle :: Float -> Picture
- thickCircle :: Float -> Float -> Picture
- text :: String -> Picture
- bitmap :: Int -> Int -> ByteString -> Picture
- color :: Color -> Picture -> Picture
- translate :: Float -> Float -> Picture -> Picture
- rotate :: Float -> Picture -> Picture
- scale :: Float -> Float -> Picture -> Picture
- pictures :: [Picture] -> Picture
- loadBMP :: FilePath -> IO Picture
- lineLoop :: Path -> Picture
- circleSolid :: Float -> Picture
- rectanglePath :: Float -> Float -> Path
- rectangleWire :: Float -> Float -> Picture
- rectangleSolid :: Float -> Float -> Picture
- rectangleUpperPath :: Float -> Float -> Path
- rectangleUpperWire :: Float -> Float -> Picture
- rectangleUpperSolid :: Float -> Float -> Picture

# Documentation

type Point = (Float, Float)Source

A point on the x-y plane.
Points can also be treated as `Vector`

s, so Graphics.Gloss.Data.Vector may also be useful.

A 2D picture

Blank | A blank picture, with nothing in it. |

Polygon Path | A polygon filled with a solid color. |

Line Path | A line along an arbitrary path. |

Circle Float | A circle with the given radius. |

ThickCircle Float Float | A circle with the given thickness and radius. If the thickness is 0 then this is equivalent to |

Text String | Some text to draw with a vector font. |

Bitmap Int Int ByteString | A bitmap image with a width, height and a ByteString holding the 32 bit RGBA bitmap data. |

Color Color Picture | A picture drawn with this color. |

Translate Float Float Picture | A picture translated by the given x and y coordinates. |

Rotate Float Picture | A picture rotated by the given angle (in degrees). |

Scale Float Float Picture | A picture scaled by the given x and y factors. |

Pictures [Picture] | A picture consisting of several others. |

# Aliases for Picture constructors

thickCircle :: Float -> Float -> PictureSource

# Miscellaneous

loadBMP :: FilePath -> IO PictureSource

An IO action that loads a BMP format file from the given path, and produces a picture. TODO: Use Codec.BMP library instead.

circleSolid :: Float -> PictureSource

A solid circle with the given radius.

# Rectangles

rectanglePath :: Float -> Float -> PathSource

A path representing a rectangle centered about the origin, with the given width and height.

rectangleWire :: Float -> Float -> PictureSource

A wireframe rectangle centered about the origin, with the given width and height.

rectangleSolid :: Float -> Float -> PictureSource

A solid rectangle centered about the origin, with the given width and height.

rectangleUpperPath :: Float -> Float -> PathSource

A path representing a rectangle in the y > 0 half of the x-y plane, with the given width and height

rectangleUpperWire :: Float -> Float -> PictureSource

A wireframe rectangle in the y > 0 half of the x-y plane, with the given width and height.

rectangleUpperSolid :: Float -> Float -> PictureSource

A solid rectangle in the y > 0 half of the x-y plane, with the given width and height.