有哪些学习 Java 2D API 的好资源?
我已经了解 Oracle 网站上的教程。我想要一些更实用的建议,但也需要更系统地涵盖基本概念。我对 Swing 和 GUI 桌面应用程序不感兴趣,更喜欢批量图像处理。
I already know about the tutorials on Oracle's site. I would like something with more practical advice but also with a more systematic coverage of the fundamental concepts . I am not interested in Swing and GUI desktop application, more into batch image processing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现乔纳森·努森 (Jonathan Knudsen) 写的奥莱利 (O'Reilly) 书对我来说是一个很好的资源。
也就是说,要处理大量 2D API 内容而不碰到 Swing 的一些细节是有点困难的,因为 Swing 绘图例程的默认 Graphics 渲染对象是 Graphics2D 对象。因此,最简单的方法就是重写组件的渲染例程来演示您想要表达的观点。
也就是说,从 Swing 渲染的角度来看,上面的书也有点过时了。甚至没有提到处理 Swing 较新的多线程属性的正确方法(通过 Swing 的
invokeLater(...)
调用 Runnables)。然而,实际的 2D API 被非常深入和详细地介绍,并且它确实为“out of Swing”2D 处理提供了一些指导(第 11 章中的 PNG 解码器示例)。I found the O'Reilly book by Jonathan Knudsen to be a good resource for me.
That said, it is kind of hard to address tons of 2D API stuff without stumbling upon some of Swing's details, as the default Graphics rendering object of the Swing drawing routines is a Graphics2D object. So the simplest thing to do is to override a Component's rendering routine to demonstrate the point you are trying to make.
That said, the above book is also a bit dated from the Swing rendering point of view. The correct way of handling Swing's newer multi-threading properties (invoking Runnables via Swing's
invokeLater(...)
) isn't even mentioned. However, the actual 2D API is covered in good depth and detail, and it does provide some pointers for "out of Swing" 2D processing (A PNG Decoder example in chapter 11).到目前为止,我发现的最好的介绍是 Sun Developer Network(现在的 Oracle)上的这个由两部分组成的文章系列。它从 http://www.oracle.com/technetwork/articles/ 开始javase/java2dpart1-137217.html。
也就是说,我仍然希望得到更实质性的东西。
The very best introduction I have found until now is this two-part article series on the Sun Developer Network (now Oracle). It starts at http://www.oracle.com/technetwork/articles/javase/java2dpart1-137217.html.
That said I'm still wishing for something more substantial.