|
|
@@ -18,10 +18,10 @@ import java.util.Map;
|
|
|
*/
|
|
|
public class QrCodeRender extends Render {
|
|
|
|
|
|
- private String content;
|
|
|
- private int width;
|
|
|
- private int height;
|
|
|
- private ErrorCorrectionLevel errorCorrectionLevel;
|
|
|
+ protected String content;
|
|
|
+ protected int width;
|
|
|
+ protected int height;
|
|
|
+ protected ErrorCorrectionLevel errorCorrectionLevel;
|
|
|
|
|
|
/**
|
|
|
* 构造方法,经测试不指定纠错参数时,默认使用的是 'L' 最低级别纠错参数
|
|
|
@@ -56,7 +56,7 @@ public class QrCodeRender extends Render {
|
|
|
init(content, width, height, errorCorrectionLevel);
|
|
|
}
|
|
|
|
|
|
- private void init(String content, int width, int height, char errorCorrectionLevel) {
|
|
|
+ protected void init(String content, int width, int height, char errorCorrectionLevel) {
|
|
|
if (errorCorrectionLevel == 'H') {
|
|
|
init(content, width, height, ErrorCorrectionLevel.H);
|
|
|
} else if (errorCorrectionLevel == 'Q') {
|
|
|
@@ -70,7 +70,7 @@ public class QrCodeRender extends Render {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void init(String content, int width, int height, ErrorCorrectionLevel errorCorrectionLevel) {
|
|
|
+ protected void init(String content, int width, int height, ErrorCorrectionLevel errorCorrectionLevel) {
|
|
|
if (StrKit.isBlank(content)) {
|
|
|
throw new IllegalArgumentException("content 不能为空");
|
|
|
}
|