diff options
Diffstat (limited to '')
-rw-r--r-- | src/mapdata.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/mapdata.py b/src/mapdata.py index ea62111..ec0feff 100644 --- a/src/mapdata.py +++ b/src/mapdata.py @@ -7,21 +7,6 @@ TILE_SIZE = (24,24) MAP_SIZE_IN_TILES = (512,512) MAP_SIZE = (MAP_SIZE_IN_TILES[0] * TILE_SIZE[0], MAP_SIZE_IN_TILES[1] * TILE_SIZE[1]) -@mapfile.dumpClassAs(QtGui.QPixmap, 'pixmap') -def dumpPixmap(pm): - buf = QtCore.QBuffer() - buf.open(buf.WriteOnly) - pm.save(buf, 'PNG') - data = str(buf.data()) - buf.close() - return {'png': base64.b64encode(data)} - -@mapfile.loadClassFrom('pixmap') -def loadPixmap(source): - pm = QtGui.QPixmap() - pm.loadFromData(base64.b64decode(source['png']), 'PNG') - return pm - @mapfile.dumpable('layer') class KPLayer(object): __dump_attribs__ = ('name', '_visible') |