Skip to content
Andy Gill edited this page Mar 10, 2015 · 5 revisions

{-# LANGUAGE OverloadedStrings #-}
module Main where

import qualified Data.Vector.Unboxed as V
import           Graphics.Blank

main :: IO ()
main = blankCanvas 3000 $ \ context -> do
    let v = V.fromList
          $ concat
          $ [ [r,g,0,255]
            | r <- [0..255]
            , g <- [0..255]
            ]

    send context $ do
        putImageData (ImageData 256 256 v, [22,22])
Clone this wiki locally