Skip to content
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();
Clone this wiki locally