MCPcopy
hub / github.com/kciter/qart.js / setupPositionProbePattern

Function setupPositionProbePattern

src/qrcode.js:72–88  ·  view source on GitHub ↗
(row, col)

Source from the content-addressed store, hash-verified

70 }
71
72 var setupPositionProbePattern = function (row, col) {
73 for (var r = -1; r <= 7; r += 1) {
74 if (row + r <= -1 || _moduleCount <= row + r) continue
75
76 for (var c = -1; c <= 7; c += 1) {
77 if (col + c <= -1 || _moduleCount <= col + c) continue
78
79 if ((r >= 0 && r <= 6 && (c == 0 || c == 6)) ||
80 (c >= 0 && c <= 6 && (r == 0 || r == 6)) ||
81 (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {
82 _modules[row + r][col + c] = true
83 } else {
84 _modules[row + r][col + c] = false
85 }
86 }
87 }
88 }
89
90 var getBestMaskPattern = function () {
91 var minLostPoint = 0

Callers 1

makeImplFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected