Gradient Transparency

I’m trying to creating lighting effects for a basic 2d platform engine, and I need to know if there is a way to send the GradientPaint constructor a transparent color, resulting in a gradient transparency.

If not, how should I approach this problem?

Sure, you can. Did you try it out before posting?

Chris

How would I construct a color object that is transparant?

Color colour = new Color(0,0,0,0)

http://java.sun.com/j2se/1.3/docs/api/java/awt/Color.html#Color(int, int, int, int)

Check the API docs next time mate! :slight_smile:

:o How did I miss that!?

Looking forward to seeing a nice glow from my lava now.

Thanks! :slight_smile: