unlift drawing
This commit is contained in:
parent
4e20d26c97
commit
4cc55e32e7
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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 ->
|
||||
|
|
Loading…
Reference in a new issue