diff --git a/examples/example01.hs b/examples/example01.hs index 80fb49e..4aba6f3 100644 --- a/examples/example01.hs +++ b/examples/example01.hs @@ -125,7 +125,7 @@ draw = do format <- liftIO $ (B.babl_format $ B.PixelFormat B.RGBA B.CFu8) SDL.V2 (CInt rw) (CInt rh) <- SDL.surfaceDimensions drawSurface let (w, h) = (fromIntegral rw, fromIntegral rh) - drawRect foreground (G.RGB 1 0 0) (Line 2) (G.GeglRectangle 5 5 200 200) + liftIO $ drawRect foreground (G.RGB 1 0 0) (Line 2) (G.GeglRectangle 10 10 500 500) liftIO $ G.gegl_node_blit (nodeGraph M.! "over" :: G.GeglNode) 1 diff --git a/src/Affection/Draw.hs b/src/Affection/Draw.hs index 91d95b1..6e1c4e4 100644 --- a/src/Affection/Draw.hs +++ b/src/Affection/Draw.hs @@ -19,9 +19,9 @@ drawRect -> G.Color -- ^ Color to draw in -> DrawType -- ^ Draw type -> GeglRectangle -- ^ Dimensions of Rectangle - -> Affection a () + -> IO () drawRect buf color dt rect@G.GeglRectangle{..} = - liftIO $ G.iterateOver buf rect (B.PixelFormat B.RGBA B.CFdouble) G.GeglAccessReadWrite G.GeglAbyssNone $ + G.iterateOver buf rect (B.PixelFormat B.RGBA B.CFdouble) G.GeglAccessReadWrite G.GeglAbyssNone $ (\(G.Pixel px py pc) -> case dt of Fill ->