A helper method for pixel-based image generators that specifies the four pixel coordinates for a single rect.
(self, row, col)
| 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: |
no outgoing calls
no test coverage detected