-
Notifications
You must be signed in to change notification settings - Fork 14
Rotate Transform
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
let rectWidth = 150;
let rectHeight = 75;
translate(width context / 2, height context / 2);
rotate (pi/4);
fillStyle "blue";
fillRect(rectWidth / (-2), rectHeight / (-2), rectWidth, rectHeight);