用于 2D 绘图的 Haskell 库 [英] Haskell library for 2D drawing

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

问题描述

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

+1 如果它也处理输入...

解决方案

如果您正在寻找专门的游戏库,您可以找到多种选择 此处.FunGEn 可能是这些库中的最佳选择.但是,如果您只想绘制文本并接收输入,那么您的问题似乎表明游戏库有点矫枉过正.在这种情况下,您可能会选择更简单的东西,例如 HOpenGLhsSDL.此处还列出了其他几个库.

经过更多研究后,您可能会很好地使用 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 绘图的 Haskell 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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