[Haskell] ANNOUNCE: blank-canvas

Andrew Gill andygill at ku.edu
Sat Jun 21 14:44:24 UTC 2014


Announcing blank-canvas 0.4.0, a Haskell binding to the complete HTML5 Canvas API. 
blank-canvas allows Haskell users to write, in Haskell, interactive images onto their web
browsers, via a specialized JavaScript DSL. 

First Example:

{-# LANGUAGE OverloadedStrings #-}
module Main where

import Graphics.Blank -- import the blank canvas

main = blankCanvas 3000 $ \ context -> do -- start blank canvas on port 3000
        send context $ do -- send commands to this specific context
                moveTo(50,50)
                lineTo(200,100)
                lineWidth 10
                strokeStyle "red"
                stroke() -- this draws the ink into the canvas


There are around 50 examples on the blank-canvas wiki:

	https://github.com/ku-fpg/blank-canvas/wiki

Enjoy!

FPG at KU

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell/attachments/20140621/6a2da5de/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Red_Line.png
Type: image/png
Size: 6650 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell/attachments/20140621/6a2da5de/attachment.png>


More information about the Haskell mailing list