Graphics2D画一个自定义背景颜色的背景
-
int width=256;
-
int height=256;
-
//创建BufferedImage对象 定义长宽及背景图
-
BufferedImage bi = new BufferedImage(1039,479,BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = originImage.createGraphics();
//设置背景颜色
graphics.setPaint (bgColor);覆盖背景
graphics.fillRect ( 0, 0, 1039, 479);