免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3325 | 回复: 8
打印 上一主题 下一主题

Linux 下C作图的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-18 22:44 |只看该作者 |倒序浏览
我刚开始看linux下C语言编程,请问如何作图,与TC的#include<graphics.h>有什么区别呢,希望路过的达人赐教,有示例代码贴出来更好,谢了先!

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
2 [报告]
发表于 2007-05-18 22:59 |只看该作者
原帖由 greentime 于 2007-5-18 22:44 发表
我刚开始看linux下C语言编程,请问如何作图,与TC的#include<graphics.h>有什么区别呢,希望路过的达人赐教,有示例代码贴出来更好,谢了先!

comp.lang.c FAQ 的 Question 19.10
Q: How can I do graphics?

A: Once upon a time, Unix had a fairly nice little set of device-independent plot functions described in plot(3) and plot(5). The GNU libplot library, written by Robert Maier, maintains the same spirit and supports many modern plot devices; see http://www.gnu.org/software/plotutils/plotutils.html.

A modern, platform-independent graphics library (which also supports 3D graphics and animation) is OpenGL. Other graphics standards which may be of interest are GKS and PHIGS.

If you're programming for MS-DOS, you'll probably want to use libraries conforming to the VESA or BGI standards.

If you're trying to talk to a particular plotter, making it draw is usually a matter of sending it the appropriate escape sequences; see also question 19.9. The vendor may supply a C-callable library, or you may be able to find one on the net.

If you're programming for a particular window system (Macintosh, X windows, Microsoft Windows), you will use its facilities; see the relevant documentation or newsgroup or FAQ list.

References: PCS Sec. 5.4 pp. 75-77

论坛徽章:
0
3 [报告]
发表于 2007-05-18 23:11 |只看该作者
谢谢MMMIX的回复,那么有什么好的linux下C图形编程相关的书籍推荐呢,不胜感激!

论坛徽章:
95
程序设计版块每日发帖之星
日期:2015-09-05 06:20:00程序设计版块每日发帖之星
日期:2015-09-17 06:20:00程序设计版块每日发帖之星
日期:2015-09-18 06:20:002015亚冠之阿尔艾因
日期:2015-09-18 10:35:08月度论坛发贴之星
日期:2015-09-30 22:25:002015亚冠之阿尔沙巴布
日期:2015-10-03 08:57:39程序设计版块每日发帖之星
日期:2015-10-05 06:20:00每日论坛发贴之星
日期:2015-10-05 06:20:002015年亚冠纪念徽章
日期:2015-10-06 10:06:482015亚冠之塔什干棉农
日期:2015-10-19 19:43:35程序设计版块每日发帖之星
日期:2015-10-21 06:20:00每日论坛发贴之星
日期:2015-09-14 06:20:00
4 [报告]
发表于 2007-05-18 23:19 |只看该作者
原帖由 greentime 于 2007-5-18 23:11 发表
谢谢MMMIX的回复,那么有什么好的linux下C图形编程相关的书籍推荐呢,不胜感激!

这要看你准备用什么库了。

不过不论你准备用哪个库,都建议先搜索下相关资源,例如有哪些经典书籍。

论坛徽章:
0
5 [报告]
发表于 2007-05-18 23:21 |只看该作者
为什么非用c呢,好多c++作的库很不错啊

论坛徽章:
0
6 [报告]
发表于 2007-05-19 18:28 |只看该作者

论坛徽章:
0
7 [报告]
发表于 2007-05-20 09:11 |只看该作者
framebuffer, libSDL, DirectFB, GDK, motif, X11
QT, GTK

论坛徽章:
0
8 [报告]
发表于 2007-05-20 09:42 |只看该作者
新手用SDL
以后用SDL+openGL

论坛徽章:
0
9 [报告]
发表于 2007-05-20 10:12 |只看该作者
如果是console的话
用svgalib:)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP