MCPcopy Create free account
hub / github.com/cozmo/jsQR / setRegion

Method setRegion

src/BitMatrix.ts:27–33  ·  view source on GitHub ↗
(left: number, top: number, width: number, height: number, v: boolean)

Source from the content-addressed store, hash-verified

25 }
26
27 public setRegion(left: number, top: number, width: number, height: number, v: boolean) {
28 for (let y = top; y < top + height; y++) {
29 for (let x = left; x < left + width; x++) {
30 this.set(x, y, !!v);
31 }
32 }
33 }
34}

Callers 2

buildFunctionPatternMaskFunction · 0.80
buildFunctionPatternMaskFunction · 0.80

Calls 1

setMethod · 0.95

Tested by

no test coverage detected