3
3
4
4
- [ 介绍] ( #docs-introduction )
5
5
- [ 升级指南] ( #docs-upgrade )
6
- - [ 翻译] ( #docs-translations )
7
6
- [ 配置] ( #docs-configuration )
8
7
- [ 简例] ( #docs-ideas )
9
8
- [ 使用说明] ( #docs-usage )
@@ -24,6 +23,7 @@ Simple QrCode 是基于[Bacon/BaconQrCode](https://github.com/Bacon/BaconQrCode)
24
23
25
24
如果你需要使用 ` png ` 文件格式,那么你** 必须** 安装 ` imagick ` PHP扩展.
26
25
26
+ <a id =" docs-configuration " ></a >
27
27
## 配置
28
28
29
29
#### Composer安装
@@ -71,7 +71,7 @@ Laravel将会自动完成安装工作.
71
71
72
72
这就能创建一个内容是:"Make me into a QrCode!" 的二维码了.
73
73
74
- #### 生成 ` (string $data, string $filename = null) `
74
+ #### 生成 ` generate (string $data, string $filename = null)`
75
75
76
76
` Generate ` 是用来创建二维码的方法.
77
77
@@ -87,7 +87,7 @@ Laravel将会自动完成安装工作.
87
87
88
88
QrCode::generate('Make me into a QrCode!', '../public/qrcodes/qrcode.svg');
89
89
90
- #### 格式 ` (string $format) `
90
+ #### 格式 ` format (string $format)`
91
91
92
92
现支持 PNG,EPS,SVG 三种格式,设置方式如下:
93
93
@@ -97,7 +97,7 @@ Laravel将会自动完成安装工作.
97
97
98
98
> 必须 ` imagick ` PHP扩展才能生成 ` png ` 图片.
99
99
100
- #### 尺寸 ` (int $size) `
100
+ #### 尺寸 ` size (int $size)`
101
101
102
102
> QrCode 的 Generator 默认返回可能最小像素单位的二维码.
103
103
@@ -107,7 +107,7 @@ Laravel将会自动完成安装工作.
107
107
108
108
![ 200 像素] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/200-pixels.png?raw=true ) ![ 250 像素] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/250-pixels.png?raw=true )
109
109
110
- #### 颜色 ` (int $red, int $green, int $blue, int $alpha = null) `
110
+ #### 颜色 ` color (int $red, int $green, int $blue, int $alpha = null)`
111
111
112
112
> 注意改变颜色后,可能会导致某些设备难以识别.
113
113
@@ -119,7 +119,7 @@ QrCode::color(255, 0, 0, 25); //红色二维码+25%透明度
119
119
![ 红色二维码] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/red-qrcode.png?raw=true ) ![ 红色透明二维码] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/red-25-transparent.png?raw=true )
120
120
121
121
122
- #### 背景颜色 ` (int $red, int $green, int $blue, int $alpha = null) `
122
+ #### 背景颜色 ` backgroundColor (int $red, int $green, int $blue, int $alpha = null)`
123
123
124
124
你可以使用` backgroundColor ` 方法来设置背景颜色.
125
125
@@ -128,7 +128,7 @@ QrCode::color(255, 0, 0, 25); //红色二维码+25%透明度
128
128
129
129
![ 红色背景二维码] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/red-background.png?raw=true ) ![ 红色透明背景二维码] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/red-25-transparent-background.png?raw=true )
130
130
131
- #### 渐变 ` $startRed, $startGreen, $startBlue, $endRed, $endGreen, $endBlue, string $type) `
131
+ #### 渐变 ` gradient( $startRed, $startGreen, $startBlue, $endRed, $endGreen, $endBlue, string $type)`
132
132
133
133
你可以使用 ` gradient ` 方法设置渐变.
134
134
@@ -142,7 +142,7 @@ QrCode::color(255, 0, 0, 25); //红色二维码+25%透明度
142
142
| ` inverse_diagonal ` 反对角 | ![ 反对角] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/inverse_diagonal.png?raw=true ) |
143
143
| ` radial ` 迳向 | ![ 迳向] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/radial.png?raw=true ) |
144
144
145
- #### 定位颜色 ` (int $eyeNumber, int $innerRed, int $innerGreen, int $innerBlue, int $outterRed = 0, int $outterGreen = 0, int $outterBlue = 0) `
145
+ #### 定位颜色 ` eyeColor (int $eyeNumber, int $innerRed, int $innerGreen, int $innerBlue, int $outterRed = 0, int $outterGreen = 0, int $outterBlue = 0)`
146
146
147
147
你可以使用 ` eyeColor ` 方法设置定位眼颜色.
148
148
@@ -152,7 +152,7 @@ QrCode::color(255, 0, 0, 25); //红色二维码+25%透明度
152
152
| ` 1 ` | ![ Eye 1] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/eye-1.png?raw=true ) |
153
153
| ` 2 ` | ![ Eye 2] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/eye-2.png?raw=true ) |
154
154
155
- #### 风格 ` (string $style, float $size = 0.5) `
155
+ #### 风格 ` style (string $style, float $size = 0.5)`
156
156
157
157
二维码风格可以轻易的使用 ` square ` , ` dot ` 或 ` round ` 来调换. 这将改变二维码中的信息块风格. 第二个参数是设置dot'点'的大小和round的圆度.
158
158
@@ -162,7 +162,7 @@ QrCode::color(255, 0, 0, 25); //红色二维码+25%透明度
162
162
| ` dot ` 点 | ![ 点] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/dot.png ) |
163
163
| ` round ` 圆 | ![ 圆] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/round.png?raw=true ) |
164
164
165
- #### 定位眼风格 ` (string $style) `
165
+ #### 定位眼风格 ` eyeStyle (string $style)`
166
166
167
167
二维码定位眼支持2个格式, ` sqaure ` 方 和 ` circle ` 圆.
168
168
@@ -171,7 +171,7 @@ QrCode::color(255, 0, 0, 25); //红色二维码+25%透明度
171
171
| ` sqaure ` 方 | ![ 方] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/200-pixels.png?raw=true ) |
172
172
| ` circle ` 圆 | ![ 圆] ( https://raw.githubusercontent.com/SimpleSoftwareIO/simple-qrcode/master/docs/imgs/circle-eye.png?raw=true ) |
173
173
174
- #### 边距 ` (int $margin) `
174
+ #### 边距 ` margin (int $margin)`
175
175
176
176
也支持设置边距. 设置方式如下:
177
177
0 commit comments