哈斯克尔图书馆2D绘图 [英] Haskell library for 2D drawing

查看:95
本文介绍了哈斯克尔图书馆2D绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我基本上想创建一个全屏窗口并以不同的颜色和大小绘制文本(并且更新屏幕)。我在python中使用了pygame,我正在寻找一个类似的库(应该相当容易使用)。

+1如果它也处理输入的话。如果你正在寻找一个专门的游戏库,你有很多选项,你可以找到 href =http://www.haskell.org/haskellwiki/Applications_and_libraries/Games =noreferrer> here FunGEn 可能是您最好的选择。然而,你的问题似乎表明一个游戏库会有点矫枉过正,如果你想要做的就是绘制文本并接收输入。在这种情况下,您可以选择一些简单的方法,比如 HOpenGL hsSDL 。还有其他几个图书馆此处



编辑:经过多一点研究,您可以使用 haskgame 做得很好。我从来没有用过它,但它看起来像有几个函数这里,它完全符合你的要求。


I basically want to create a full screen window and draw text on it in different colors and sizes (and also update the screen). I've used pygame for this in python and I'm looking for a similar library (should be fairly easy to use).

+1 if it handles input too...

解决方案

If you're looking for a specialized game library, you have a number of options that you can find here. FunGEn is probably your best option out of those libraries. However, your question seems to suggest a game library would be a bit overkill, if all you're looking to do is draw text and receive input. In that case, you might opt for something simpler like HOpenGL or hsSDL. There are also several other libraries listed here.

Edit: After a bit more research, you might do well using haskgame. I've never used it myself, but it looks like it's got a few functions here that do exactly what you're looking for.

这篇关于哈斯克尔图书馆2D绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆