Java:无需awt即可创建图形?

发布于 2024-08-19 08:52:45 字数 119 浏览 5 评论 0原文

是否有任何库可以在不使用 AWT 的情况下创建图形?
我需要的是简单的绘图函数(如画线)和文本绘图函数,以便在内存中为 Google 应用程序引擎应用程序创建图形。应用程序引擎不支持 AWT。

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

ˇ宁静的妩媚 2024-08-26 08:52:45

除非您想实现自己的图像类(例如位图)和线条、形状、图像的渲染算法。

如果您有计算机图形和光栅化方面的经验,这可能不是很难,但否则会超出您的想象。

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.

2024-08-26 08:52:45

您也可以尝试 appengine-awt 项目,尽管它还处于实验阶段。

You might also try the appengine-awt project, though it's a bit experimental.

爱你是孤单的心事 2024-08-26 08:52:45

您可以尝试使用 SenseLan。在要求部分中,它说他们不使用awt或ImageIO。当然,还有Images api,但它的功能似乎相当有限它提供。

编辑:

看起来有几种 Python 可能性可以为您提供一些有限的绘图功能。您可以将适当的图像功能编写为 python Web 服务,并将应用程序的其余部分保留在 Java 中

  1. : -google-app-engine-gae">替换 Google App Engine (GAE) 中的 PIL (ImageDraw) 功能
  2. http://denislaprise.com/2008/08/21/drawing-images-on-google-app-engine/

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/
醉殇 2024-08-26 08:52:45

使用 Batik for GAE,它可作为 FOP 对 GAE 的依赖项使用。

您还可以在 Google 应用引擎错误跟踪器 其他人在评论中分享了其他想法。

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.

忆沫 2024-08-26 08:52:45

“Java 2D API 是一组用于高级 2D 图形和成像的类,包括线条艺术、文本和图像”
http://java.sun.com/products/java-media/ 2D/index.jsp

这是另一种可能性:org.eclipse.draw2d 它可能依赖于 eclipse SWT。

'The Java 2D API is a set of classes for advanced 2D graphics and imaging, encompassing line art, text, and images'
http://java.sun.com/products/java-media/2D/index.jsp

Here's another possibility: org.eclipse.draw2d It probably relies on eclipse SWT.

浮华 2024-08-26 08:52:45

TinyLine 提供Google App Engine 服务器端的矢量图形支持,并且还提供 SVG 渲染支持。请参阅 SVG 缩略图演示。

TinyLine provides vector graphics support on the Google App Engine server side, and also provides SVG rendering support. See the SVG Thumbnail images demo.

作妖 2024-08-26 08:52:45

Google Web Toolkit 包含一个漂亮的图形库,专为与 Google 应用程序引擎交互而设计。

编辑澄清:Google App Engine 专为在网络上托管应用程序而设计。您需要设计可以在浏览器中运行的图形。为此,您需要使用网络语言(例如 Javascript)编写代码。 Google Web Toolkit 包含一个可编译为 Javascript 的 Java 图形库,从而节省您自己编写 Javascript 的精力。

Google Web Toolkit contains a nice graphics library designed for interfacing with the Google app engine.

edit to clarify: Google App Engine is designed for hosting applications on the web. You need to design graphics that can run in the browser. To do this, you need to write code in a web language, Javascript, for example. Google Web Toolkit contains a Java graphics library which compiles down to Javascript, saving you the effort of writing the Javascript yourself.

冰之心 2024-08-26 08:52:45

我犹豫是否要提及 PJA,如果 AWT 类存在,它似乎可以工作,但安全性管理员阻止您使用它们。

I hesitate to mention PJA, which appears to work if the AWT classes are present, but the security manager prevents you from using them.

楠木可依 2024-08-26 08:52:45

如果您可以在 GAE 上使用 Python 而不是 Java,那么就有 pybmp

If you can use Python on GAE instead of Java, then there's pybmp.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文