【文件属性】:
文件名称:用图片填充椭圆的具体过程如下-JAVA自学教程(史上最全)
文件大小:9.22MB
文件格式:PPT
更新时间:2021-04-25 08:33:41
JAVA 自学教程
用图片填充椭圆的具体过程如下:
(1) 创建一个Graphics2D,可以画到BufferedImage中。
例如构建一个BufferedImage对象buf。
BufferedImage buf = new BufferedImage (img.getWidth(this),
img.getHeight(this),BufferedImage.TYPE_INT_ARGB);
创建一个临时Graphics2D对象:
Graphics tmpG = buf.createGraphics();
将图像画入临时缓冲:
tmpG.drawImage(img,10,10,this);