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

Synopsis

Documentation

onNode :: [Node] -> Pos -> Maybe Node Source

Checkes to see if there is a node on a certain position

graphsPreProcessor :: PreProcessor Source

Abstracts the standardized EventTypes to GraphsIn

graphsPostProcessor :: PostProcessor Source

Abstracts GraphsOut back to BasicShapes and Canvas events

colorToRGBAColor :: Color -> Color Source

Translates color datatype to RGBA codes

thicknessToFloat :: Thickness -> StrokeLineThickness Source

Translates the thickness to a float

posOnVector :: Float -> Vector -> Pos -> Pos Source

Returns the point when making a step f long from the point start in the direction of the vector. The length between start pos and result pos is always f.

vectorize :: Pos -> Pos -> Vector Source

Vector from p1 to p2

downPerpendicularTo :: Pos -> Pos -> Vector Source

Returns the vector perpendicular on the given vector between the 2 points. Always has positive y and vector length 1; y is inverted in canvas

upPerpendicularTo :: Pos -> Pos -> Vector Source

Returns the vector perpendicular on the given vector between the 2 points. Always has negative y and vector length 1; y is inverted in canvas

vectorSize :: Vector -> Float Source

Returns the size of the vector

type Pos = (Float, Float) Source

data Graph Source

Constructors

Graph 

Fields

nodes :: [Node]
 
edges :: [Edge]
 
directed :: Directed
 
weighted :: Weighted