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

Method drawrect_context

qrcode/image/base.py:155–164  ·  view source on GitHub ↗
(self, row: int, col: int, qr: "QRCode")

Source from the content-addressed store, hash-verified

153 return super().init_new_image()
154
155 def drawrect_context(self, row: int, col: int, qr: "QRCode"):
156 box = self.pixel_box(row, col)
157 drawer = self.eye_drawer if self.is_eye(row, col) else self.module_drawer
158 is_active: Union[bool, ActiveWithNeighbors] = (
159 qr.active_with_neighbors(row, col)
160 if drawer.needs_neighbors
161 else bool(qr.modules[row][col])
162 )
163
164 drawer.drawrect(box, is_active)

Callers

nothing calls this directly

Calls 4

pixel_boxMethod · 0.80
is_eyeMethod · 0.80
active_with_neighborsMethod · 0.80
drawrectMethod · 0.45

Tested by

no test coverage detected