def test_colorspiral(self): """Set of 625 colours, with jitter, using get_colors().""" boxedge = 20 boxes_per_row = 25 rows = 0 for i, c in enumerate(get_colors(625)): self.c.setFillColor(c) x1 = boxedge * (i % boxes_per_row) y1 = rows * boxedge self.c.rect(x1, y1, boxedge, boxedge, fill=1, stroke=0) if not (i+1) % boxes_per_row: rows += 1 self.finish()
def test_colorspiral(self): """Set of 625 colours, with jitter, using get_colors().""" boxedge = 20 boxes_per_row = 25 rows = 0 for i, c in enumerate(get_colors(625)): self.c.setFillColor(c) x1 = boxedge * (i % boxes_per_row) y1 = rows * boxedge self.c.rect(x1, y1, boxedge, boxedge, fill=1, stroke=0) if not (i + 1) % boxes_per_row: rows += 1 self.finish()