OSDN Git Service

save/load position of background tile correctly
authorMartin Renold <martinxyz@gmx.ch>
Sat, 5 Sep 2009 17:24:16 +0000 (19:24 +0200)
committerMartin Renold <martinxyz@gmx.ch>
Sat, 5 Sep 2009 17:24:16 +0000 (19:24 +0200)
lib/document.py

index 44d2d6d..159acb4 100644 (file)
@@ -344,7 +344,7 @@ class Document():
         l = add_layer(0, 0, 1.0, s.pixbuf, 'data/background.png')
         bg = self.background
         x, y, w, h = bg.get_pattern_bbox()
-        pixbuf = pixbufsurface.render_as_pixbuf(bg, x, y, w, h, alpha=False)
+        pixbuf = pixbufsurface.render_as_pixbuf(bg, x+x0, y+y0, w, h, alpha=False)
         store_pixbuf(pixbuf, 'data/background_tile.png')
         l.attrib['background_tile'] = 'data/background_tile.png'