快速,像素precision 2D绘图API的图形应用程序? [英] Fast, Pixel Precision 2D Drawing API for Graphics App?
问题描述
我woud想创建一个跨平台的绘图程序。在一个要求写我的应用程序是,我有像素级precision在画布上。举例来说,我想写我自己的线描算法,而不是靠别人。我不希望任何形式的反走样(同样,需要像素级别的控制。)我想了用户互动在屏幕上以快速响应(挂起我写的快速算法的能力。)
I woud like to create a cross-platform drawing program. The one requirement for writing my app is that I have pixel level precision over the canvas. For instance, I want to write my own line drawing algorithm rather than rely on someone elses. I do not want any form of anti-aliasing (again, pixel level control is required.) I would like the users interactions on the screen to be quick and responsive (pending my ability to write fast algorithms.)
在理想情况下,我想写在Python,或者Java作为第二选择。轻松做最后的应用程序跨平台的能力是必须的。我会向不同的API对不同OS'es如果需要的话,只要我可以写身边一个抽象层。任何想法?
Ideally, I would like to write this in Python, or perhaps Java as a second choice. The ability to easily make the final app cross-platform is a must. I will submit to different API's on different OS'es if necessary as long as I can write an abstraction layer around them. Any ideas?
补遗:我需要绘制的屏幕上的能力的。绘制出我得想出一个文件。
addendum: I need the ability to draw on-screen. Drawing out to a file I've got figured out.
推荐答案
我就在本周把一些幻灯片和演示code做使用库pyglet使用OpenGL从蟒蛇2D图形。你可以在这里看到我的东西: http://tartley.com/?p=378
I just this week put together some slides and demo code for doing 2d graphics using OpenGL from python using the library pyglet. You can see my stuff here: http://tartley.com/?p=378
这是非常快的(相对而言,为Python)我已成功地避开1000独立定位和定向移动的物体在屏幕上,每个大约有50个顶点。
It is very fast (relatively speaking, for python) I have managed to get around 1,000 independently positioned and oriented objects moving around the screen, each with about 50 vertices.
这是非常便携,所有code我已经写在这个环境中适用于Windows和Linux和Mac(甚至是模糊的环境中,如Pypy),而我永远不必去想它。
It is very portable, all the code I have written in this environment works on windows and Linux and mac (and even obscure environments like Pypy) without me ever having to think about it.
更新:有一堆关于同一主题的较新的帖子太: HTTP :?//tartley.com/猫= 27
Update: There are a bunch of newer posts on the same topic too: http://tartley.com/?cat=27
这篇关于快速,像素precision 2D绘图API的图形应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!