예제 #1
0
파일: draw.py 프로젝트: DDMAL/Gamera
 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
예제 #2
0
파일: draw.py 프로젝트: DDMAL/Gamera
 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
예제 #3
0
파일: draw.py 프로젝트: alan0526/Gamera
 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
예제 #4
0
파일: draw.py 프로젝트: hsnr-gamera/gamera
 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
예제 #5
0
파일: draw.py 프로젝트: alan0526/Gamera
 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
예제 #6
0
파일: draw.py 프로젝트: elaboris/gamera
 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