From c90a4b69774081b50f15f26312ff68810af5783d Mon Sep 17 00:00:00 2001 From: David Johnson Date: Mon, 11 Nov 2019 00:52:34 -0500 Subject: [PATCH] Initial commit of graphics examples. --- src/ArrayFire/Graphics.hs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ArrayFire/Graphics.hs b/src/ArrayFire/Graphics.hs index 35b71ae..a508833 100644 --- a/src/ArrayFire/Graphics.hs +++ b/src/ArrayFire/Graphics.hs @@ -103,8 +103,17 @@ setSize w (fromIntegral -> x) (fromIntegral -> y) = -- -- [ArrayFire Docs](http://arrayfire.org/docs/group__gfx__func__draw.htm) -- --- >>> drawImage window ('constant' \@'Int' 1) ('Cell' 10 10 "test" 'ColorMapSpectrum') --- +-- @ +-- main :: IO () +-- main = render =<< createWindow 800 600 "hey" +-- where +-- render window = do +-- let x = iota [1,60] [60,1] / (30 :: Array Float) +-- cell = Cell (-1) (-1) "" ColorMapDefault +-- drawImage window x cell +-- closed <- isWindowClosed window +-- unless closed (render window ) +-- @ drawImage :: Window -- ^ 'Window' handle