Exemplo n.º 1
0
def test_background_poly(output_dir):
    """
    test drawing polygons to the background
    """
    mc = MapCanvas((400, 300), preset_colors='web')

    mc.background_color = 'transparent'
    mc.clear_background()

    mc.draw_polygon(((-30, 30), (30, 30), (30, -20), (-30, -20)),
                    fill_color='blue',
                    line_color='black',
                    background=True)

    mc.save_background(os.path.join(output_dir, "background.png"))
Exemplo n.º 2
0
def test_background_poly(output_dir):
    """
    test drawing polygons to the background
    """
    mc = MapCanvas((400, 300), preset_colors='web')

    mc.background_color = 'transparent'
    mc.clear_background()

    mc.draw_polygon(((-30, 30),
                     (30, 30),
                     (30, -20),
                     (-30, -20)),
                    fill_color='blue',
                    line_color='black',
                    background=True)

    mc.save_background(os.path.join(output_dir, "background.png"))