Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

High-End 2D Java (SE) Graphics Library [closed]

Tags:

java

graphics

2d

I am looking for a high-end graphics library for Java Standard Edition. I know some fairly low-level libraries: AWT/Swing, JOGL, SDL. Are/is there an alternative?

My requirements are (atleast):

  • Anti-aliased
  • Fullscreen support
  • Alpha channel
  • Blend modes and Z-depth
  • Rasterized Effects: (motion) blur, glow, gloom, etc.

And, optionally:

  • Hardware acceleration
  • Vector graphics (scale/rotate/translate in floating point precision)
  • Well documentated, easy to get started.

I understand if there are no libraries/frameworks matching all requirements, if so, can you comment on how well it's extendible?

Edit:

Are there any other alternatives besides Processing? Is Processing usable (and easy?) as a library?

like image 276
Pindatjuh Avatar asked Mar 05 '10 21:03

Pindatjuh


2 Answers

All of the effects you ask for can be done with Java 2D fairly simply and Java2D is to some degree hardware accelerated. The book Filthy Rich Clients shows how to implement all of these effects and many others. Painters in the SwingX has also implemented several of these effects.

Another possibility is JavaFx. It has a lot of effects built in. A year and a half ago when I tried it, it was still a little slow, but at least one version has been released since then. It may be more performant now. It's built on top of Java2D, so it should be able to take advantage of the hardware acceleration in Java2D.

As far as full screen support here's more information.

like image 175
Jay Askren Avatar answered Oct 03 '22 18:10

Jay Askren


Maybe Processing (homepage) can be a good tradeoff.

  • it has 4 kinds of backing, including OpenGL
  • it has AA
  • it is 2d or 3d
  • it supports hw acceleration
  • it supports transformations
  • its syntax is quite easy to learn
  • it's easily embeddable
  • everything you need to learn is in this page
like image 30
Jack Avatar answered Oct 03 '22 20:10

Jack