mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add test
This commit is contained in:
parent
4344834ac2
commit
22259e568f
@ -1400,11 +1400,6 @@ public class ImgUtil {
|
|||||||
// 先用背景色填充整张图片,也就是背景
|
// 先用背景色填充整张图片,也就是背景
|
||||||
g.setColor(backgroundColor);
|
g.setColor(backgroundColor);
|
||||||
g.fillRect(0, 0, width, height);
|
g.fillRect(0, 0, width, height);
|
||||||
}else{
|
|
||||||
// 如果没有设置背景色,则设置为透明背景
|
|
||||||
g.dispose();
|
|
||||||
image = image.createGraphics().getDeviceConfiguration().createCompatibleImage(width, height, Transparency.TRANSLUCENT);
|
|
||||||
g = image.getGraphics();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g.setColor(ObjectUtil.defaultIfNull(fontColor, Color.BLACK));
|
g.setColor(ObjectUtil.defaultIfNull(fontColor, Color.BLACK));
|
||||||
|
@ -148,6 +148,7 @@ public class ImgUtilTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Ignore
|
||||||
public void createImageTest() throws IORuntimeException, IOException {
|
public void createImageTest() throws IORuntimeException, IOException {
|
||||||
ImgUtil.createImage(
|
ImgUtil.createImage(
|
||||||
"版权所有",
|
"版权所有",
|
||||||
@ -159,6 +160,7 @@ public class ImgUtilTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Ignore
|
||||||
public void createTransparentImageTest() throws IORuntimeException, IOException {
|
public void createTransparentImageTest() throws IORuntimeException, IOException {
|
||||||
ImgUtil.createTransparentImage(
|
ImgUtil.createTransparentImage(
|
||||||
"版权所有",
|
"版权所有",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user