Mercurial > pygame
annotate docs/ref/rect.html @ 3172:d1b367fc08bc tests-returncode
Use a return code of 1 when the tests fail.
| author | Thomas Kluyver <takowl@gmail.com> |
|---|---|
| date | Wed, 09 Jan 2013 10:13:57 +0000 |
| parents | 0a3be7313aa4 |
| children |
| rev | line source |
|---|---|
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 627 | 3 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
4 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
5 <head> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
7 |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
8 <title>pygame.Rect — Pygame v1.9.2 documentation</title> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
9 <link rel="stylesheet" href="../_static/pygame.css" type="text/css" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
10 <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
11 <script type="text/javascript"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
12 var DOCUMENTATION_OPTIONS = { |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
13 URL_ROOT: '../', |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
14 VERSION: '1.9.2', |
| 2225 | 15 COLLAPSE_INDEX: false, |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
16 FILE_SUFFIX: '.html', |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
17 HAS_SOURCE: true |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
18 }; |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
19 </script> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
20 <script type="text/javascript" src="../_static/jquery.js"></script> |
| 2225 | 21 <script type="text/javascript" src="../_static/underscore.js"></script> |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
22 <script type="text/javascript" src="../_static/doctools.js"></script> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
23 <link rel="shortcut icon" href="../_static/pygame.ico"/> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
24 <link rel="top" title="Pygame v1.9.2 documentation" href="../index.html" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
25 <link rel="next" title="pygame.scrap" href="scrap.html" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
26 <link rel="prev" title="pygame" href="pygame.html" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
27 </head> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
28 <body> |
| 627 | 29 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
30 <div class="document"> |
| 627 | 31 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
32 <div class="header"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
33 <table> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
34 <tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
35 <td class="logo"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
36 <a href="http://www.pygame.org/"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
37 <img src="../_static/pygame_tiny.png"/> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
38 </a> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
39 <h5>pygame documentation</h5> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
40 </td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
41 <td class="pagelinks"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
42 <p class="top"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
43 || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
44 <a href="http://www.pygame.org/">Pygame Home</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
45 <a href="../index.html">Help Contents</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
46 <a href="../genindex.html">Reference Index</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
47 </p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
48 <p class="bottom"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
49 <a href="camera.html">camera</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
50 <a href="cdrom.html">cdrom</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
51 <a href="color.html">Color</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
52 <a href="cursors.html">cursors</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
53 <a href="display.html">display</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
54 <a href="draw.html">draw</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
55 <a href="event.html">event</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
56 <a href="examples.html">examples</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
57 <a href="font.html">font</a> || |
|
3065
0a3be7313aa4
Enable pygame._freetype extension module build by default
Lenard Lindstrom <len-l@telus.net>
parents:
2239
diff
changeset
|
58 <a href="freetype.html">freetype</a> || |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
59 <a href="gfxdraw.html">gfxdraw</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
60 <a href="image.html">image</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
61 <a href="joystick.html">joystick</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
62 <a href="key.html">key</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
63 <a href="locals.html">locals</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
64 <a href="mask.html">mask</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
65 <a href="math.html">math</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
66 <a href="midi.html">midi</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
67 <a href="mixer.html">mixer</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
68 <a href="mouse.html">mouse</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
69 <a href="movie.html">movie</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
70 <a href="music.html">music</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
71 <a href="overlay.html">Overlay</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
72 <a href="pixelarray.html">PixelArray</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
73 <a href="pixelcopy.html">pixelcopy</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
74 <a href="pygame.html">pygame</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
75 <a href="rect.html">Rect</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
76 <a href="scrap.html">scrap</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
77 <a href="sndarray.html">sndarray</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
78 <a href="sprite.html">sprite</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
79 <a href="surface.html">Surface</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
80 <a href="surfarray.html">surfarray</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
81 <a href="tests.html">tests</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
82 <a href="time.html">time</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
83 <a href="transform.html">transform</a> || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
84 <a href="pygame.html#module-pygame.version">version</a> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
85 </p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
86 </td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
87 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
88 </table> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
89 </div> |
| 627 | 90 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
91 <div class="documentwrapper"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
92 <div class="body"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
93 |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
94 <div class="sectionwrapper"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
95 <div class="section" id="pygame-rect"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
96 <dl class="definition class"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
97 <dt class="title" id="pygame.Rect"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
98 <em class="property">class </em><tt class="descclassname">pygame.</tt><tt class="descname">Rect</tt><a class="headerlink" href="#pygame.Rect" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
99 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
100 <div class="line"><span class="summaryline">pygame object for storing rectangular coordinates</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
101 <div class="line"><span class="signature">Rect(left, top, width, height) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
102 <div class="line"><span class="signature">Rect((left, top), (width, height)) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
103 <div class="line"><span class="signature">Rect(object) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
104 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
105 <table border="1" class="toc docutils"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
106 <colgroup> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
107 <col width="32%" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
108 <col width="1%" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
109 <col width="67%" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
110 </colgroup> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
111 <tbody valign="top"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
112 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.copy">pygame.Rect.copy</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
113 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
114 <td>copy the rectangle</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
115 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
116 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.move">pygame.Rect.move</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
117 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
118 <td>moves the rectangle</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
119 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
120 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.move_ip">pygame.Rect.move_ip</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
121 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
122 <td>moves the rectangle, in place</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
123 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
124 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.inflate">pygame.Rect.inflate</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
125 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
126 <td>grow or shrink the rectangle size</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
127 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
128 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.inflate_ip">pygame.Rect.inflate_ip</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
129 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
130 <td>grow or shrink the rectangle size, in place</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
131 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
132 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.clamp">pygame.Rect.clamp</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
133 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
134 <td>moves the rectangle inside another</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
135 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
136 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.clamp_ip">pygame.Rect.clamp_ip</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
137 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
138 <td>moves the rectangle inside another, in place</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
139 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
140 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.clip">pygame.Rect.clip</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
141 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
142 <td>crops a rectangle inside another</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
143 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
144 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.union">pygame.Rect.union</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
145 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
146 <td>joins two rectangles into one</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
147 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
148 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.union_ip">pygame.Rect.union_ip</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
149 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
150 <td>joins two rectangles into one, in place</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
151 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
152 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.unionall">pygame.Rect.unionall</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
153 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
154 <td>the union of many rectangles</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
155 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
156 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.unionall_ip">pygame.Rect.unionall_ip</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
157 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
158 <td>the union of many rectangles, in place</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
159 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
160 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.fit">pygame.Rect.fit</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
161 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
162 <td>resize and move a rectangle with aspect ratio</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
163 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
164 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.normalize">pygame.Rect.normalize</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
165 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
166 <td>correct negative sizes</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
167 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
168 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.contains">pygame.Rect.contains</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
169 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
170 <td>test if one rectangle is inside another</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
171 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
172 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.collidepoint">pygame.Rect.collidepoint</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
173 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
174 <td>test if a point is inside a rectangle</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
175 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
176 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.colliderect">pygame.Rect.colliderect</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
177 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
178 <td>test if two rectangles overlap</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
179 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
180 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.collidelist">pygame.Rect.collidelist</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
181 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
182 <td>test if one rectangle in a list intersects</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
183 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
184 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.collidelistall">pygame.Rect.collidelistall</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
185 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
186 <td>test if all rectangles in a list intersect</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
187 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
188 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.collidedict">pygame.Rect.collidedict</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
189 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
190 <td>test if one rectangle in a dictionary intersects</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
191 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
192 <tr><td><a class="toc reference external" href="rect.html#pygame.Rect.collidedictall">pygame.Rect.collidedictall</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
193 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
194 <td>test if all rectangles in a dictionary intersect</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
195 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
196 </tbody> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
197 </table> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
198 <p>Pygame uses Rect objects to store and manipulate rectangular areas. A Rect |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
199 can be created from a combination of left, top, width, and height values. |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
200 Rects can also be created from python objects that are already a Rect or |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
201 have an attribute named “rect”.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
202 <p>Any Pygame function that requires a Rect argument also accepts any of these |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
203 values to construct a Rect. This makes it easier to create Rects on the fly |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
204 as arguments to functions.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
205 <p>The Rect functions that change the position or size of a Rect return a new |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
206 copy of the Rect with the affected changes. The original Rect is not |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
207 modified. Some methods have an alternate “in-place” version that returns |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
208 None but effects the original Rect. These “in-place” methods are denoted |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
209 with the “ip” suffix.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
210 <p>The Rect object has several virtual attributes which can be used to move and |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
211 align the Rect:</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
212 <div class="highlight-python"><div class="highlight"><pre><span class="n">top</span><span class="p">,</span> <span class="n">left</span><span class="p">,</span> <span class="n">bottom</span><span class="p">,</span> <span class="n">right</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
213 <span class="n">topleft</span><span class="p">,</span> <span class="n">bottomleft</span><span class="p">,</span> <span class="n">topright</span><span class="p">,</span> <span class="n">bottomright</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
214 <span class="n">midtop</span><span class="p">,</span> <span class="n">midleft</span><span class="p">,</span> <span class="n">midbottom</span><span class="p">,</span> <span class="n">midright</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
215 <span class="n">center</span><span class="p">,</span> <span class="n">centerx</span><span class="p">,</span> <span class="n">centery</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
216 <span class="n">size</span><span class="p">,</span> <span class="n">width</span><span class="p">,</span> <span class="n">height</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
217 <span class="n">w</span><span class="p">,</span><span class="n">h</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
218 </pre></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
219 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
220 <p>All of these attributes can be assigned to:</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
221 <div class="highlight-python"><div class="highlight"><pre><span class="n">rect1</span><span class="o">.</span><span class="n">right</span> <span class="o">=</span> <span class="mi">10</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
222 <span class="n">rect2</span><span class="o">.</span><span class="n">center</span> <span class="o">=</span> <span class="p">(</span><span class="mi">20</span><span class="p">,</span><span class="mi">30</span><span class="p">)</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
223 </pre></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
224 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
225 <p>Assigning to size, width or height changes the dimensions of the rectangle; |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
226 all other assignments move the rectangle without resizing it. Notice that |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
227 some attributes are integers and others are pairs of integers.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
228 <p>If a Rect has a nonzero width or height, it will return True for a nonzero |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
229 test. Some methods return a Rect with 0 size to represent an invalid |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
230 rectangle.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
231 <p>The coordinates for Rect objects are all integers. The size values can be |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
232 programmed to have negative values, but these are considered illegal Rects |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
233 for most operations.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
234 <p>There are several collision tests between other rectangles. Most python |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
235 containers can be searched for collisions against a single Rect.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
236 <p>The area covered by a Rect does not include the right- and bottom-most edge |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
237 of pixels. If one Rect’s bottom border is another Rect’s top border (i.e., |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
238 rect1.bottom=rect2.top), the two meet exactly on the screen but do not |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
239 overlap, and <tt class="docutils literal"><span class="pre">rect1.colliderect(rect2)</span></tt> returns false.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
240 <p>Though Rect can be subclassed, methods that return new rectangles are not |
| 2225 | 241 subclass aware. That is, move or copy return a new <a class="tooltip reference internal" href="#pygame.Rect" title=""><tt class="xref py py-mod docutils literal"><span class="pre">pygame.Rect</span></tt><span class="tooltip-content">pygame object for storing rectangular coordinates</span></a> |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
242 instance, not an instance of the subclass. This may change. To make subclass |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
243 awareness work though, subclasses may have to maintain the same constructor |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
244 signature as Rect.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
245 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
246 <dt class="title" id="pygame.Rect.copy"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
247 <tt class="descname">copy</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.copy" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
248 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
249 <div class="line"><span class="summaryline">copy the rectangle</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
250 <div class="line"><span class="signature">copy() -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
251 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
252 <p>Returns a new rectangle having the same position and size as the orginal.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
253 <p>New in pygame 1.9</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
254 </dd></dl> |
| 627 | 255 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
256 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
257 <dt class="title" id="pygame.Rect.move"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
258 <tt class="descname">move</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.move" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
259 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
260 <div class="line"><span class="summaryline">moves the rectangle</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
261 <div class="line"><span class="signature">move(x, y) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
262 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
263 <p>Returns a new rectangle that is moved by the given offset. The x and y |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
264 arguments can be any integer value, positive or negative.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
265 </dd></dl> |
| 627 | 266 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
267 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
268 <dt class="title" id="pygame.Rect.move_ip"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
269 <tt class="descname">move_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.move_ip" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
270 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
271 <div class="line"><span class="summaryline">moves the rectangle, in place</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
272 <div class="line"><span class="signature">move_ip(x, y) -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
273 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
274 <p>Same as the <tt class="docutils literal"><span class="pre">Rect.move()</span></tt> method, but operates in place.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
275 </dd></dl> |
| 627 | 276 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
277 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
278 <dt class="title" id="pygame.Rect.inflate"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
279 <tt class="descname">inflate</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.inflate" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
280 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
281 <div class="line"><span class="summaryline">grow or shrink the rectangle size</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
282 <div class="line"><span class="signature">inflate(x, y) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
283 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
284 <p>Returns a new rectangle with the size changed by the given offset. The |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
285 rectangle remains centered around its current center. Negative values |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
286 will shrink the rectangle.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
287 </dd></dl> |
| 627 | 288 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
289 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
290 <dt class="title" id="pygame.Rect.inflate_ip"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
291 <tt class="descname">inflate_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.inflate_ip" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
292 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
293 <div class="line"><span class="summaryline">grow or shrink the rectangle size, in place</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
294 <div class="line"><span class="signature">inflate_ip(x, y) -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
295 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
296 <p>Same as the <tt class="docutils literal"><span class="pre">Rect.inflate()</span></tt> method, but operates in place.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
297 </dd></dl> |
| 627 | 298 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
299 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
300 <dt class="title" id="pygame.Rect.clamp"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
301 <tt class="descname">clamp</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.clamp" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
302 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
303 <div class="line"><span class="summaryline">moves the rectangle inside another</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
304 <div class="line"><span class="signature">clamp(Rect) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
305 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
306 <p>Returns a new rectangle that is moved to be completely inside the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
307 argument Rect. If the rectangle is too large to fit inside, it is |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
308 centered inside the argument Rect, but its size is not changed.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
309 </dd></dl> |
| 627 | 310 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
311 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
312 <dt class="title" id="pygame.Rect.clamp_ip"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
313 <tt class="descname">clamp_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.clamp_ip" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
314 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
315 <div class="line"><span class="summaryline">moves the rectangle inside another, in place</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
316 <div class="line"><span class="signature">clamp_ip(Rect) -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
317 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
318 <p>Same as the <tt class="docutils literal"><span class="pre">Rect.clamp()</span></tt> method, but operates in place.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
319 </dd></dl> |
| 627 | 320 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
321 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
322 <dt class="title" id="pygame.Rect.clip"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
323 <tt class="descname">clip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.clip" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
324 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
325 <div class="line"><span class="summaryline">crops a rectangle inside another</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
326 <div class="line"><span class="signature">clip(Rect) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
327 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
328 <p>Returns a new rectangle that is cropped to be completely inside the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
329 argument Rect. If the two rectangles do not overlap to begin with, a Rect |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
330 with 0 size is returned.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
331 </dd></dl> |
| 627 | 332 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
333 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
334 <dt class="title" id="pygame.Rect.union"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
335 <tt class="descname">union</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.union" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
336 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
337 <div class="line"><span class="summaryline">joins two rectangles into one</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
338 <div class="line"><span class="signature">union(Rect) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
339 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
340 <p>Returns a new rectangle that completely covers the area of the two |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
341 provided rectangles. There may be area inside the new Rect that is not |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
342 covered by the originals.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
343 </dd></dl> |
| 627 | 344 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
345 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
346 <dt class="title" id="pygame.Rect.union_ip"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
347 <tt class="descname">union_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.union_ip" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
348 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
349 <div class="line"><span class="summaryline">joins two rectangles into one, in place</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
350 <div class="line"><span class="signature">union_ip(Rect) -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
351 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
352 <p>Same as the <tt class="docutils literal"><span class="pre">Rect.union()</span></tt> method, but operates in place.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
353 </dd></dl> |
| 627 | 354 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
355 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
356 <dt class="title" id="pygame.Rect.unionall"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
357 <tt class="descname">unionall</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.unionall" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
358 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
359 <div class="line"><span class="summaryline">the union of many rectangles</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
360 <div class="line"><span class="signature">unionall(Rect_sequence) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
361 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
362 <p>Returns the union of one rectangle with a sequence of many rectangles.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
363 </dd></dl> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
364 |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
365 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
366 <dt class="title" id="pygame.Rect.unionall_ip"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
367 <tt class="descname">unionall_ip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.unionall_ip" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
368 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
369 <div class="line"><span class="summaryline">the union of many rectangles, in place</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
370 <div class="line"><span class="signature">unionall_ip(Rect_sequence) -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
371 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
372 <p>The same as the <tt class="docutils literal"><span class="pre">Rect.unionall()</span></tt> method, but operates in place.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
373 </dd></dl> |
| 627 | 374 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
375 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
376 <dt class="title" id="pygame.Rect.fit"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
377 <tt class="descname">fit</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.fit" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
378 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
379 <div class="line"><span class="summaryline">resize and move a rectangle with aspect ratio</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
380 <div class="line"><span class="signature">fit(Rect) -> Rect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
381 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
382 <p>Returns a new rectangle that is moved and resized to fit another. The |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
383 aspect ratio of the original Rect is preserved, so the new rectangle may |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
384 be smaller than the target in either width or height.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
385 </dd></dl> |
| 627 | 386 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
387 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
388 <dt class="title" id="pygame.Rect.normalize"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
389 <tt class="descname">normalize</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.normalize" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
390 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
391 <div class="line"><span class="summaryline">correct negative sizes</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
392 <div class="line"><span class="signature">normalize() -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
393 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
394 <p>This will flip the width or height of a rectangle if it has a negative |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
395 size. The rectangle will remain in the same place, with only the sides |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
396 swapped.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
397 </dd></dl> |
| 627 | 398 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
399 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
400 <dt class="title" id="pygame.Rect.contains"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
401 <tt class="descname">contains</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.contains" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
402 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
403 <div class="line"><span class="summaryline">test if one rectangle is inside another</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
404 <div class="line"><span class="signature">contains(Rect) -> bool</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
405 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
406 <p>Returns true when the argument is completely inside the Rect.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
407 </dd></dl> |
| 627 | 408 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
409 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
410 <dt class="title" id="pygame.Rect.collidepoint"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
411 <tt class="descname">collidepoint</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.collidepoint" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
412 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
413 <div class="line"><span class="summaryline">test if a point is inside a rectangle</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
414 <div class="line"><span class="signature">collidepoint(x, y) -> bool</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
415 <div class="line"><span class="signature">collidepoint((x,y)) -> bool</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
416 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
417 <p>Returns true if the given point is inside the rectangle. A point along |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
418 the right or bottom edge is not considered to be inside the rectangle.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
419 </dd></dl> |
| 627 | 420 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
421 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
422 <dt class="title" id="pygame.Rect.colliderect"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
423 <tt class="descname">colliderect</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.colliderect" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
424 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
425 <div class="line"><span class="summaryline">test if two rectangles overlap</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
426 <div class="line"><span class="signature">colliderect(Rect) -> bool</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
427 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
428 <p>Returns true if any portion of either rectangle overlap (except the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
429 top+bottom or left+right edges).</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
430 </dd></dl> |
| 627 | 431 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
432 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
433 <dt class="title" id="pygame.Rect.collidelist"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
434 <tt class="descname">collidelist</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.collidelist" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
435 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
436 <div class="line"><span class="summaryline">test if one rectangle in a list intersects</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
437 <div class="line"><span class="signature">collidelist(list) -> index</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
438 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
439 <p>Test whether the rectangle collides with any in a sequence of rectangles. |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
440 The index of the first collision found is returned. If no collisions are |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
441 found an index of -1 is returned.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
442 </dd></dl> |
| 627 | 443 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
444 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
445 <dt class="title" id="pygame.Rect.collidelistall"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
446 <tt class="descname">collidelistall</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.collidelistall" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
447 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
448 <div class="line"><span class="summaryline">test if all rectangles in a list intersect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
449 <div class="line"><span class="signature">collidelistall(list) -> indices</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
450 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
451 <p>Returns a list of all the indices that contain rectangles that collide |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
452 with the Rect. If no intersecting rectangles are found, an empty list is |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
453 returned.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
454 </dd></dl> |
| 627 | 455 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
456 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
457 <dt class="title" id="pygame.Rect.collidedict"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
458 <tt class="descname">collidedict</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.collidedict" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
459 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
460 <div class="line"><span class="summaryline">test if one rectangle in a dictionary intersects</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
461 <div class="line"><span class="signature">collidedict(dict) -> (key, value)</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
462 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
463 <p>Returns the key and value of the first dictionary value that collides |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
464 with the Rect. If no collisions are found, None is returned.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
465 <p>Rect objects are not hashable and cannot be used as keys in a dictionary, |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
466 only as values.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
467 </dd></dl> |
| 627 | 468 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
469 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
470 <dt class="title" id="pygame.Rect.collidedictall"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
471 <tt class="descname">collidedictall</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Rect.collidedictall" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
472 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
473 <div class="line"><span class="summaryline">test if all rectangles in a dictionary intersect</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
474 <div class="line"><span class="signature">collidedictall(dict) -> [(key, value), ...]</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
475 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
476 <p>Returns a list of all the key and value pairs that intersect with the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
477 Rect. If no collisions are found an empty dictionary is returned.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
478 <p>Rect objects are not hashable and cannot be used as keys in a dictionary, |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
479 only as values.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
480 </dd></dl> |
| 627 | 481 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
482 </dd></dl> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
483 |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
484 </div> |
| 627 | 485 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
486 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
487 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
488 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
489 <div class="clearer"></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
490 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
491 <div class="related"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
492 <h3>Navigation</h3> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
493 <ul> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
494 <li class="right" style="margin-right: 10px"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
495 <a href="../genindex.html" title="General Index" |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
496 accesskey="I">index</a></li> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
497 <li class="right" > |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
498 <a href="scrap.html" title="pygame.scrap" |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
499 accesskey="N">next</a> |</li> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
500 <li class="right" > |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
501 <a href="pygame.html" title="pygame" |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
502 accesskey="P">previous</a> |</li> |
|
2239
ca88e9308d44
regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents:
2225
diff
changeset
|
503 <li><a href="../index.html">Pygame v1.9.2 documentation</a> »</li> |
|
ca88e9308d44
regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents:
2225
diff
changeset
|
504 <script type="text/javascript" src="jquery.plugin.docscomments.js"></script> |
|
ca88e9308d44
regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents:
2225
diff
changeset
|
505 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
506 </ul> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
507 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
508 <div class="footer"> |
| 2225 | 509 © Copyright 2011, Pygame Developers. |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
510 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
511 </body> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2148
diff
changeset
|
512 </html> |
