I am making a game and want to have a single image 'fade' from left to right with the left part of the image having an alpha of 1.0 and the right having an alpha of 0.0. (note: I do not want it to be changing what it looks like over time, like fading in or out, but just fading from left to right and staying constant). An attempt to draw what I want the end result to look like is below:
lll lll ll ll l l l l l
lll lll ll ll l l l l l
lll lll ll ll l l l l l
lll lll ll ll l l l l l
lll lll ll ll l l l l l
lll lll ll ll l l l l l
Where the densities of the 'l's represent the alpha
I am currently using Buffered Images of TYPE_INT_RGB, and would like to keep that the same if possible.
Is there any built in java classes that can help me do this, or at least a (relatively easy) way to do this myself that I just can't figure out?
EDIT: I don't want to have an opaque frame of any sort. I want to draw one BufferedImage (with alpha gradient) onto another BufferedImage.