-
Notifications
You must be signed in to change notification settings - Fork 14
Global Alpha
RyanGlScott edited this page Oct 9, 2014
·
3 revisions
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Graphics.Blank
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
send context $ do
-- draw blue rectangle
beginPath();
rect(200, 20, 100, 100);
fillStyle "blue";
fill();
-- draw transparent red circle
globalAlpha 0.5;
beginPath();
arc(320, 120, 60, 0, 2 * pi, False);
fillStyle "red";
fill();