Пример #1
0
 def rotate(self, x,y):
     bgpath = imagepath(self.tile.background())
     rot = int(bgpath[3])
     if rot == 270:
         rot = 0
     else:
         rot += 90
     bgpath = [bgpath[0], bgpath[1], bgpath[2], str(rot)]
     bgpath = ':'.join([str(I) for I in bgpath])
     self.setbg(bgpath, x, y)
Пример #2
0
 def get_by_path(self, path):
     backgroundpath = imagepath(path)
     return self.tile(backgroundpath[0], backgroundpath[1], backgroundpath[2], backgroundpath[3])