-}
winHandler _ _ = Nothing
-gfxHandler s req = case gfxHandler' s req of
+gfxHandler s req = case gfxHandler' req of
Nothing -> Nothing
Just render -> Just $ do
buf <- readIORef (buffer s)
gfxHandler IS {..} (GfxFont st sz) = Just $ buffer `set` [ fontSize := sz, fontFace := st ]
gfxHandler IS {..} (GfxPicture fd pt) = Just $ bitmapCreateFromFile fd >>= \bm -> drawBitmap buffer bm pt False [] >> bitmapGetSize bm >>= dirtyRect' sPanel pt
-}
-gfxHandler' IS {..} (GfxText col (Point x y) st) = Just $ do
+gfxHandler' (GfxText col (Point x y) st) = Just $ do
setSourceColor col
Cairo.moveTo (fromIntegral x) (fromIntegral y)
Cairo.showText st
-gfxHandler' IS {..} GfxClear = Just $ Cairo.setSourceRGB 1 1 1 >> Cairo.paint
-gfxHandler' _ _ = Nothing
+gfxHandler' GfxClear = Just $ do
+ Cairo.setSourceRGB 1 1 1
+ Cairo.paint
+gfxHandler' _ = Nothing
-- | Sets the source to a pattern fill of the given color
setSourceColor :: Color -> Cairo.Render ()