gloss- Painless 2D vector graphics, animations and simulations.



Data types for representing pictures.



type Point = (Float, Float)Source

A point on the x-y plane.

type Vector = PointSource

A vector can be treated as a point, and vis-versa.

type Path = [Point]Source

A path through the x-y plane.

data Picture Source

A 2D picture.



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 Circle.

Text String

Some text to draw with a vector font.

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.