Skip to content
Andy Gill edited this page Dec 6, 2019 · 9 revisions

{-# LANGUAGE OverloadedStrings #-}
module Main where

import           Graphics.Blank
import qualified Graphics.Blank.Style as Style

main :: IO ()
main = blankCanvas 3000 $ \ context -> do
    url <- staticURL context "type/jpeg" "images/haskell.jpg"
    send context $ do
        imageObj <- newImage url
        pattern <- createPattern (imageObj,"repeat")
        rect(0, 0, width context, height context);
        Style.fillStyle pattern;
        fill();
Clone this wiki locally