def test_draw_x_lots(): """ test drawing a lot of dots """ import random w, h, = 1000, 500 img = Image(w, h) points = [(random.randint(0, w), random.randint(0, w)) for _i in range(1000)] img.draw_xes(points, diameter=2, color='red') img.save(outfile("test_image_x_lots.png"), 'png')
def test_draw_x_large(): img = Image(200, 200) img.draw_xes(((5, 5), ), diameter=3, color='red') img.draw_xes(((15, 15), ), diameter=4, color='red') img.draw_xes(((25, 25), ), diameter=5, color='purple') img.draw_xes(((35, 35), ), diameter=6, color='red') img.draw_xes(((45, 45), ), diameter=7, color='red') img.draw_xes(((55, 55), ), diameter=9, color='green') img.draw_xes(((65, 65), ), diameter=12, color='red', line_width=2) img.draw_xes(((80, 80), ), diameter=15, color='blue', line_width=3) img.draw_xes(((100, 100), ), diameter=20, color='fuchsia', line_width=4) img.draw_xes(((120, 120), ), diameter=30, color='red', line_width=5) img.draw_xes(((160, 160), ), diameter=40, color='red', line_width=10) img.save(outfile("test_image_x_large.png"), "png")