Creating a Graphics Effects library with Java2D

this is a question that might be better placed at the Java2D section. since i am a noob, and as suh i expect answers to one.
thats why i am posting here (i got the impression that only “high-level” things should be posted at the specific Java2D section)

i am thinking of creating my own graphical effects library using all those classes in Java2D (i am aware of the existence of the Java Advanced Imaging but i think i should start from what i already know).

apart from all the learning i will get, what kind of performance am i gonna get? (in case i want to use it in my games/animations/simulations)

i am thinking something like this:

//initialization phase

//initialize other stuff

CoolGFXLibraryInterface gfxLib = new CoolGFXLibraryInterface();


//in rendering loop

gfxLib.drawFadedImage(g2d, Sprite.getCurrentImage());

Ofcourse , i can make all the methods statics which for some reason seams more rational
any thoughts and ideas would be appreciated

It depends on the implementation. And on the hardware. Performance will be terrible with Intel integrated graphics if you do anything other than really basic stuff. With real video cards, you’ll get better results.

You will probably get better performance by precomputing the effect on the image and then reusing than you would by doing rotations, fading, etc. during rendering. Image effects are really video card intensive.

If you do something that prevents the image from being hardware accelerated, your performance will be horrible. This is what happened to me when I implemented image fading and some other effects, but that might not be true for you. For the most part, I just switched to different effects.

That really doesn’t tell us anything. Whether you make the methods static or not is irrellevant, but it might make sense for your implementation. Maybe you would be better off separating each part of the library into separate classes (which might use static methods or not) rather than coupling it all into one interface.