|
3 | 3 | * |
4 | 4 | * NodeJS QRCode generator. Can save image or svg to file, get standard base64 image data url text or get SVG serialized text. Cross-browser QRCode generator for pure javascript. Support Dot style, Logo, Background image, Colorful, Title etc. settings. support binary mode.(Running without DOM on server side) |
5 | 5 | * |
6 | | - * Version 4.2.1 |
| 6 | + * Version 4.2.3 |
7 | 7 | * |
8 | 8 | * @author [ inthinkcolor@gmail.com ] |
9 | 9 | * |
@@ -1218,12 +1218,23 @@ Drawing.prototype.draw = function(oQRCode) { |
1218 | 1218 |
|
1219 | 1219 | lColor = "rgba(0,0,0,0)"; |
1220 | 1220 | if (row == 6) { |
1221 | | - dColor = _htOption.timing_H || _htOption.timing || _htOption.colorDark; |
| 1221 | + // dColor = _htOption.timing_H || _htOption.timing || _htOption.colorDark; |
| 1222 | + if (_htOption.autoColor) { |
| 1223 | + dColor = _htOption.timing_H || _htOption.timing || _htOption.autoColorDark; |
| 1224 | + lColor = _htOption.timing_H || _htOption.timing || _htOption.autoColorLight; |
| 1225 | + } else { |
| 1226 | + dColor = _htOption.timing_H || _htOption.timing || _htOption.colorDark; |
| 1227 | + } |
1222 | 1228 | } else if (col == 6) { |
1223 | | - dColor = _htOption.timing_V || _htOption.timing || |
1224 | | - _htOption.colorDark; |
| 1229 | + // dColor = _htOption.timing_V || _htOption.timing || _htOption.colorDark; |
| 1230 | + if (_htOption.autoColor) { |
| 1231 | + dColor = _htOption.timing_V || _htOption.timing || _htOption.autoColorDark; |
| 1232 | + lColor = _htOption.timing_V || _htOption.timing || _htOption.autoColorLight; |
| 1233 | + } else { |
| 1234 | + dColor = _htOption.timing_V || _htOption.timing || |
| 1235 | + _htOption.colorDark; |
| 1236 | + } |
1225 | 1237 | } else { |
1226 | | - |
1227 | 1238 | if (_htOption.autoColor) { |
1228 | 1239 | dColor = _htOption.autoColorDark; |
1229 | 1240 | lColor = _htOption.autoColorLight; |
@@ -1257,8 +1268,15 @@ Drawing.prototype.draw = function(oQRCode) { |
1257 | 1268 | nowDotScale = _htOption.dotScaleAO; |
1258 | 1269 | } else if (type == 'AI') { |
1259 | 1270 | nowDotScale = _htOption.dotScaleAI; |
| 1271 | + } |
| 1272 | + |
| 1273 | + if (_htOption.backgroundImage && _htOption.autoColor) { |
| 1274 | + dColor = ((eye.type == 'AO') ? _htOption.AI : _htOption.AO) || |
| 1275 | + _htOption.autoColorDark; |
| 1276 | + lColor = _htOption.autoColorLight; |
1260 | 1277 | } else { |
1261 | | - nowDotScale = 1; |
| 1278 | + dColor = ((eye.type == 'AO') ? _htOption.AI : _htOption.AO) || |
| 1279 | + dColor; |
1262 | 1280 | } |
1263 | 1281 |
|
1264 | 1282 | _oContext.fillRect(nLeft + nWidth * (1 - nowDotScale) / 2, _htOption.titleHeight + nTop + |
|
0 commit comments