diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-05-06 03:57:04 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-05-06 03:57:04 (GMT) |
commit | d5da0a7254936f96e9382730e48ca336bd3d7217 (patch) | |
tree | d4bab2b0f658157daf2bc302ab6a8d8e6797362b /character.py | |
parent | a5635666753a3ac266664c9dd85f812f50d81cff (diff) |
Add save/restore context commands to isolate different drawings
No real change, is only to avoid future problems.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'character.py')
-rw-r--r-- | character.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/character.py b/character.py index a4daa5c..12c1e8e 100644 --- a/character.py +++ b/character.py @@ -114,6 +114,7 @@ class Character(object): def draw(self, context): # draw char dx, dy = self.pos[0], self.pos[1] - self.sprite.cel_height + 10 + context.save() # for debug write a rectangle around context.rectangle(dx, dy, self.sprite.cel_width, @@ -123,6 +124,7 @@ class Character(object): context.stroke() self.sprite.draw(context, dx, dy) + context.restore() def main(): |