Another way to do that is to blend your image differently, with two pass.
First pass, you just add mutliple radiant point on a Black rectangle, from White-Green-Transparency.
Then, in the same point, you dug your first image from step 1 with an XOR blending.
Result:
http://img11.imageshack.us/img11/7066/step3yr.png
The code:
public void creerLightMap(){
lightMap = new BufferedImage(this.getWidth(), this.getHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g = lightMap.createGraphics();
g.setColor(Color.BLACK);
g.fillRect(0, 0, this.getWidth(), this.getHeight());
float radius = 100;
//create color circle
for(int i=0; i<lumiere.size(); i++){
Point2D center = lumiere.get(i);
float[] dist = {0.0f, 0.5f, 1.0f};
Color[] colors = {new Color( 1.0f , 1.0f , 1.0f , 1.0f), new Color( 0.0f , 1.0f , 0.0f , 0.5f) , new Color( 0.0f , 1.0f , 0.0f , 0.0f)};
RadialGradientPaint p = new RadialGradientPaint(center, radius, dist, colors);
g.setPaint(p);
g.fillRect(0, 0, this.getWidth(), this.getHeight());
}
//add an alpha into theses same circle
for(int i=0; i<lumiere.size(); i++){
Point2D center = lumiere.get(i);
float[] dist = {0.0f, 1.0f};
Color[] colors = {new Color( 1.0f , 1.0f , 1.0f , 1.0f) , new Color( 1.0f , 1.0f , 1.0f , 0.0f)};
RadialGradientPaint p = new RadialGradientPaint(center, radius, dist, colors);
g.setComposite(AlphaComposite.getInstance(AlphaComposite.XOR, 1.0f));
g.setPaint(p);
g.fillRect(0, 0, this.getWidth(), this.getHeight());
}
g.dispose();
}
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2d.drawImage(this.lightMap, 0, 0, null);
}