Set color of all pixels in bbox.
(self, bbox, color)
| 14036 | pm.fz_samples_set(i + j, color[j]) |
| 14037 | |
| 14038 | def set_rect(self, bbox, color): |
| 14039 | """Set color of all pixels in bbox.""" |
| 14040 | pm = self.this |
| 14041 | n = pm.n() |
| 14042 | c = [] |
| 14043 | for j in range(n): |
| 14044 | i = color[j] |
| 14045 | if not _INRANGE(i, 0, 255): |
| 14046 | raise ValueError( MSG_BAD_COLOR_SEQ) |
| 14047 | c.append(i) |
| 14048 | bbox = JM_irect_from_py(bbox) |
| 14049 | i = JM_fill_pixmap_rect_with_color(pm, c, bbox) |
| 14050 | rc = bool(i) |
| 14051 | return rc |
| 14052 | |
| 14053 | def shrink(self, factor): |
| 14054 | """Divide width and height by 2**factor. |
nothing calls this directly
no test coverage detected