Skip to content
RyanGlScott edited this page Oct 9, 2014 · 4 revisions

{-# LANGUAGE OverloadedStrings #-}
module Main where

import Graphics.Blank

main :: IO ()
main = blankCanvas 3000 $ \ context -> do
    send context $ do
        beginPath();
        moveTo(170, 80);
        bezierCurveTo(130, 100, 130, 150, 230, 150);
        bezierCurveTo(250, 180, 320, 180, 340, 150);
        bezierCurveTo(420, 150, 420, 120, 390, 100);
        bezierCurveTo(430, 40, 370, 30, 340, 50);
        bezierCurveTo(320, 5, 250, 20, 250, 50);
        bezierCurveTo(200, 5, 150, 20, 170, 80);

      -- complete custom shape
        closePath();
        lineWidth 5;
        fillStyle "#8ED6FF";
        fill();
        strokeStyle "blue";
        stroke();
Clone this wiki locally