MCPcopy Create free account
hub / github.com/breck7/scroll / drawFormatBits

Method drawFormatBits

external/.qrcodegen.js:69–81  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

67 this.drawFormatBits(0), this.drawVersion()
68 }
69 drawFormatBits(t) {
70 const e = (this.errorCorrectionLevel.formatBits << 3) | t
71 let r = e
72 for (let t = 0; t < 10; t++) r = (r << 1) ^ (1335 * (r >>> 9))
73 const s = 21522 ^ ((e << 10) | r)
74 o(s >>> 15 == 0)
75 for (let t = 0; t <= 5; t++) this.setFunctionModule(8, t, n(s, t))
76 this.setFunctionModule(8, 7, n(s, 6)), this.setFunctionModule(8, 8, n(s, 7)), this.setFunctionModule(7, 8, n(s, 8))
77 for (let t = 9; t < 15; t++) this.setFunctionModule(14 - t, 8, n(s, t))
78 for (let t = 0; t < 8; t++) this.setFunctionModule(this.size - 1 - t, 8, n(s, t))
79 for (let t = 8; t < 15; t++) this.setFunctionModule(8, this.size - 15 + t, n(s, t))
80 this.setFunctionModule(8, this.size - 8, !0)
81 }
82 drawVersion() {
83 if (this.version < 7) return
84 let t = this.version

Callers 2

constructorMethod · 0.95
drawFunctionPatternsMethod · 0.95

Calls 3

setFunctionModuleMethod · 0.95
oFunction · 0.70
nFunction · 0.70

Tested by

no test coverage detected