ContentsIndex
Graphics.Plot.Picture
Description
The picture data type (and friends).
Synopsis
type Picture = [Component]
data Component
= Line Path
| Polygon Path
| Circle Float Float
| Text String
| Color Color Picture
| Transform [Transform] Picture
| PolygonT FilePath Path Path
| RasterText Point String
| RasterImage Point Image
type Point = (Float, Float)
type Path = [Point]
data Color
= RGBA Float Float Float Float
| RGBA8 Int Int Int Int
data Transform
= Translate Float Float
| Rotate Float
| Scale Float Float
type Image = (Int, Int, Ptr Word8)
type Texture = (Image, TextureObject)
Documentation
type Picture = [Component]
The picture data type.
data Component
Basic picture components.
Constructors
Line PathA line along an arbitrary path.
Polygon PathA polygon filled with a solid color.
Circle Float FloatA circle with the given radius and thickness.
Text StringSome text to draw with a vector font.
Color Color PictureA picture drawn with this color.
Transform [Transform] PictureA picture transformed by this transform.
PolygonT FilePath Path PathA 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 StringSome raster text to draw as an overlay.
RasterImage Point ImageAn image to draw as an overlay. Unlike the images used as textures, the dimensions of raster images are unrestricted.
show/hide 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 FloatA color with floating point components. All components lie in the range [0..1]
RGBA8 Int Int Int IntA color with 8 bit integer components. All components lie in the range [0..255]
show/hide Instances
Eq Color
Show Color
data Transform
A 2d transformation.
Constructors
Translate Float FloatTranslation by an x-y vector.
Rotate FloatRotation around the origin, in degrees.
Scale Float FloatScaling of x and y dimensions.
show/hide 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