gasp-dev team mailing list archive
-
gasp-dev team
-
Mailing list archive
-
Message #00105
[Question #102134]: Wrong output despite the code being right
Question #102134 on GASP Core changed:
https://answers.launchpad.net/gasp-core/+question/102134
Description changed to:
I'm working on windows XP, and i'm using python v2.6.4, pygame v1.9.1,
python-gasp v0.2beta1
This is a simple function in file <i>house.py</i>
<code>
from gasp import *
def drawHouse(x,y):
Box((x,y),100,100, filled=True, color=color.BLUE) # The big box
Box((35+x,y),30,50, filled=True, color=color.GREEN) # Door
Box((10+x,60+y),20,20, filled=True, color=color.YELLOW) # Window
Box((70+x,60+y),20,20, filled=True, color=color.YELLOW) # Window
Polygon([(x,100+y),(50+x,140+y),(100+x,100+y)],filled=True, color=color.RED) # Top
</code>
I use this function in file <i>houses.py</i>
<code>
from gasp import *
from house import *
begin_graphics(height=460, width=560, title='Houses at Night',
background=color.BLACK)
drawHouse(20,20)
drawHouse(230,20)
drawHouse(440,20)
drawHouse(125,160)
drawHouse(335,160)
drawHouse(230,300)
update_when('key_pressed')
end_graphics()
</code>
Now the output should look like the image at the bottom of this page
http://openbookproject.net/thinkCSpy/ch04.html
Each house displays fine individually but together they dont. Windows and doors are not displayed on many houses.
Thanks in advance
--
You received this question notification because you are a member of GASP
Development Team, which is an answer contact for GASP Core.