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

Method pixel_box

qrcode/image/base.py:57–67  ·  view source on GitHub ↗

A helper method for pixel-based image generators that specifies the four pixel coordinates for a single rect.

(self, row, col)

Source from the content-addressed store, hash-verified

55 """
56
57 def pixel_box(self, row, col):
58 """
59 A helper method for pixel-based image generators that specifies the
60 four pixel coordinates for a single rect.
61 """
62 x = (col + self.border) * self.box_size
63 y = (row + self.border) * self.box_size
64 return (
65 (x, y),
66 (x + self.box_size - 1, y + self.box_size - 1),
67 )
68
69 @abc.abstractmethod
70 def new_image(self, **kwargs) -> Any:

Callers 2

drawrectMethod · 0.80
drawrect_contextMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected