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);
标签:Graphics2D,自定义,int,背景,BufferedImage,1039,graphics,256 来源: https://www.cnblogs.com/xiao1993/p/15183510.html