eventloop-0.4.1.2: A different take on an IO system. Based on Amanda's IO loop, this eventloop takes a function that maps input events to output events. It can easily be extended by modules that represent IO devices or join multiple modules together.

Safe HaskellNone
LanguageHaskell2010

Eventloop.Module.BasicShapes

Documentation

data Primitive Source

Constructors

Rectangle

Translation is upperleftcorner

Fields

translation :: Translation

| Translation is the corner closes to origin. Visually in canvas, this is top left. In a Cartesian coördinate system, this is bottom left.

dimensions :: Dimensions
 
fillColor :: FillColor
 
Circle

Translation is center

Fields

translation :: Translation

| Translation is the corner closes to origin. Visually in canvas, this is top left. In a Cartesian coördinate system, this is bottom left.

radius :: Radius
 
fillColor :: FillColor
 
Polygon

The first point of the polygon, always starts in the direction from the x-axis.(Towards x-infinity)

Fields

amountOfPoints :: AmountOfPoints
 
translation :: Translation

| Translation is the corner closes to origin. Visually in canvas, this is top left. In a Cartesian coördinate system, this is bottom left.

radius :: Radius
 
fillColor :: FillColor
 
Text

Translation is horizontally the center and vertically the top of the text, does not have a boundingbox due to technical limitations

Fields

text :: [Char]
 
fontFamily :: FontFamily
 
fontSize :: FontSize
 
translation :: Translation

| Translation is the corner closes to origin. Visually in canvas, this is top left. In a Cartesian coördinate system, this is bottom left.

fillColor :: FillColor
 
Line 

Fields

point1 :: Point
 
point2 :: Point
 
MultiLine 

Fields

point1 :: Point
 
point2 :: Point
 
otherPoints :: [Point]
 

data Rotation Source

Constructors

Rotation RotatePoint Angle

| Rotation is around a point on the canvas. May be the centre of the boundingbox (enclosing rectangle) or an arbitrary point. Angle is in degrees and counter-clockwise in the coördinate system(from the x-axis to the y-axis) and visually on canvas clock-wise.

data BoundingBox Source

Constructors

BoundingBox LowerLeft UpperLeft UpperRight LowerRight

| The point indications are from the perspective of a regular Cartesian coördinate system.