Java: create graphics without awt?

2019-04-06 09:35发布

Is there any library out there to create graphics without using AWT?
What I need is simple drawing functions (like to draw a line) and text drawing functions to create graphics in memory for a Google app engine application. App engine does not support AWT.

Thanks!

9条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-04-06 10:27

Not unless you want to implement your own image class (say, a bitmap) and rendering algorithms for lines, shapes, images.

If you have experience with computer graphics and rasterization, this may not be very hard, but otherwise it will be more than you want to bite off.

查看更多
三岁会撩人
3楼-- · 2019-04-06 10:31

You might try using SenseLan. In the requirements section, it says they don't use awt or ImageIO. Of course, there is the Images api but it seems fairly limited in what it offers.

Edit:

It looks like there are a couple of Python possibilities that could offer you some limited drawing capabilities. You could probably write appropriate image functionality as python web services, and keep the rest of the app in Java:

  1. Replacing Functionality of PIL (ImageDraw) in Google App Engine (GAE)
  2. http://denislaprise.com/2008/08/21/drawing-images-on-google-app-engine/
查看更多
Anthone
4楼-- · 2019-04-06 10:31

Use Batik for GAE which is available as a dependency of FOP on GAE.

You can also track the issue further on the Google app engine bug tracker where others have shared other ideas in the comments.

查看更多
登录 后发表回答