Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-05-01 07:21:00 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-05-01 07:21:00 (GMT)
commite3dcaa8629a399628425d5485cecf9ea26bd2cd0 (patch)
treea4f863fc29ab9fe7642226466ca9d13dacdecd37
parent8957651e74154850c9caddb36339d5abe3ad9538 (diff)
Save/restore ctx in stateview
To not break other drawings Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--stateview.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/stateview.py b/stateview.py
index 894fff3..931ea3f 100644
--- a/stateview.py
+++ b/stateview.py
@@ -39,6 +39,7 @@ class StateView():
scale = float(self._svg_width) / float(self._cell_size)
print "scale", scale
+ ctx.save()
ctx.translate(self._x, self._y)
for n in range(cant_questions):
if n < replied_questions:
@@ -55,6 +56,7 @@ class StateView():
ctx.paint_with_alpha(0.25)
ctx.scale(scale, scale)
ctx.translate(self._cell_size, 0)
+ ctx.restore()
def main():