xuhy
2025-01-09 d35af5a67df8592fd4698e8beb8f66f9d23bb6b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
package com.stylefeng.guns.core.qr;
 
/**
 * 二维码图片对象
 *
 * @author fengshuonan
 * @date 2016年12月8日 上午11:37:09
 */
public class QrImage {
 
    /**
     * 二维码的内容
     */
    private String qrContent;
 
    /**
     * 二维码的宽度
     */
    private int qrWidth;
 
    /**
     * 二维码的高度
     */
    private int qrHeight;
 
    /**
     * 二维码中间图标的文件路径
     */
    private String qrIconFilePath;
 
    /**
     * 二维码中间小图标的边长
     */
    private int qrIconWidth;
 
    /**
     * 顶部文字的高度
     */
    private int topWrodHeight;
 
    /**
     * 文字的大小
     */
    private int wordSize;
 
    /**
     * 文字的内容
     */
    private String wordContent;
 
    /**
     * 文件的输出路径
     */
    private String fileOutputPath;
 
    public static class Builder {
        private String qrContent;
        private int qrWidth;
        private int qrHeight;
        private String qrIconFilePath;
        private int topWrodHeight;
        private int wordSize;
        private String wordContent;
        private String fileOutputPath;
        private int qrIconWidth;
 
        public Builder() {
        }
 
        public Builder setQrContent(String qrContent) {
            this.qrContent = qrContent;
            return this;
        }
 
        public Builder setQrWidth(int qrWidth) {
            this.qrWidth = qrWidth;
            return this;
        }
 
        public Builder setQrHeight(int qrHeight) {
            this.qrHeight = qrHeight;
            return this;
        }
 
        public Builder setQrIconFilePath(String qrIconFilePath) {
            this.qrIconFilePath = qrIconFilePath;
            return this;
        }
 
        public Builder setTopWrodHeight(int topWrodHeight) {
            this.topWrodHeight = topWrodHeight;
            return this;
        }
 
        public Builder setWordSize(int wordSize) {
            this.wordSize = wordSize;
            return this;
        }
 
        public Builder setWordContent(String wordContent) {
            this.wordContent = wordContent;
            return this;
        }
 
        public Builder setFileOutputPath(String fileOutputPath) {
            this.fileOutputPath = fileOutputPath;
            return this;
        }
 
        public Builder setQrIconWidth(int qrIconWidth) {
            this.qrIconWidth = qrIconWidth;
            return this;
        }
 
        public QrImage build() {
            return new QrImage(this.qrContent, this.qrWidth, this.qrHeight, this.qrIconFilePath, this.qrIconWidth,
                    this.topWrodHeight, this.wordSize, this.wordContent, this.fileOutputPath);
        }
    }
 
    public QrImage(String qrContent, int qrWidth, int qrHeight, String qrIconFilePath, int qrIconWidth,
                   int topWrodHeight, int wordSize, String wordContent, String fileOutputPath) {
        super();
        this.qrContent = qrContent;
        this.qrWidth = qrWidth;
        this.qrHeight = qrHeight;
        this.qrIconFilePath = qrIconFilePath;
        this.qrIconWidth = qrIconWidth;
        this.topWrodHeight = topWrodHeight;
        this.wordSize = wordSize;
        this.wordContent = wordContent;
        this.fileOutputPath = fileOutputPath;
    }
 
    public String getQrContent() {
        return qrContent;
    }
 
    public int getQrWidth() {
        return qrWidth;
    }
 
    public int getQrHeight() {
        return qrHeight;
    }
 
    public String getQrIconFilePath() {
        return qrIconFilePath;
    }
 
    public int getTopWrodHeight() {
        return topWrodHeight;
    }
 
    public int getWordSize() {
        return wordSize;
    }
 
    public String getWordContent() {
        return wordContent;
    }
 
    public String getFileOutputPath() {
        return fileOutputPath;
    }
 
    public int getQrIconWidth() {
        return qrIconWidth;
    }
}