-
Notifications
You must be signed in to change notification settings - Fork 14
Linear Gradient
Andy Gill edited this page Mar 10, 2015
·
6 revisions
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Graphics.Blank
import qualified Graphics.Blank.Style as Style
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
rect(0, 0, width context, height context)
grd <- createLinearGradient(0, 0, width context, height context)
-- light blue
grd # addColorStop(0, "#8ED6FF")
-- dark blue
grd # addColorStop(1, "#004CB3")
Style.fillStyle grd;
fill();