eventloop 0.8.2.1 → 0.8.2.2
raw patch · 2 files changed
+8/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
eventloop.cabal view
@@ -6,7 +6,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change -version: 0.8.2.1 +version: 0.8.2.2 synopsis: 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. description: 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. Each module exists of a initialize and teardown function that are both called once at startup and shutting down. During run-time, a module can provice a preprocessor function (which transforms input events before they get to the eventloop),
src/Eventloop/Module/BasicShapes/Classes.hs view
@@ -35,6 +35,7 @@ data GeometricPrimitive = Points [Point] | CircleArea Point Radius + deriving (Show, Eq) instance RotateLeftAround GeometricPrimitive where @@ -233,9 +234,13 @@ where upPerpVector = upPerpendicular p1 p2 downPerpVector = negateVector upPerpVector - toPrimitives (MultiLine {points=points, strokeLineThickness=thick, rotationM=Nothing}) - = (Points strokePoints_) : (concat $ map toPrimitives lines) + toPrimitives (MultiLine {points=points, strokeLineThickness=thick, strokeColor=color, rotationM=Nothing}) + | len >= 3 = (Points strokePoints_) : (concat $ map toPrimitives lines) + | len == 2 = toPrimitives (Line p1 p2 thick color Nothing) + | otherwise = error "Multilines should atleast include 2 points!" where + [p1, p2] = points + len = length points strokePoints_ = strokePoints thick points tailPoints = drop 1 points linePoints = zip points tailPoints