Gloss hides the pain of drawing simple vector graphics behind a nice data type
and a few display functions. Gloss uses OpenGL and GLUT under the hood, but you
won't have to worry about any of that. Get something cool on the screen in
under 10 minutes.
A simple animated example is:
import Graphics.Gloss
main = animateInWindow "My Window" (200, 200) (10, 10) white
$ \time -> Rotate (time * 100) $ Color red $ Line [(0, 0), (100, 100)]
"animateInWindow" first takes the name, size, position and background color of
the window. The final argument is a function from the time (in seconds) from
when the program started, to a picture. Once the window is open you can pan
around, zoom and rotate the animation using the mouse.
Pictures of more detailed examples are at:
http://trac.haskell.org/gloss/
Try it out now with:
cabal update
cabal install gloss
cabal install gloss-examples
gloss-styrene
then right-click drag to rotate the box..
Ben.
_______________________________________________
Haskell mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell