在哪里可以找到一个简单的图形C库直接写入框架? [英] Where can I find a simple graphics C library for writing directly onto a frame?

查看:198
本文介绍了在哪里可以找到一个简单的图形C库直接写入框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个简单的图形C库,用于直接写入框架的设备上。

I need a simple graphics C library to use on a device where I will be writing directly to the frame.

框架位于常规内存中。
没有图形加速硬件。

The frame is located in regular memory. There is no graphics acceleration hardware.

没什么好想的我只想画出线条,圆圈,OSD等字符串的东西。

Nothing fancy. I just want to be able to draw lines, circles, OSD stuff like strings as well.

使用好的精简算法(我的CPU是一个运行在400MHz的ARM9)。

It would be nice to have functions that use good, lean algorithms (my CPU is an ARM9 running at 400MHz).

有什么建议?

推荐答案

对于非常简单的需求(线,圆,多边形,文本),我一直只是自己做的。查看bresenham的线和圈的算法, Wu的修改在圆和线上的抗锯齿。

For very simple needs (lines, circles, polygons, text) I have always just made my own. Check out bresenham's algorithm for lines and circles, Wu's modifications for antialiasing on circles and lines.

Gimp将输出图像的C代码,这是我为字体所做的,绘图很简单。我使用反锯齿(gimp - >灰度,使用灰度值作为alpha),但没有完成比例字体。它们不是更难,而且可以使显示更好一些,但是我还没有需要它们。

Gimp will output C code for images, which is what I do for fonts, and drawing them is pretty easy. I have used anti-aliasing (gimp --> grayscale, use the grayscale value as the alpha), but haven't done proportional fonts. They aren't much harder, and can make the display a bit nicer, but I haven't needed them yet.

多边形只是多行,而填充的多边形是非常有趣的实现

这不是很多工作,你会从经验中增长。

It's not a lot of work, and you'll grow from the experience.

然而,如果你决定要渲染SVG或一些其他复杂的矢量语言,那么一个图书馆是按顺序的。但是对于简单的事情,这并不复杂。

If, however, you decide you want to render SVG or some other complex vector language, then a library is in order. But for simple things, this isn't complex.

-Adam

这篇关于在哪里可以找到一个简单的图形C库直接写入框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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