Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
551 views
in Technique[技术] by (71.8m points)

graphics - Haskell library for 2D drawing


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Instead of picking individual libraries, I'll have a go at a quick overview at all of them, as listed in the Graphics section on Hackage.

Basic frameworks:

OpenGL

GTK

cabal install cairo

QTHaskell

  • Relatively little use, but when it is used, it is used notably.
  • Not on Hackage, found here, due to C++ issues
  • Notable users: Nikki and the Robots, a commercial game.

SDL

cabal install sdl

X11

cabal install X11

Venerable Unix user interfaces.

Examples: xmonad.

GD

cabal install gd

The GD graphics system. Package on hackage.

Examples: wordcloud, sparklines.

HOgre

cabal install hogre

Bindings to the Ogre game graphics system.

Now, besides these game layers, there are many higher level frameworks and tools:

Diagrams

cabal install diagrams

2D vector diagrams (e.g. for math), built on cairo.

Gloss

cabal install gloss

2D graphics, very easy interface, relatively new. See TomMD's comment.

Cal3D

cabal install cal3d

Bindings to the Cal3D animation package.

Chalkboard

cabal install chalkboard

OpenGL-based combinators for generating images, used in teaching.

TeaHS

cabal install TeaHS

A simple library for use creating 2D games, inspired by the Ruby library Tea.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...