Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/character.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-04-22 05:54:21 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-04-22 05:54:21 (GMT)
commita5f98d90dc9f6de8bd00c50527ae03e5d80a1699 (patch)
tree7b9ea94cd5dc9951fc3c3b171ec775c6ba303b64 /character.py
parente11a9e2376758f6b58adcf14c84c068ba616c491 (diff)
Add a rectangle around the character to debug the drawing
This patch is only for debug, we will remove it later. Sibgned-of-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'character.py')
-rw-r--r--character.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/character.py b/character.py
index 9490f75..cf3c2ce 100644
--- a/character.py
+++ b/character.py
@@ -90,6 +90,13 @@ class Character(object):
# draw char
dx, dy = self.pos[0], \
self.pos[1] - self.sprite.cel_height + 10
+
+ # for debug write a rectangle around
+ context.rectangle(dx, dy, self.sprite.cel_width, self.sprite.cel_height)
+ stroke = (0, 0, 0)
+ context.set_source_rgb(*stroke)
+ context.stroke()
+
self.sprite.draw(context, dx, dy)