def __doc_example1__(images): from gamera.core import Image, RGBPixel, Point as P img = Image((0, 0), (90, 90)) points = [P(10, 10), P(20, 30), P(32, 22), P(85, 14), P(40, 70), P(80, 85)] for p in points: img.draw_filled_rect((p.x - 2, p.y - 2), (p.x + 1, p.y + 1), 1) r = img.max_empty_rect() rgb = img.to_rgb() rgb.draw_hollow_rect(r, RGBPixel(255, 0, 0)) rgb.highlight(img, RGBPixel(0, 0, 0)) return [rgb]
def __doc_example1__(images): from gamera.core import Image from gamera.core import Point as P img = Image((0, 0), (90, 90)) points = [ P(10, 10), P(20, 30), P(32, 22), P(85, 14), P(40, 70), P(80, 85) ] for p in points: img.draw_filled_rect((p.x - 2, p.y - 2), (p.x + 1, p.y + 1), 1) r = img.max_empty_rect() rgb = img.to_rgb() rgb.draw_hollow_rect(r, RGBPixel(255, 0, 0)) rgb.highlight(img, RGBPixel(0, 0, 0)) return [rgb]