def __doc_example1__(images): image = Image((0, 0), Dim(100, 100), RGB, DENSE) points = [(randint(0, 100), randint(0, 100)) for x in range(4)] image.draw_bezier(*tuple(list(points) + [RGBPixel(255, 0, 0), 0.1])) image.draw_marker(points[0], 7, 0, RGBPixel(0, 0, 255)) image.draw_marker(points[1], 7, 1, RGBPixel(0, 255, 0)) image.draw_marker(points[2], 7, 1, RGBPixel(0, 255, 0)) image.draw_marker(points[3], 7, 0, RGBPixel(0, 0, 255)) return image
def __doc_example1__(images): image = Image((0, 0), Dim(100, 100), RGB, DENSE) for i in range(10): image.draw_bezier((randint(0, 100), randint(0, 100)), (randint(0, 100), randint(0, 100)), (randint(0, 100), randint(0, 100)), (randint(0, 100), randint(0, 100)), RGBPixel(randint(0, 255), randint(0, 255), randint(0, 255)), 0.1) return image
def __doc_example1__(images): from random import randint from gamera.core import Image, Dim image = Image((0, 0), Dim(100, 100), RGB, DENSE) points = [(randint(0, 100), randint(0, 100)) for x in range(4)] image.draw_bezier(*tuple(list(points) + [RGBPixel(255, 0, 0), 0.1])) image.draw_marker(points[0], 7, 0, RGBPixel(0, 0, 255)) image.draw_marker(points[1], 7, 1, RGBPixel(0, 255, 0)) image.draw_marker(points[2], 7, 1, RGBPixel(0, 255, 0)) image.draw_marker(points[3], 7, 0, RGBPixel(0, 0, 255)) return image
def __doc_example1__(images): from random import randint, seed from gamera.core import Image, Dim seed(0) image = Image((0, 0), Dim(100, 100), RGB, DENSE) points = [(randint(0, 100), randint(0, 100)) for x in range(4)] image.draw_bezier(*tuple(list(points) + [RGBPixel(255, 0, 0), 0.1])) image.draw_marker(points[0], 7, 0, RGBPixel(0, 0, 255)) image.draw_marker(points[1], 7, 1, RGBPixel(0, 255, 0)) image.draw_marker(points[2], 7, 1, RGBPixel(0, 255, 0)) image.draw_marker(points[3], 7, 0, RGBPixel(0, 0, 255)) return image
def __doc_example1__(images): from random import randint from gamera.core import Image, Dim image = Image((0, 0), Dim(100, 100), RGB, DENSE) for i in range(10): image.draw_bezier((randint(0, 100), randint(0, 100)), (randint(0, 100), randint(0, 100)), (randint(0, 100), randint(0, 100)), (randint(0, 100), randint(0, 100)), RGBPixel(randint(0, 255), randint(0, 255), randint(0, 255)), 0.1) return image
def __doc_example1__(images): from random import randint from gamera.core import Image, Dim image = Image((0, 0), Dim(100, 100), RGB, DENSE) for i in range(10): image.draw_bezier((randint(0, 100), randint(0, 100)), (randint(0, 100), randint(0, 100)), (randint(0, 100), randint(0, 100)), (randint(0, 100), randint(0, 100)), RGBPixel(randint(0, 255), randint(0,255), randint(0, 255)), 0.1) return image