|
|
|
|
|
Description |
The picture data type (and friends).
|
|
Synopsis |
|
|
|
Documentation |
|
type Picture = [Component] |
The picture data type.
|
|
data Component |
Basic picture components.
| Constructors | Line Path | A line along an arbitrary path.
| Polygon Path | A polygon filled with a solid color.
| Circle Float Float | A circle with the given radius and thickness.
| Text String | Some text to draw with a vector font.
| Color Color Picture | A picture drawn with this color.
| Transform [Transform] Picture | A picture transformed by this transform.
| PolygonT FilePath Path Path | A polygon textured with the image of this file name.
The first path is the boundary of the polygon.
The second path contains the texture coordinates to use.
Boundardy and texture coorinates are matched one-to-one.
Both the x and y dimensions of an image used as a texture
must be integral powers of 2, eg 64, 128, 256, 512 ...
| RasterText Point String | Some raster text to draw as an overlay.
| RasterImage Point Image | An image to draw as an overlay. Unlike the images used as textures,
the dimensions of raster images are unrestricted.
|
| Instances | |
|
|
type Point = (Float, Float) |
A point on the x-y plane.
|
|
type Path = [Point] |
A path through the x-y plane.
|
|
data Color |
An RGBA color.
| Constructors | RGBA Float Float Float Float | A color with floating point components.
All components lie in the range [0..1]
| RGBA8 Int Int Int Int | A color with 8 bit integer components.
All components lie in the range [0..255]
|
| Instances | |
|
|
data Transform |
A 2d transformation.
| Constructors | Translate Float Float | Translation by an x-y vector.
| Rotate Float | Rotation around the origin, in degrees.
| Scale Float Float | Scaling of x and y dimensions.
|
| Instances | |
|
|
type Image = (Int, Int, Ptr Word8) |
Internal representation of an image.
(width, height, image data in uncompressed 32bit RGBA format).
|
|
type Texture = (Image, TextureObject) |
Internal representation of a texture.
(image holding this texture, OpenGL texture object/handle).
|
|
Produced by Haddock version 0.7 |