MCPcopy Index your code
hub / github.com/lincolnloop/python-qrcode / setup_position_adjust_pattern

Method setup_position_adjust_pattern

qrcode/main.py:409–432  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

407 self.modules[6][c] = c % 2 == 0
408
409 def setup_position_adjust_pattern(self):
410 pos = util.pattern_position(self.version)
411
412 for i in range(len(pos)):
413 row = pos[i]
414
415 for j in range(len(pos)):
416 col = pos[j]
417
418 if self.modules[row][col] is not None:
419 continue
420
421 for r in range(-2, 3):
422 for c in range(-2, 3):
423 if (
424 r == -2
425 or r == 2
426 or c == -2
427 or c == 2
428 or (r == 0 and c == 0)
429 ):
430 self.modules[row + r][col + c] = True
431 else:
432 self.modules[row + r][col + c] = False
433
434 def setup_type_number(self, test):
435 bits = util.BCH_type_number(self.version)

Callers 1

makeImplMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected