Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)

src/m/a/MapProxy-1.6.0/mapproxy/test/unit/test_image_messages.py   MapProxy(Download)
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, boxes[0])
        eq_(len(boxes), 1)
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, (5, 5, 35, 30))
        eq_(boxes, [(5, 5, 35, 16), (5, 19, 35, 30)])
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, (65, 70, 95, 95))
        eq_(boxes, [(65, 70, 95, 81), (65, 84, 95, 95)])
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, (35, 38, 65, 63))
        eq_(boxes, [(35, 38, 65, 49), (35, 52, 65, 63)])
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, (35, 38, 65, 63))
        eq_(boxes, [(35, 38, 65, 49), (35, 52, 65, 63)])

src/m/a/mapproxy-HEAD/mapproxy/test/unit/test_image_messages.py   mapproxy(Download)
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, boxes[0])
        eq_(len(boxes), 1)
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, (5, 5, 35, 30))
        eq_(boxes, [(5, 5, 35, 16), (5, 19, 35, 30)])
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, (65, 70, 95, 95))
        eq_(boxes, [(65, 70, 95, 81), (65, 84, 95, 95)])
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, (35, 38, 65, 63))
        eq_(boxes, [(35, 38, 65, 49), (35, 52, 65, 63)])
        img = Image.new('RGB', (100, 100))
        draw = ImageDraw.Draw(img)
        total_box, boxes = td.text_boxes(draw, (100, 100))
        eq_(total_box, (35, 38, 65, 63))
        eq_(boxes, [(35, 38, 65, 49), (35, 52, 65, 63)])