Example #1
0
    def paste(self, xy, w, h, _ca):
        x, y = xy

        ca = self.stock[_ca]

        x -= ca.anchor[0]
        y -= ca.anchor[1]

        for yi in xrange(len(ca.pic)):
            for xi in xrange(len(ca.pic[yi])):
                if ca.pic[yi][xi] != '.':
                    continue

                x1 = x + xi
                y1 = y + yi

                if x1 < 0 or x1 >= w or y1 < 0 or y1 >= h:
                    continue

                dg.celauto_seed(x1, y1, _ca)
Example #2
0
 def seed(self, xy, ca):
     dg.celauto_seed(xy[0], xy[1], ca)