packages feed

eventloop 0.8.2.4 → 0.8.2.5

raw patch · 4 files changed

+10/−8 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Eventloop.Module.StatefulGraphics: type ScreenLineThickness = ScreenMetric
+ Eventloop.Module.StatefulGraphics: type ScreenLineThickness = Float
- Eventloop.Module.Websocket.Canvas: type ScreenLineThickness = ScreenMetric
+ Eventloop.Module.Websocket.Canvas: type ScreenLineThickness = Float

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.4
+version:             0.8.2.5
 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
@@ -417,7 +417,7 @@         where
           canvasText = toCanvasText text
           textFill = CT.TextFill (CT.CanvasColor screenFillColor)
-          textStroke = CT.TextStroke (round thick) (CT.CanvasColor screenStrokeColor)
+          textStroke = CT.TextStroke thick (CT.CanvasColor screenStrokeColor)
           screenStrokeColor = roundColor stroke
           screenFillColor = roundColor fill
           p' = roundPoint p
@@ -452,7 +452,7 @@             Just (screenPathParts, startingPoint) = screenPathPartsM
             screenStrokeColor = roundColor $ strokeColor shape
             thick = strokeLineThickness shape
-            pathStroke = CT.PathStroke (round thick) (CT.CanvasColor screenStrokeColor)
+            pathStroke = CT.PathStroke thick (CT.CanvasColor screenStrokeColor)
 
           
 class ToScreenPathPart a where
src/Eventloop/Module/StatefulGraphics/StatefulGraphics.hs view
@@ -16,7 +16,6 @@ import Eventloop.Types.System import Eventloop.Utility.Vectors - setupStatefulGraphicsModuleConfiguration :: EventloopSetupModuleConfiguration setupStatefulGraphicsModuleConfiguration = ( EventloopSetupModuleConfiguration                                               statefulGraphicsModuleIdentifier@@ -145,9 +144,10 @@                          -> StatefulBB                          -> (GraphicsState, GraphicsState, GraphicsState) calculateRedrawsForDrawn (toCheck, toRedraw, toRemove) new@(StatefulBB (Stateful id _ (Text {})) _)-   = calculateRedrawsForRemoved (toCheck', new:toRedraw, toRemove) new+   = calculateRedrawsForRemoved (toCheck', toRedraw', toRemove) new    where        toCheck' = fst $ removeGraphic toCheck id+       toRedraw' = fst $ addOrReplaceGraphic toRedraw new calculateRedrawsForDrawn (toCheck, toRedraw, toRemove) new     = foldl calculateRedrawsForDrawn (toCheck', toRedraw', toRemove) checkNow     where@@ -170,7 +170,7 @@                            -> StatefulBB                            -> (GraphicsState, GraphicsState, GraphicsState) calculateRedrawsForRemoved (toCheck, toRedraw, toRemove) old-    = (toCheck', toRedraw', toRemove')+    = (toCheck'', toRedraw', toRemove'')     where         id = getId old         z = getZ old@@ -191,7 +191,9 @@                  ++ aboveOverlapped                  ++ aboveContained                  ++ aboveContainedBy-        (toCheck', toRedraw', toRemove') = foldl calculateRedrawsForDrawn (toCheck, toRedraw, old:toRemove) checkNow+        toRemove' = fst $ addOrReplaceGraphic toRemove old+        toCheck' = fst $ removeGraphic toCheck id+        (toCheck'', toRedraw', toRemove'') = foldl calculateRedrawsForDrawn (toCheck', toRedraw, toRemove') checkNow   statefulIds :: GraphicsState -> [NamedId]
src/Eventloop/Module/Websocket/Canvas/Types.hs view
@@ -52,7 +52,7 @@ type ScaleX = ScaleUnit
 type ScaleY = ScaleUnit
 
-type ScreenLineThickness = ScreenMetric
+type ScreenLineThickness = Float
 
 type FontFamily = [Char]
 type FontSize = Int -- In Pixels