|
@ -36,8 +36,8 @@ public class HouseQRcodeUtils { |
|
|
private static final Color BGWHITE = Color.white; |
|
|
private static final Color BGWHITE = Color.white; |
|
|
public static final int WIDTH = 800; |
|
|
public static final int WIDTH = 800; |
|
|
public static final int HEIGHT = 800; |
|
|
public static final int HEIGHT = 800; |
|
|
public static final int MARGIN = 2; |
|
|
public static final int MARGIN = 10; |
|
|
public static final int FONTSIZE = 20; |
|
|
public static final int FONTSIZE = 40; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -89,7 +89,8 @@ public class HouseQRcodeUtils { |
|
|
//x开始的位置:(图片宽度-字体大小*字的个数)/2
|
|
|
//x开始的位置:(图片宽度-字体大小*字的个数)/2
|
|
|
int startX = (WIDTH - (FONTSIZE * pressText.length())) / 2; |
|
|
int startX = (WIDTH - (FONTSIZE * pressText.length())) / 2; |
|
|
//y开始的位置:图片高度-(图片高度-图片宽度)/2
|
|
|
//y开始的位置:图片高度-(图片高度-图片宽度)/2
|
|
|
int startY = HEIGHT - (HEIGHT - WIDTH) / 2 + FONTSIZE; |
|
|
// int startY = HEIGHT - (HEIGHT - WIDTH) / 2 + FONTSIZE;
|
|
|
|
|
|
int startY = 720; |
|
|
|
|
|
|
|
|
int imageW = outImage.getWidth(); |
|
|
int imageW = outImage.getWidth(); |
|
|
int imageH = outImage.getHeight(); |
|
|
int imageH = outImage.getHeight(); |
|
|