Drawing with Alpha:使用alpha通道来绘图

 

drawGraphic1(g2d);

// Set alpha. 0.0f is 100% transparent and 1.0f is

// 100% opaque.

float alpha = .7f;

g2d.setComposite(

AlphaComposite.getInstance(

AlphaComposite.SRC_OVER, alpha));

drawGraphic2(g2d);

你可能感兴趣的:(Alpha)