eventloop-0.8.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

Synopsis

Documentation

data Shape Source

Constructors

CompositeShape

Should contain atleast 1 shape. Rotation before Position

Rectangle

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

Circle

| Position is center

RegularPolygon

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

Text 
Line 
MultiLine 

Fields

points :: [Point]

| Can contain any number of points

strokeLineThickness :: StrokeLineThickness
 
strokeColor :: StrokeColor
 
rotationM :: Maybe Rotation
 
Polygon 

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.

data Alignment Source

Opcode: 1500

Constructors

AlignLeft

Opcode: 1501

AlignRight

Opcode: 1502

AlignCenter

Opcode: 1503

class ToBoundingBox a => Overlaps a where Source

Minimal complete definition

Nothing

Methods

overlaps :: Overlaps b => a -> b -> Bool Source

contains :: Overlaps b => a -> b -> Bool Source

touches :: Overlaps b => a -> b -> Bool Source