+gfxHandler' IS {..} (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
+
+-- | Sets the source to a pattern fill of the given color
+setSourceColor :: Color -> Cairo.Render ()
+setSourceColor (Color r g b) =
+ Cairo.setSourceRGB r g b