文件名称:java圆角矩形边框消除锯齿Demo.rar
文件大小:5KB
文件格式:RAR
更新时间:2023-04-29 00:44:52
java
主要代码: BufferedImage image = new BufferedImage(400, 120, BufferedImage.TYPE_4BYTE_ABGR); Graphics2D g2d = image.createGraphics(); g2d.setColor(Color.BLUE); //g2d.fillRoundRect(0, 0, 400, 120, 40, 40); BasicStroke stroke = new BasicStroke(4); g2d.setStroke(stroke); g2d.drawRoundRect(0, 0, 400, 120, 40, 40); g2d.dispose(); g2d = (Graphics2D) g; Image imgScale = image.getScaledInstance(100, 30, Image.SCALE_AREA_AVERAGING); g2d.drawImage(imgScale, 0, 0, null);
【文件预览】:
Demo_btn_img_bg
----bin()
--------BtnImgBgPanle.class(1KB)
--------BtnImgBgFrame.class(876B)
--------BtnImgBg.class(401B)
----.settings()
--------org.eclipse.jdt.core.prefs(598B)
----src()
--------BtnImgBg.java(105B)
--------BtnImgBgPanle.java(2KB)
--------BtnImgBgFrame.java(2KB)
----.project(391B)
----.classpath(301B)