diff --git a/src/Affection/Draw.hs b/src/Affection/Draw.hs index 1b1c84a..b1d5091 100644 --- a/src/Affection/Draw.hs +++ b/src/Affection/Draw.hs @@ -3,6 +3,8 @@ -- | Module for drawing primitives module Affection.Draw ( drawRect + -- , clear + , clearArea ) where import Affection.Types (DrawType(..), Affection, GeglRectangle(..), liftIO) @@ -77,3 +79,16 @@ unsafeColorize col = , G.CVdouble $ CDouble $ b , G.CVdouble $ CDouble $ a ) + +-- -- | Clear all data from a buffer +-- clear +-- :: G.GeglBuffer -- ^ Target buffer +-- -> IO () +-- clear buf = clearArea buf =<< G.gegl_rectangle_infinite_plane + +-- | Clear a specified area of a buffer from all data +clearArea + :: G.GeglBuffer -- ^ Target buffer + -> G.GeglRectangle -- ^ Area to clear + -> IO () +clearArea = G.gegl_buffer_clear