Mercurial > pygame
annotate docs/ref/mask.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:
2169
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:
2169
diff
changeset
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
3 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
diff
changeset
|
5 <head> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
diff
changeset
|
7 |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
8 <title>pygame.mask — Pygame v1.9.2 documentation</title> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
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:
2169
diff
changeset
|
11 <script type="text/javascript"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
12 var DOCUMENTATION_OPTIONS = { |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
13 URL_ROOT: '../', |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
diff
changeset
|
16 FILE_SUFFIX: '.html', |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
17 HAS_SOURCE: true |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
18 }; |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
19 </script> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
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:
2169
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:
2169
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:
2169
diff
changeset
|
25 <link rel="next" title="pygame.math" href="math.html" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
26 <link rel="prev" title="pygame.locals" href="locals.html" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
27 </head> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
28 <body> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
29 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
30 <div class="document"> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
31 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
32 <div class="header"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
33 <table> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
34 <tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
35 <td class="logo"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
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:
2169
diff
changeset
|
38 </a> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
39 <h5>pygame documentation</h5> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
40 </td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
41 <td class="pagelinks"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
42 <p class="top"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
43 || |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
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:
2169
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:
2169
diff
changeset
|
47 </p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
48 <p class="bottom"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
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:
2169
diff
changeset
|
85 </p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
86 </td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
87 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
88 </table> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
89 </div> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
90 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
91 <div class="documentwrapper"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
92 <div class="body"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
93 |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
94 <div class="sectionwrapper"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
95 <div class="section" id="module-pygame.mask"> |
| 2225 | 96 <span id="pygame-mask"></span><dl class="definition module"> |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
97 <dt class="title module"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
98 <tt class="docutils literal"><span class="pre">pygame.mask</span></tt></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
diff
changeset
|
100 <div class="line"><span class="summaryline">pygame module for image masks.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
101 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
102 <table border="1" class="toc docutils"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
103 <colgroup> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
104 <col width="35%" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
105 <col width="1%" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
106 <col width="64%" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
107 </colgroup> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
108 <tbody valign="top"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
109 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.from_surface">pygame.mask.from_surface</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
110 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
111 <td>Returns a Mask from the given surface.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
112 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
113 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.from_threshold">pygame.mask.from_threshold</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
114 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
115 <td>Creates a mask by thresholding Surfaces</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
116 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
117 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask">pygame.mask.Mask</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
118 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
119 <td>pygame object for representing 2d bitmasks</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
120 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
121 </tbody> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
122 </table> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
123 <p>Useful for fast pixel perfect collision detection. A Mask uses 1bit per pixel |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
124 to store which parts collide.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
125 <p>New in pygame 1.8.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
126 <dl class="definition function"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
127 <dt class="title" id="pygame.mask.from_surface"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
128 <tt class="descclassname">pygame.mask.</tt><tt class="descname">from_surface</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.from_surface" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
129 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
130 <div class="line"><span class="summaryline">Returns a Mask from the given surface.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
131 <div class="line"><span class="signature">from_surface(Surface, threshold = 127) -> Mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
132 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
133 <p>Makes the transparent parts of the Surface not set, and the opaque parts |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
134 set.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
135 <p>The alpha of each pixel is checked to see if it is greater than the given |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
136 threshold.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
137 <p>If the Surface is color keyed, then threshold is not used.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
138 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
139 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
140 <dl class="definition function"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
141 <dt class="title" id="pygame.mask.from_threshold"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
142 <tt class="descclassname">pygame.mask.</tt><tt class="descname">from_threshold</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.from_threshold" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
143 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
144 <div class="line"><span class="summaryline">Creates a mask by thresholding Surfaces</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
145 <div class="line"><span class="signature">from_threshold(Surface, color, threshold = (0,0,0,255), othersurface = None, palette_colors = 1) -> Mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
146 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
147 <p>This is a more featureful method of getting a Mask from a Surface. If |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
148 supplied with only one Surface, all pixels within the threshold of the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
149 supplied color are set in the Mask. If given the optional othersurface, all |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
150 pixels in Surface that are within the threshold of the corresponding pixel |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
151 in othersurface are set in the Mask.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
152 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
153 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
154 <dl class="definition class"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
155 <dt class="title" id="pygame.mask.Mask"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
156 <em class="property">class </em><tt class="descclassname">pygame.mask.</tt><tt class="descname">Mask</tt><a class="headerlink" href="#pygame.mask.Mask" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
157 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
158 <div class="line"><span class="summaryline">pygame object for representing 2d bitmasks</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
159 <div class="line"><span class="signature">Mask((width, height)) -> Mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
160 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
161 <table border="1" class="toc docutils"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
162 <colgroup> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
163 <col width="24%" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
164 <col width="1%" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
165 <col width="75%" /> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
166 </colgroup> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
167 <tbody valign="top"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
168 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.get_size">pygame.mask.Mask.get_size</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
169 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
170 <td>Returns the size of the mask.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
171 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
172 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.get_at">pygame.mask.Mask.get_at</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
173 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
174 <td>Returns nonzero if the bit at (x,y) is set.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
175 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
176 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.set_at">pygame.mask.Mask.set_at</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
177 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
178 <td>Sets the position in the mask given by x and y.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
179 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
180 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.overlap">pygame.mask.Mask.overlap</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
181 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
182 <td>Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
183 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
184 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.overlap_area">pygame.mask.Mask.overlap_area</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
185 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
186 <td>Returns the number of overlapping ‘pixels’.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
187 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
188 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.overlap_mask">pygame.mask.Mask.overlap_mask</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
189 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
190 <td>Returns a mask of the overlapping pixels</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
191 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
192 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.fill">pygame.mask.Mask.fill</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
193 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
194 <td>Sets all bits to 1</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
195 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
196 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.clear">pygame.mask.Mask.clear</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
197 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
198 <td>Sets all bits to 0</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
199 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
200 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.invert">pygame.mask.Mask.invert</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
201 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
202 <td>Flips the bits in a Mask</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
203 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
204 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.scale">pygame.mask.Mask.scale</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
205 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
206 <td>Resizes a mask</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
207 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
208 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.draw">pygame.mask.Mask.draw</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
209 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
210 <td>Draws a mask onto another</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
211 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
212 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.erase">pygame.mask.Mask.erase</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
213 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
214 <td>Erases a mask from another</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
215 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
216 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.count">pygame.mask.Mask.count</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
217 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
218 <td>Returns the number of set pixels</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
219 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
220 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.centroid">pygame.mask.Mask.centroid</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
221 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
222 <td>Returns the centroid of the pixels in a Mask</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
223 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
224 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.angle">pygame.mask.Mask.angle</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
225 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
226 <td>Returns the orientation of the pixels</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
227 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
228 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.outline">pygame.mask.Mask.outline</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
229 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
230 <td>list of points outlining an object</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
231 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
232 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.convolve">pygame.mask.Mask.convolve</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
233 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
234 <td>Return the convolution of self with another mask.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
235 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
236 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.connected_component">pygame.mask.Mask.connected_component</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
237 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
238 <td>Returns a mask of a connected region of pixels.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
239 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
240 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.connected_components">pygame.mask.Mask.connected_components</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
241 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
242 <td>Returns a list of masks of connected regions of pixels.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
243 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
244 <tr><td><a class="toc reference external" href="mask.html#pygame.mask.Mask.get_bounding_rects">pygame.mask.Mask.get_bounding_rects</a></td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
245 <td>—</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
246 <td>Returns a list of bounding rects of regions of set pixels.</td> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
247 </tr> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
248 </tbody> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
249 </table> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
250 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
251 <dt class="title" id="pygame.mask.Mask.get_size"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
252 <tt class="descname">get_size</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.get_size" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
253 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
254 <div class="line"><span class="summaryline">Returns the size of the mask.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
255 <div class="line"><span class="signature">get_size() -> width,height</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
256 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
257 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
258 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
259 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
260 <dt class="title" id="pygame.mask.Mask.get_at"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
261 <tt class="descname">get_at</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.get_at" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
262 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
263 <div class="line"><span class="summaryline">Returns nonzero if the bit at (x,y) is set.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
264 <div class="line"><span class="signature">get_at((x,y)) -> int</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
265 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
266 <p>Coordinates start at (0,0) is top left - just like Surfaces.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
267 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
268 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
269 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
270 <dt class="title" id="pygame.mask.Mask.set_at"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
271 <tt class="descname">set_at</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.set_at" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
272 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
273 <div class="line"><span class="summaryline">Sets the position in the mask given by x and y.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
274 <div class="line"><span class="signature">set_at((x,y),value) -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
275 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
276 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
277 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
278 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
279 <dt class="title" id="pygame.mask.Mask.overlap"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
280 <tt class="descname">overlap</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.overlap" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
281 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
282 <div class="line"><span class="summaryline">Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
283 <div class="line"><span class="signature">overlap(othermask, offset) -> x,y</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
284 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
285 <p>The overlap tests uses the following offsets (which may be negative):</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
286 <div class="highlight-python"><pre>+----+----------.. |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
287 |A | yoffset |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
288 | +-+----------.. |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
289 +--|B |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
290 |xoffset |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
291 | | |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
292 : :</pre> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
293 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
294 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
295 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
296 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
297 <dt class="title" id="pygame.mask.Mask.overlap_area"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
298 <tt class="descname">overlap_area</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.overlap_area" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
299 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
300 <div class="line"><span class="summaryline">Returns the number of overlapping ‘pixels’.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
301 <div class="line"><span class="signature">overlap_area(othermask, offset) -> numpixels</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
302 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
303 <p>You can see how many pixels overlap with the other mask given. This can |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
304 be used to see in which direction things collide, or to see how much the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
305 two masks collide. An approximate collision normal can be found by |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
306 calculating the gradient of the overlap area through the finite |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
307 difference.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
308 <div class="highlight-python"><div class="highlight"><pre><span class="n">dx</span> <span class="o">=</span> <span class="n">Mask</span><span class="o">.</span><span class="n">overlap_area</span><span class="p">(</span><span class="n">othermask</span><span class="p">,(</span><span class="n">x</span><span class="o">+</span><span class="mi">1</span><span class="p">,</span><span class="n">y</span><span class="p">))</span> <span class="o">-</span> <span class="n">Mask</span><span class="o">.</span><span class="n">overlap_area</span><span class="p">(</span><span class="n">othermask</span><span class="p">,(</span><span class="n">x</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="n">y</span><span class="p">))</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
309 <span class="n">dy</span> <span class="o">=</span> <span class="n">Mask</span><span class="o">.</span><span class="n">overlap_area</span><span class="p">(</span><span class="n">othermask</span><span class="p">,(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="o">+</span><span class="mi">1</span><span class="p">))</span> <span class="o">-</span> <span class="n">Mask</span><span class="o">.</span><span class="n">overlap_area</span><span class="p">(</span><span class="n">othermask</span><span class="p">,(</span><span class="n">x</span><span class="p">,</span><span class="n">y</span><span class="o">-</span><span class="mi">1</span><span class="p">))</span> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
310 </pre></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
311 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
312 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
313 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
314 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
315 <dt class="title" id="pygame.mask.Mask.overlap_mask"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
316 <tt class="descname">overlap_mask</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.overlap_mask" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
317 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
318 <div class="line"><span class="summaryline">Returns a mask of the overlapping pixels</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
319 <div class="line"><span class="signature">overlap_mask(othermask, offset) -> Mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
320 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
321 <p>Returns a Mask the size of the original Mask containing only the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
322 overlapping pixels between Mask and othermask.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
323 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
324 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
325 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
326 <dt class="title" id="pygame.mask.Mask.fill"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
327 <tt class="descname">fill</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.fill" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
328 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
329 <div class="line"><span class="summaryline">Sets all bits to 1</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
330 <div class="line"><span class="signature">fill() -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
331 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
332 <p>Sets all bits in a Mask to 1.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
333 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
334 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
335 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
336 <dt class="title" id="pygame.mask.Mask.clear"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
337 <tt class="descname">clear</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.clear" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
338 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
339 <div class="line"><span class="summaryline">Sets all bits to 0</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
340 <div class="line"><span class="signature">clear() -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
341 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
342 <p>Sets all bits in a Mask to 0.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
343 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
344 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
345 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
346 <dt class="title" id="pygame.mask.Mask.invert"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
347 <tt class="descname">invert</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.invert" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
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:
2169
diff
changeset
|
349 <div class="line"><span class="summaryline">Flips the bits in a Mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
350 <div class="line"><span class="signature">invert() -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
351 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
352 <p>Flips all of the bits in a Mask, so that the set pixels turn to unset |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
353 pixels and the unset pixels turn to set pixels.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
354 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
355 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
356 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
357 <dt class="title" id="pygame.mask.Mask.scale"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
358 <tt class="descname">scale</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.scale" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
359 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
360 <div class="line"><span class="summaryline">Resizes a mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
361 <div class="line"><span class="signature">scale((x, y)) -> Mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
362 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
363 <p>Returns a new Mask of the Mask scaled to the requested size.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
364 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
365 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
366 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
367 <dt class="title" id="pygame.mask.Mask.draw"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
368 <tt class="descname">draw</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.draw" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
369 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
370 <div class="line"><span class="summaryline">Draws a mask onto another</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
371 <div class="line"><span class="signature">draw(othermask, offset) -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
372 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
373 <p>Performs a bitwise <tt class="docutils literal"><span class="pre">OR</span></tt>, drawing othermask onto Mask.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
374 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
375 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
376 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
377 <dt class="title" id="pygame.mask.Mask.erase"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
378 <tt class="descname">erase</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.erase" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
379 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
380 <div class="line"><span class="summaryline">Erases a mask from another</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
381 <div class="line"><span class="signature">erase(othermask, offset) -> None</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
382 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
383 <p>Erases all pixels set in othermask from Mask.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
384 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
385 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
386 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
387 <dt class="title" id="pygame.mask.Mask.count"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
388 <tt class="descname">count</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.count" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
389 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
390 <div class="line"><span class="summaryline">Returns the number of set pixels</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
391 <div class="line"><span class="signature">count() -> pixels</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
392 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
393 <p>Returns the number of set pixels in the Mask.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
394 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
395 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
396 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
397 <dt class="title" id="pygame.mask.Mask.centroid"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
398 <tt class="descname">centroid</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.centroid" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
399 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
400 <div class="line"><span class="summaryline">Returns the centroid of the pixels in a Mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
401 <div class="line"><span class="signature">centroid() -> (x, y)</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
402 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
403 <p>Finds the centroid, the center of pixel mass, of a Mask. Returns a |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
404 coordinate tuple for the centroid of the Mask. In the event the Mask is |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
405 empty, it will return (0,0).</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
406 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
407 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
408 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
409 <dt class="title" id="pygame.mask.Mask.angle"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
410 <tt class="descname">angle</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.angle" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
411 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
412 <div class="line"><span class="summaryline">Returns the orientation of the pixels</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
413 <div class="line"><span class="signature">angle() -> theta</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
414 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
415 <p>Finds the approximate orientation of the pixels in the image from -90 to |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
416 90 degrees. This works best if performed on one connected component of |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
417 pixels. It will return 0.0 on an empty Mask.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
418 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
419 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
420 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
421 <dt class="title" id="pygame.mask.Mask.outline"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
422 <tt class="descname">outline</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.outline" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
423 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
424 <div class="line"><span class="summaryline">list of points outlining an object</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
425 <div class="line"><span class="signature">outline(every = 1) -> [(x,y), (x,y) ...]</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
426 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
427 <p>Returns a list of points of the outline of the first object it comes |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
428 across in a Mask. For this to be useful, there should probably only be |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
429 one connected component of pixels in the Mask. The every option allows |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
430 you to skip pixels in the outline. For example, setting it to 10 would |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
431 return a list of every 10th pixel in the outline.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
432 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
433 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
434 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
435 <dt class="title" id="pygame.mask.Mask.convolve"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
436 <tt class="descname">convolve</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.convolve" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
437 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
438 <div class="line"><span class="summaryline">Return the convolution of self with another mask.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
439 <div class="line"><span class="signature">convolve(othermask, outputmask = None, offset = (0,0)) -> Mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
440 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
441 <p>Returns a mask with the (i-offset[0],j-offset[1]) bit set if shifting |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
442 othermask so that it’s lower right corner pixel is at (i,j) would cause |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
443 it to overlap with self.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
444 <p>If an outputmask is specified, the output is drawn onto outputmask and |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
445 outputmask is returned. Otherwise a mask of size <tt class="docutils literal"><span class="pre">self.get_size()</span></tt> + |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
446 <tt class="docutils literal"><span class="pre">othermask.get_size()</span></tt> - (1,1) is created.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
447 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
448 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
449 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
450 <dt class="title" id="pygame.mask.Mask.connected_component"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
451 <tt class="descname">connected_component</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.connected_component" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
452 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
453 <div class="line"><span class="summaryline">Returns a mask of a connected region of pixels.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
454 <div class="line"><span class="signature">connected_component((x,y) = None) -> Mask</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
455 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
456 <p>This uses the <tt class="docutils literal"><span class="pre">SAUF</span></tt> algorithm to find a connected component in the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
457 Mask. It checks 8 point connectivity. By default, it will return the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
458 largest connected component in the image. Optionally, a coordinate pair |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
459 of a pixel can be specified, and the connected component containing it |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
460 will be returned. In the event the pixel at that location is not set, the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
461 returned Mask will be empty. The Mask returned is the same size as the |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
462 original Mask.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
463 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
464 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
465 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
466 <dt class="title" id="pygame.mask.Mask.connected_components"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
467 <tt class="descname">connected_components</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.connected_components" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
468 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
469 <div class="line"><span class="summaryline">Returns a list of masks of connected regions of pixels.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
470 <div class="line"><span class="signature">connected_components(min = 0) -> [Masks]</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
471 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
472 <p>Returns a list of masks of connected regions of pixels. An optional |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
473 minimum number of pixels per connected region can be specified to filter |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
474 out noise.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
475 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
476 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
477 <dl class="definition method"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
478 <dt class="title" id="pygame.mask.Mask.get_bounding_rects"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
479 <tt class="descname">get_bounding_rects</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.mask.Mask.get_bounding_rects" title="Permalink to this definition">¶</a></dt> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
480 <dd><div class="line-block"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
481 <div class="line"><span class="summaryline">Returns a list of bounding rects of regions of set pixels.</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
482 <div class="line"><span class="signature">get_bounding_rects() -> Rects</span></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
483 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
484 <p>This gets a bounding rect of connected regions of set pixels. A bounding |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
485 rect is one for which each of the connected pixels is inside the rect.</p> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
486 </dd></dl> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
487 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
488 </dd></dl> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
489 |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
490 </dd></dl> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
491 |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
492 </div> |
|
1553
ebd545641c8b
merging with python3 branch r 2048
Lenard Lindstrom <len-l@telus.net>
parents:
1548
diff
changeset
|
493 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
494 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
495 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
496 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
497 <div class="clearer"></div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
498 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
499 <div class="related"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
500 <h3>Navigation</h3> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
501 <ul> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
502 <li class="right" style="margin-right: 10px"> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
503 <a href="../genindex.html" title="General Index" |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
504 accesskey="I">index</a></li> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
505 <li class="right" > |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
506 <a href="math.html" title="pygame.math" |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
507 accesskey="N">next</a> |</li> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
508 <li class="right" > |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
509 <a href="locals.html" title="pygame.locals" |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
510 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
|
511 <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
|
512 <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
|
513 |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
514 </ul> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
515 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
516 <div class="footer"> |
| 2225 | 517 © Copyright 2011, Pygame Developers. |
|
2198
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
518 </div> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
519 </body> |
|
da4302429d3b
replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents:
2169
diff
changeset
|
520 </html> |
