~ubuntu-branches/ubuntu/karmic/pygame/karmic

« back to all changes in this revision

Viewing changes to docs/tut/chimp/chimp.py.html

  • Committer: Bazaar Package Importer
  • Author(s): Joe Wreschnig
  • Date: 2005-09-15 15:10:45 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050915151045-6j7tiaorbf42xqia
Tags: 1.7.1release-1
* New upstream release.
* Remove 64-bit patch from 1.6-0.2, merged upstream.
* Remove SMPEG detection patch from 1.4-1, no longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
        <font color="#a52a2a"><b>else</b></font>:
118
118
            rotate = pygame.transform.rotate
119
119
            self.image = rotate(self.original, self.dizzy)
120
 
        self.rect = self.image.get_rect()
121
 
        self.rect.center = center
 
120
        self.rect = self.image.get_rect(center=center)
122
121
 
123
122
    <font color="#a52a2a"><b>def</b></font> <font color="#008b8b">punched</font>(self):
124
123
        &quot;<font color="#ff00ff">this will cause the monkey to start spinning</font>&quot;
146
145
    <font color="#a52a2a"><b>if</b></font> pygame.font:
147
146
        font = pygame.font.Font(None, 36)
148
147
        text = font.render(&quot;<font color="#ff00ff">Pummel The Chimp, And Win $$$</font>&quot;, 1, (10, 10, 10))
149
 
        textpos = text.get_rect()
150
 
        textpos.centerx = background.get_rect().centerx
 
148
        textpos = text.get_rect(centerx=background.get_width()/2)
151
149
        background.blit(text, textpos)
152
150
 
153
151
<font color="#0000ff">#Display The Background</font>