diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-05-01 07:21:00 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-05-01 07:21:00 (GMT) |
commit | e3dcaa8629a399628425d5485cecf9ea26bd2cd0 (patch) | |
tree | a4f863fc29ab9fe7642226466ca9d13dacdecd37 | |
parent | 8957651e74154850c9caddb36339d5abe3ad9538 (diff) |
Save/restore ctx in stateview
To not break other drawings
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | stateview.py | 2 |
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(): |