Ejemplo n.º 1
0
    def __init__(self, x, y, obj, size=None, texture=None):
        self.x = x
        self.y = y
        self.obj = obj
        self.obj.widget.point_set.add(self)
        self.size = size or POINT_SIZE
        self.texture = texture

        draw_point(self)
Ejemplo n.º 2
0
    def update_position(self, x, y):
        self.x = x
        self.y = y
        draw_point(self)

        # TODO fix this shit
        if getattr(self.obj, 'token_inside', None):
            clean_polygon_inside(self.obj)

        self.obj.draw()