annotate docs/ref/surface.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
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: 2166
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
3
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
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: 2166
diff changeset
5 <head>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
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: 2166
diff changeset
7
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
8 <title>pygame.Surface &mdash; Pygame v1.9.2 documentation</title>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
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: 2166
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: 2166
diff changeset
11 <script type="text/javascript">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
12 var DOCUMENTATION_OPTIONS = {
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
13 URL_ROOT: '../',
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
14 VERSION: '1.9.2',
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
15 COLLAPSE_INDEX: false,
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
16 FILE_SUFFIX: '.html',
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
17 HAS_SOURCE: true
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
18 };
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
19 </script>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
20 <script type="text/javascript" src="../_static/jquery.js"></script>
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
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: 2166
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: 2166
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: 2166
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: 2166
diff changeset
25 <link rel="next" title="pygame.surfarray" href="surfarray.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
26 <link rel="prev" title="pygame.sprite" href="sprite.html" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
27 </head>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
28 <body>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
29
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
30 <div class="document">
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
31
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
32 <div class="header">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
33 <table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
34 <tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
35 <td class="logo">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
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: 2166
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: 2166
diff changeset
38 </a>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
39 <h5>pygame documentation</h5>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
40 </td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
41 <td class="pagelinks">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
42 <p class="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
43 ||
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
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: 2166
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: 2166
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: 2166
diff changeset
47 </p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
48 <p class="bottom">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2244
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
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: 2166
diff changeset
85 </p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
86 </td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
87 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
88 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
89 </div>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
90
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
91 <div class="documentwrapper">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
92 <div class="body">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
93
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
94 <div class="sectionwrapper">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
95 <div class="section" id="pygame-surface">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
96 <dl class="definition class">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
97 <dt class="title" id="pygame.Surface">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
98 <em class="property">class </em><tt class="descclassname">pygame.</tt><tt class="descname">Surface</tt><a class="headerlink" href="#pygame.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: 2166
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: 2166
diff changeset
100 <div class="line"><span class="summaryline">pygame object for representing images</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
101 <div class="line"><span class="signature">Surface((width, height), flags=0, depth=0, masks=None) -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
102 <div class="line"><span class="signature">Surface((width, height), flags=0, Surface) -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
103 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
104 <table border="1" class="toc docutils">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
105 <colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
106 <col width="28%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
107 <col width="1%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
108 <col width="71%" />
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
109 </colgroup>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
110 <tbody valign="top">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
111 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.blit">pygame.Surface.blit</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
112 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
113 <td>draw one image onto another</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
114 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
115 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.convert">pygame.Surface.convert</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
116 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
117 <td>change the pixel format of an image</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
118 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
119 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.convert_alpha">pygame.Surface.convert_alpha</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
120 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
121 <td>change the pixel format of an image including per pixel alphas</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
122 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
123 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.copy">pygame.Surface.copy</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
124 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
125 <td>create a new copy of a Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
126 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
127 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.fill">pygame.Surface.fill</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
128 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
129 <td>fill Surface with a solid color</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
130 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
131 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.scroll">pygame.Surface.scroll</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
132 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
133 <td>Shift the surface image in place</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
134 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
135 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.set_colorkey">pygame.Surface.set_colorkey</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
136 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
137 <td>Set the transparent colorkey</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
138 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
139 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_colorkey">pygame.Surface.get_colorkey</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
140 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
141 <td>Get the current transparent colorkey</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
142 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
143 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.set_alpha">pygame.Surface.set_alpha</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
144 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
145 <td>set the alpha value for the full Surface image</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
146 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
147 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_alpha">pygame.Surface.get_alpha</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
148 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
149 <td>get the current Surface transparency value</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
150 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
151 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.lock">pygame.Surface.lock</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
152 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
153 <td>lock the Surface memory for pixel access</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
154 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
155 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.unlock">pygame.Surface.unlock</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
156 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
157 <td>unlock the Surface memory from pixel access</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
158 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
159 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.mustlock">pygame.Surface.mustlock</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
160 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
161 <td>test if the Surface requires locking</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
162 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
163 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_locked">pygame.Surface.get_locked</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
164 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
165 <td>test if the Surface is current locked</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
166 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
167 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_locks">pygame.Surface.get_locks</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
168 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
169 <td>Gets the locks for the Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
170 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
171 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_at">pygame.Surface.get_at</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
172 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
173 <td>get the color value at a single pixel</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
174 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
175 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.set_at">pygame.Surface.set_at</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
176 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
177 <td>set the color value for a single pixel</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
178 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
179 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_at_mapped">pygame.Surface.get_at_mapped</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
180 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
181 <td>get the mapped color value at a single pixel</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
182 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
183 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_palette">pygame.Surface.get_palette</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
184 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
185 <td>get the color index palette for an 8bit Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
186 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
187 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_palette_at">pygame.Surface.get_palette_at</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
188 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
189 <td>get the color for a single entry in a palette</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
190 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
191 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.set_palette">pygame.Surface.set_palette</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
192 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
193 <td>set the color palette for an 8bit Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
194 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
195 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.set_palette_at">pygame.Surface.set_palette_at</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
196 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
197 <td>set the color for a single index in an 8bit Surface palette</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
198 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
199 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.map_rgb">pygame.Surface.map_rgb</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
200 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
201 <td>convert a color into a mapped color value</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
202 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
203 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.unmap_rgb">pygame.Surface.unmap_rgb</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
204 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
205 <td>convert a mapped integer color value into a Color</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
206 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
207 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.set_clip">pygame.Surface.set_clip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
208 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
209 <td>set the current clipping area of the Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
210 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
211 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_clip">pygame.Surface.get_clip</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
212 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
213 <td>get the current clipping area of the Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
214 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
215 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.subsurface">pygame.Surface.subsurface</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
216 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
217 <td>create a new surface that references its parent</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
218 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
219 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_parent">pygame.Surface.get_parent</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
220 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
221 <td>find the parent of a subsurface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
222 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
223 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_abs_parent">pygame.Surface.get_abs_parent</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
224 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
225 <td>find the top level parent of a subsurface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
226 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
227 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_offset">pygame.Surface.get_offset</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
228 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
229 <td>find the position of a child subsurface inside a parent</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
230 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
231 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_abs_offset">pygame.Surface.get_abs_offset</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
232 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
233 <td>find the absolute position of a child subsurface inside its top level parent</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
234 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
235 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_size">pygame.Surface.get_size</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
236 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
237 <td>get the dimensions of the Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
238 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
239 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_width">pygame.Surface.get_width</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
240 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
241 <td>get the width of the Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
242 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
243 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_height">pygame.Surface.get_height</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
244 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
245 <td>get the height of the Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
246 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
247 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_rect">pygame.Surface.get_rect</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
248 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
249 <td>get the rectangular area of the Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
250 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
251 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_bitsize">pygame.Surface.get_bitsize</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
252 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
253 <td>get the bit depth of the Surface pixel format</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
254 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
255 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_bytesize">pygame.Surface.get_bytesize</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
256 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
257 <td>get the bytes used per Surface pixel</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
258 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
259 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_flags">pygame.Surface.get_flags</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
260 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
261 <td>get the additional flags used for the Surface</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
262 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
263 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_pitch">pygame.Surface.get_pitch</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
264 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
265 <td>get the number of bytes used per Surface row</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
266 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
267 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_masks">pygame.Surface.get_masks</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
268 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
269 <td>the bitmasks needed to convert between a color and a mapped integer</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
270 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
271 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.set_masks">pygame.Surface.set_masks</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
272 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
273 <td>set the bitmasks needed to convert between a color and a mapped integer</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
274 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
275 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_shifts">pygame.Surface.get_shifts</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
276 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
277 <td>the bit shifts needed to convert between a color and a mapped integer</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
278 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
279 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.set_shifts">pygame.Surface.set_shifts</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
280 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
281 <td>sets the bit shifts needed to convert between a color and a mapped integer</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
282 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
283 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_losses">pygame.Surface.get_losses</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
284 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
285 <td>the significant bits used to convert between a color and a mapped integer</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
286 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
287 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_bounding_rect">pygame.Surface.get_bounding_rect</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
288 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
289 <td>find the smallest rect containing data</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
290 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
291 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_view">pygame.Surface.get_view</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
292 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
293 <td>return a view of a surface&#8217;s pixel data.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
294 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
295 <tr><td><a class="toc reference external" href="surface.html#pygame.Surface.get_buffer">pygame.Surface.get_buffer</a></td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
296 <td>—</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
297 <td>acquires a buffer object for the pixels of the Surface.</td>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
298 </tr>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
299 </tbody>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
300 </table>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
301 <p>A pygame Surface is used to represent any image. The Surface has a fixed
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
302 resolution and pixel format. Surfaces with 8bit pixels use a color palette
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
303 to map to 24bit color.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
304 <p>Call <tt class="docutils literal"><span class="pre">pygame.Surface()</span></tt> to create a new image object. The Surface will be
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
305 cleared to all black. The only required arguments are the sizes. With no
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
306 additional arguments, the Surface will be created in a format that best
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
307 matches the display Surface.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
308 <p>The pixel format can be controlled by passing the bit depth or an existing
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
309 Surface. The flags argument is a bitmask of additional features for the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
310 surface. You can pass any combination of these flags:</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
311 <div class="highlight-python"><pre>HWSURFACE, creates the image in video memory
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
312 SRCALPHA, the pixel format will include a per-pixel alpha</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
313 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
314 <p>Both flags are only a request, and may not be possible for all displays and
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
315 formats.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
316 <p>Advance users can combine a set of bitmasks with a depth value. The masks
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
317 are a set of 4 integers representing which bits in a pixel will represent
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
318 each color. Normal Surfaces should not require the masks argument.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
319 <p>Surfaces can have many extra attributes like alpha planes, colorkeys, source
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
320 rectangle clipping. These functions mainly effect how the Surface is blitted
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
321 to other Surfaces. The blit routines will attempt to use hardware
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
322 acceleration when possible, otherwise they will use highly optimized
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
323 software blitting methods.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
324 <p>There are three types of transparency supported in Pygame: colorkeys,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
325 surface alphas, and pixel alphas. Surface alphas can be mixed with
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
326 colorkeys, but an image with per pixel alphas cannot use the other modes.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
327 Colorkey transparency makes a single color value transparent. Any pixels
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
328 matching the colorkey will not be drawn. The surface alpha value is a single
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
329 value that changes the transparency for the entire image. A surface alpha of
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
330 255 is opaque, and a value of 0 is completely transparent.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
331 <p>Per pixel alphas are different because they store a transparency value for
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
332 every pixel. This allows for the most precise transparency effects, but it
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
333 also the slowest. Per pixel alphas cannot be mixed with surface alpha and
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
334 colorkeys.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
335 <p>There is support for pixel access for the Surfaces. Pixel access on hardware
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
336 surfaces is slow and not recommended. Pixels can be accessed using the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
337 <tt class="docutils literal"><span class="pre">get_at()</span></tt> and <tt class="docutils literal"><span class="pre">set_at()</span></tt> functions. These methods are fine for simple
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
338 access, but will be considerably slow when doing of pixel work with them. If
2244
2fbf3c27fdaa Incidental PixelArray updates
Lenard Lindstrom <len-l@telus.net>
parents: 2239
diff changeset
339 you plan on doing a lot of pixel level work, it is recommended to use a
2fbf3c27fdaa Incidental PixelArray updates
Lenard Lindstrom <len-l@telus.net>
parents: 2239
diff changeset
340 <a class="tooltip reference internal" href="pixelarray.html#pygame.PixelArray" title=""><tt class="xref py py-class docutils literal"><span class="pre">pygame.PixelArray</span></tt><span class="tooltip-content">pygame object for direct pixel access of surfaces</span></a>, which gives an array like view of the surface.
2fbf3c27fdaa Incidental PixelArray updates
Lenard Lindstrom <len-l@telus.net>
parents: 2239
diff changeset
341 For involved mathematical manipulations try the <a class="tooltip reference internal" href="surfarray.html#module-pygame.surfarray" title=""><tt class="xref py py-mod docutils literal"><span class="pre">pygame.surfarray</span></tt><span class="tooltip-content">pygame module for accessing surface pixel data using array interfaces</span></a>
2fbf3c27fdaa Incidental PixelArray updates
Lenard Lindstrom <len-l@telus.net>
parents: 2239
diff changeset
342 module (It&#8217;s quite quick, but requires NumPy.)</p>
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
343 <p>Any functions that directly access a surface&#8217;s pixel data will need that
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
344 surface to be lock()&#8217;ed. These functions can <tt class="docutils literal"><span class="pre">lock()</span></tt> and <tt class="docutils literal"><span class="pre">unlock()</span></tt> the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
345 surfaces themselves without assistance. But, if a function will be called
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
346 many times, there will be a lot of overhead for multiple locking and
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
347 unlocking of the surface. It is best to lock the surface manually before
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
348 making the function call many times, and then unlocking when you are
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
349 finished. All functions that need a locked surface will say so in their
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
350 docs. Remember to leave the Surface locked only while necessary.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
351 <p>Surface pixels are stored internally as a single number that has all the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
352 colors encoded into it. Use the <tt class="docutils literal"><span class="pre">Surface.map_rgb()</span></tt> and
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
353 <tt class="docutils literal"><span class="pre">Surface.unmap_rgb()</span></tt> to convert between individual red, green, and blue
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
354 values into a packed integer for that Surface.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
355 <p>Surfaces can also reference sections of other Surfaces. These are created
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
356 with the <tt class="docutils literal"><span class="pre">Surface.subsurface()</span></tt> method. Any change to either Surface will
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
357 effect the other.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
358 <p>Each Surface contains a clipping area. By default the clip area covers the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
359 entire Surface. If it is changed, all drawing operations will only effect
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
360 the smaller area.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
361 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
362 <dt class="title" id="pygame.Surface.blit">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
363 <tt class="descname">blit</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.blit" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
364 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
365 <div class="line"><span class="summaryline">draw one image onto another</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
366 <div class="line"><span class="signature">blit(source, dest, area=None, special_flags = 0) -&gt; Rect</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
367 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
368 <p>Draws a source Surface onto this Surface. The draw can be positioned with
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
369 the dest argument. Dest can either be pair of coordinates representing
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
370 the upper left corner of the source. A Rect can also be passed as the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
371 destination and the topleft corner of the rectangle will be used as the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
372 position for the blit. The size of the destination rectangle does not
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
373 effect the blit.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
374 <p>An optional area rectangle can be passed as well. This represents a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
375 smaller portion of the source Surface to draw.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
376 <p>An optional special flags is for passing in new in 1.8.0: <tt class="docutils literal"><span class="pre">BLEND_ADD</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
377 <tt class="docutils literal"><span class="pre">BLEND_SUB</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_MULT</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_MIN</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_MAX</span></tt> new in 1.8.1:
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
378 <tt class="docutils literal"><span class="pre">BLEND_RGBA_ADD</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGBA_SUB</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGBA_MULT</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
379 <tt class="docutils literal"><span class="pre">BLEND_RGBA_MIN</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGBA_MAX</span></tt> <tt class="docutils literal"><span class="pre">BLEND_RGB_ADD</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
380 <tt class="docutils literal"><span class="pre">BLEND_RGB_SUB</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGB_MULT</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGB_MIN</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
381 <tt class="docutils literal"><span class="pre">BLEND_RGB_MAX</span></tt> With other special blitting flags perhaps added in the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
382 future.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
383 <p>The return rectangle is the area of the affected pixels, excluding any
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
384 pixels outside the destination Surface, or outside the clipping area.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
385 <p>Pixel alphas will be ignored when blitting to an 8 bit Surface.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
386 <p>special_flags new in pygame 1.8.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
387 <p>For a surface with colorkey or blanket alpha, a blit to self may give
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
388 slightly different colors than a non self-blit.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
389 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
390
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
391 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
392 <dt class="title" id="pygame.Surface.convert">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
393 <tt class="descname">convert</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.convert" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
394 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
395 <div class="line"><span class="summaryline">change the pixel format of an image</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
396 <div class="line"><span class="signature">convert(Surface) -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
397 <div class="line"><span class="signature">convert(depth, flags=0) -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
398 <div class="line"><span class="signature">convert(masks, flags=0) -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
399 <div class="line"><span class="signature">convert() -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
400 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
401 <p>Creates a new copy of the Surface with the pixel format changed. The new
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
402 pixel format can be determined from another existing Surface. Otherwise
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
403 depth, flags, and masks arguments can be used, similar to the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
404 <tt class="docutils literal"><span class="pre">pygame.Surface()</span></tt> call.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
405 <p>If no arguments are passed the new Surface will have the same pixel
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
406 format as the display Surface. This is always the fastest format for
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
407 blitting. It is a good idea to convert all Surfaces before they are
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
408 blitted many times.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
409 <p>The converted Surface will have no pixel alphas. They will be stripped if
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
410 the original had them. See <tt class="docutils literal"><span class="pre">Surface.convert_alpha()</span></tt> for preserving or
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
411 creating per-pixel alphas.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
412 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
413
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
414 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
415 <dt class="title" id="pygame.Surface.convert_alpha">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
416 <tt class="descname">convert_alpha</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.convert_alpha" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
417 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
418 <div class="line"><span class="summaryline">change the pixel format of an image including per pixel alphas</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
419 <div class="line"><span class="signature">convert_alpha(Surface) -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
420 <div class="line"><span class="signature">convert_alpha() -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
421 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
422 <p>Creates a new copy of the surface with the desired pixel format. The new
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
423 surface will be in a format suited for quick blitting to the given format
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
424 with per pixel alpha. If no surface is given, the new surface will be
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
425 optimized for blitting to the current display.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
426 <p>Unlike the <tt class="docutils literal"><span class="pre">Surface.convert()</span></tt> method, the pixel format for the new
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
427 image will not be exactly the same as the requested source, but it will
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
428 be optimized for fast alpha blitting to the destination.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
429 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
430
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
431 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
432 <dt class="title" id="pygame.Surface.copy">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
433 <tt class="descname">copy</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.copy" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
434 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
435 <div class="line"><span class="summaryline">create a new copy of a Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
436 <div class="line"><span class="signature">copy() -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
437 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
438 <p>Makes a duplicate copy of a Surface. The new Surface will have the same
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
439 pixel formats, color palettes, and transparency settings as the original.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
440 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
441
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
442 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
443 <dt class="title" id="pygame.Surface.fill">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
444 <tt class="descname">fill</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.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: 2166
diff changeset
445 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
446 <div class="line"><span class="summaryline">fill Surface with a solid color</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
447 <div class="line"><span class="signature">fill(color, rect=None, special_flags=0) -&gt; Rect</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
448 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
449 <p>Fill the Surface with a solid color. If no rect argument is given the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
450 entire Surface will be filled. The rect argument will limit the fill to a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
451 specific area. The fill will also be contained by the Surface clip area.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
452 <p>The color argument can be either a <tt class="docutils literal"><span class="pre">RGB</span></tt> sequence, a <tt class="docutils literal"><span class="pre">RGBA</span></tt> sequence
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
453 or a mapped color index. If using <tt class="docutils literal"><span class="pre">RGBA</span></tt>, the Alpha (A part of
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
454 <tt class="docutils literal"><span class="pre">RGBA</span></tt>) is ignored unless the surface uses per pixel alpha (Surface has
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
455 the <tt class="docutils literal"><span class="pre">SRCALPHA</span></tt> flag).</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
456 <p>An optional special_flags is for passing in new in 1.8.0: <tt class="docutils literal"><span class="pre">BLEND_ADD</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
457 <tt class="docutils literal"><span class="pre">BLEND_SUB</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_MULT</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_MIN</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_MAX</span></tt> new in 1.8.1:
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
458 <tt class="docutils literal"><span class="pre">BLEND_RGBA_ADD</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGBA_SUB</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGBA_MULT</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
459 <tt class="docutils literal"><span class="pre">BLEND_RGBA_MIN</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGBA_MAX</span></tt> <tt class="docutils literal"><span class="pre">BLEND_RGB_ADD</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
460 <tt class="docutils literal"><span class="pre">BLEND_RGB_SUB</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGB_MULT</span></tt>, <tt class="docutils literal"><span class="pre">BLEND_RGB_MIN</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
461 <tt class="docutils literal"><span class="pre">BLEND_RGB_MAX</span></tt> With other special blitting flags perhaps added in the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
462 future.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
463 <p>This will return the affected Surface area.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
464 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
465
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
466 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
467 <dt class="title" id="pygame.Surface.scroll">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
468 <tt class="descname">scroll</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.scroll" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
469 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
470 <div class="line"><span class="summaryline">Shift the surface image in place</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
471 <div class="line"><span class="signature">scroll(dx=0, dy=0) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
472 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
473 <p>Move the image by dx pixels right and dy pixels down. dx and dy may be
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
474 negative for left and up scrolls respectively. Areas of the surface that
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
475 are not overwritten retain their original pixel values. Scrolling is
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
476 contained by the Surface clip area. It is safe to have dx and dy values
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
477 that exceed the surface size.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
478 <p>New in Pygame 1.9</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
479 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
480
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
481 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
482 <dt class="title" id="pygame.Surface.set_colorkey">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
483 <tt class="descname">set_colorkey</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.set_colorkey" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
484 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
485 <div class="line"><span class="summaryline">Set the transparent colorkey</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
486 <div class="line"><span class="signature">set_colorkey(Color, flags=0) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
487 <div class="line"><span class="signature">set_colorkey(None) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
488 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
489 <p>Set the current color key for the Surface. When blitting this Surface
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
490 onto a destination, and pixels that have the same color as the colorkey
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
491 will be transparent. The color can be an <tt class="docutils literal"><span class="pre">RGB</span></tt> color or a mapped color
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
492 integer. If None is passed, the colorkey will be unset.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
493 <p>The colorkey will be ignored if the Surface is formatted to use per pixel
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
494 alpha values. The colorkey can be mixed with the full Surface alpha
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
495 value.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
496 <p>The optional flags argument can be set to <tt class="docutils literal"><span class="pre">pygame.RLEACCEL</span></tt> to provide
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
497 better performance on non accelerated displays. An <tt class="docutils literal"><span class="pre">RLEACCEL</span></tt> Surface
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
498 will be slower to modify, but quicker to blit as a source.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
499 </dd></dl>
1137
ec3ced33488f Reworked locking code to be more strict about locking.
marcus
parents: 1038
diff changeset
500
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
501 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
502 <dt class="title" id="pygame.Surface.get_colorkey">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
503 <tt class="descname">get_colorkey</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_colorkey" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
504 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
505 <div class="line"><span class="summaryline">Get the current transparent colorkey</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
506 <div class="line"><span class="signature">get_colorkey() -&gt; RGB or None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
507 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
508 <p>Return the current colorkey value for the Surface. If the colorkey is not
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
509 set then None is returned.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
510 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
511
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
512 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
513 <dt class="title" id="pygame.Surface.set_alpha">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
514 <tt class="descname">set_alpha</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.set_alpha" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
515 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
516 <div class="line"><span class="summaryline">set the alpha value for the full Surface image</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
517 <div class="line"><span class="signature">set_alpha(value, flags=0) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
518 <div class="line"><span class="signature">set_alpha(None) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
519 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
520 <p>Set the current alpha value fo r the Surface. When blitting this Surface
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
521 onto a destination, the pixels will be drawn slightly transparent. The
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
522 alpha value is an integer from 0 to 255, 0 is fully transparent and 255
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
523 is fully opaque. If None is passed for the alpha value, then the Surface
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
524 alpha will be disabled.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
525 <p>This value is different than the per pixel Surface alpha. If the Surface
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
526 format contains per pixel alphas, then this alpha value will be ignored.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
527 If the Surface contains per pixel alphas, setting the alpha value to None
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
528 will disable the per pixel transparency.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
529 <p>The optional flags argument can be set to <tt class="docutils literal"><span class="pre">pygame.RLEACCEL</span></tt> to provide
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
530 better performance on non accelerated displays. An <tt class="docutils literal"><span class="pre">RLEACCEL</span></tt> Surface
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
531 will be slower to modify, but quicker to blit as a source.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
532 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
533
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
534 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
535 <dt class="title" id="pygame.Surface.get_alpha">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
536 <tt class="descname">get_alpha</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_alpha" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
537 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
538 <div class="line"><span class="summaryline">get the current Surface transparency value</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
539 <div class="line"><span class="signature">get_alpha() -&gt; int_value or None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
540 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
541 <p>Return the current alpha value for the Surface. If the alpha value is not
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
542 set then None is returned.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
543 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
544
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
545 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
546 <dt class="title" id="pygame.Surface.lock">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
547 <tt class="descname">lock</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.lock" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
548 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
549 <div class="line"><span class="summaryline">lock the Surface memory for pixel access</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
550 <div class="line"><span class="signature">lock() -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
551 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
552 <p>Lock the pixel data of a Surface for access. On accelerated Surfaces, the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
553 pixel data may be stored in volatile video memory or nonlinear compressed
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
554 forms. When a Surface is locked the pixel memory becomes available to
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
555 access by regular software. Code that reads or writes pixel values will
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
556 need the Surface to be locked.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
557 <p>Surfaces should not remain locked for more than necessary. A locked
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
558 Surface can often not be displayed or managed by Pygame.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
559 <p>Not all Surfaces require locking. The <tt class="docutils literal"><span class="pre">Surface.mustlock()</span></tt> method can
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
560 determine if it is actually required. There is no performance penalty for
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
561 locking and unlocking a Surface that does not need it.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
562 <p>All pygame functions will automatically lock and unlock the Surface data
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
563 as needed. If a section of code is going to make calls that will
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
564 repeatedly lock and unlock the Surface many times, it can be helpful to
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
565 wrap the block inside a lock and unlock pair.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
566 <p>It is safe to nest locking and unlocking calls. The surface will only be
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
567 unlocked after the final lock is released.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
568 </dd></dl>
2137
e4a059ae7977 add updates to surface.c, etc that were skipped in the merge with the surface_buffer branch
Lenard Lindstrom <len-l@telus.net>
parents: 2136
diff changeset
569
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
570 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
571 <dt class="title" id="pygame.Surface.unlock">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
572 <tt class="descname">unlock</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.unlock" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
573 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
574 <div class="line"><span class="summaryline">unlock the Surface memory from pixel access</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
575 <div class="line"><span class="signature">unlock() -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
576 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
577 <p>Unlock the Surface pixel data after it has been locked. The unlocked
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
578 Surface can once again be drawn and managed by Pygame. See the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
579 <tt class="docutils literal"><span class="pre">Surface.lock()</span></tt> documentation for more details.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
580 <p>All pygame functions will automatically lock and unlock the Surface data
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
581 as needed. If a section of code is going to make calls that will
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
582 repeatedly lock and unlock the Surface many times, it can be helpful to
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
583 wrap the block inside a lock and unlock pair.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
584 <p>It is safe to nest locking and unlocking calls. The surface will only be
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
585 unlocked after the final lock is released.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
586 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
587
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
588 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
589 <dt class="title" id="pygame.Surface.mustlock">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
590 <tt class="descname">mustlock</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.mustlock" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
591 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
592 <div class="line"><span class="summaryline">test if the Surface requires locking</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
593 <div class="line"><span class="signature">mustlock() -&gt; bool</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
594 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
595 <p>Returns True if the Surface is required to be locked to access pixel
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
596 data. Usually pure software Surfaces do not require locking. This method
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
597 is rarely needed, since it is safe and quickest to just lock all Surfaces
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
598 as needed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
599 <p>All pygame functions will automatically lock and unlock the Surface data
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
600 as needed. If a section of code is going to make calls that will
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
601 repeatedly lock and unlock the Surface many times, it can be helpful to
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
602 wrap the block inside a lock and unlock pair.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
603 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
604
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
605 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
606 <dt class="title" id="pygame.Surface.get_locked">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
607 <tt class="descname">get_locked</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_locked" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
608 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
609 <div class="line"><span class="summaryline">test if the Surface is current locked</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
610 <div class="line"><span class="signature">get_locked() -&gt; bool</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
611 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
612 <p>Returns True when the Surface is locked. It doesn&#8217;t matter how many times
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
613 the Surface is locked.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
614 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
615
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
616 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
617 <dt class="title" id="pygame.Surface.get_locks">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
618 <tt class="descname">get_locks</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_locks" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
619 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
620 <div class="line"><span class="summaryline">Gets the locks for the Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
621 <div class="line"><span class="signature">get_locks() -&gt; tuple</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
622 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
623 <p>Returns the currently existing locks for the Surface.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
624 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
625
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
626 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
627 <dt class="title" id="pygame.Surface.get_at">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
628 <tt class="descname">get_at</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.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: 2166
diff changeset
629 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
630 <div class="line"><span class="summaryline">get the color value at a single pixel</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
631 <div class="line"><span class="signature">get_at((x, y)) -&gt; Color</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
632 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
633 <p>Return a copy of the <tt class="docutils literal"><span class="pre">RGBA</span></tt> Color value at the given pixel. If the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
634 Surface has no per pixel alpha, then the alpha value will always be 255
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
635 (opaque). If the pixel position is outside the area of the Surface an
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
636 IndexError exception will be raised.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
637 <p>Getting and setting pixels one at a time is generally too slow to be used
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
638 in a game or realtime situation. It is better to use methods which
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
639 operate on many pixels at a time like with the blit, fill and draw
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
640 methods - or by using surfarray/PixelArray.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
641 <p>This function will temporarily lock and unlock the Surface as needed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
642 <p>Returning a Color instead of tuple, New in pygame 1.9.0. Use
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
643 <tt class="docutils literal"><span class="pre">tuple(surf.get_at((x,y)))</span></tt> if you want a tuple, and not a Color. This
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
644 should only matter if you want to use the color as a key in a dict.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
645 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
646
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
647 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
648 <dt class="title" id="pygame.Surface.set_at">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
649 <tt class="descname">set_at</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.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: 2166
diff changeset
650 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
651 <div class="line"><span class="summaryline">set the color value for a single pixel</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
652 <div class="line"><span class="signature">set_at((x, y), Color) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
653 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
654 <p>Set the <tt class="docutils literal"><span class="pre">RGBA</span></tt> or mapped integer color value for a single pixel. If the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
655 Surface does not have per pixel alphas, the alpha value is ignored.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
656 Settting pixels outside the Surface area or outside the Surface clipping
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
657 will have no effect.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
658 <p>Getting and setting pixels one at a time is generally too slow to be used
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
659 in a game or realtime situation.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
660 <p>This function will temporarily lock and unlock the Surface as needed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
661 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
662
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
663 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
664 <dt class="title" id="pygame.Surface.get_at_mapped">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
665 <tt class="descname">get_at_mapped</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_at_mapped" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
666 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
667 <div class="line"><span class="summaryline">get the mapped color value at a single pixel</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
668 <div class="line"><span class="signature">get_at_mapped((x, y)) -&gt; Color</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
669 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
670 <p>Return the integer value of the given pixel. If the pixel position is
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
671 outside the area of the Surface an IndexError exception will be raised.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
672 <p>This method is intended for Pygame unit testing. It unlikely has any use
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
673 in an application.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
674 <p>This function will temporarily lock and unlock the Surface as needed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
675 <p>New in pygame. 1.9.2.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
676 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
677
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
678 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
679 <dt class="title" id="pygame.Surface.get_palette">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
680 <tt class="descname">get_palette</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_palette" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
681 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
682 <div class="line"><span class="summaryline">get the color index palette for an 8bit Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
683 <div class="line"><span class="signature">get_palette() -&gt; [RGB, RGB, RGB, ...]</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
684 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
685 <p>Return a list of up to 256 color elements that represent the indexed
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
686 colors used in an 8bit Surface. The returned list is a copy of the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
687 palette, and changes will have no effect on the Surface.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
688 <p>Returning a list of <tt class="docutils literal"><span class="pre">Color(with</span> <span class="pre">length</span> <span class="pre">3)</span></tt> instances instead of tuples,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
689 New in pygame 1.9.0</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
690 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
691
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
692 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
693 <dt class="title" id="pygame.Surface.get_palette_at">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
694 <tt class="descname">get_palette_at</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_palette_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: 2166
diff changeset
695 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
696 <div class="line"><span class="summaryline">get the color for a single entry in a palette</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
697 <div class="line"><span class="signature">get_palette_at(index) -&gt; RGB</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
698 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
699 <p>Returns the red, green, and blue color values for a single index in a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
700 Surface palette. The index should be a value from 0 to 255.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
701 <p>Returning <tt class="docutils literal"><span class="pre">Color(with</span> <span class="pre">length</span> <span class="pre">3)</span></tt> instance instead of a tuple, New in
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
702 pygame 1.9.0</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
703 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
704
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
705 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
706 <dt class="title" id="pygame.Surface.set_palette">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
707 <tt class="descname">set_palette</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.set_palette" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
708 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
709 <div class="line"><span class="summaryline">set the color palette for an 8bit Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
710 <div class="line"><span class="signature">set_palette([RGB, RGB, RGB, ...]) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
711 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
712 <p>Set the full palette for an 8bit Surface. This will replace the colors in
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
713 the existing palette. A partial palette can be passed and only the first
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
714 colors in the original palette will be changed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
715 <p>This function has no effect on a Surface with more than 8bits per pixel.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
716 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
717
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
718 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
719 <dt class="title" id="pygame.Surface.set_palette_at">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
720 <tt class="descname">set_palette_at</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.set_palette_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: 2166
diff changeset
721 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
722 <div class="line"><span class="summaryline">set the color for a single index in an 8bit Surface palette</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
723 <div class="line"><span class="signature">set_palette_at(index, RGB) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
724 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
725 <p>Set the palette value for a single entry in a Surface palette. The index
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
726 should be a value from 0 to 255.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
727 <p>This function has no effect on a Surface with more than 8bits per pixel.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
728 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
729
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
730 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
731 <dt class="title" id="pygame.Surface.map_rgb">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
732 <tt class="descname">map_rgb</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.map_rgb" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
733 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
734 <div class="line"><span class="summaryline">convert a color into a mapped color value</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
735 <div class="line"><span class="signature">map_rgb(Color) -&gt; mapped_int</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
736 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
737 <p>Convert an <tt class="docutils literal"><span class="pre">RGBA</span></tt> color into the mapped integer value for this Surface.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
738 The returned integer will contain no more bits than the bit depth of the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
739 Surface. Mapped color values are not often used inside Pygame, but can be
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
740 passed to most functions that require a Surface and a color.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
741 <p>See the Surface object documentation for more information about colors
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
742 and pixel formats.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
743 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
744
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
745 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
746 <dt class="title" id="pygame.Surface.unmap_rgb">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
747 <tt class="descname">unmap_rgb</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.unmap_rgb" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
748 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
749 <div class="line"><span class="summaryline">convert a mapped integer color value into a Color</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
750 <div class="line"><span class="signature">unmap_rgb(mapped_int) -&gt; Color</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
751 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
752 <p>Convert an mapped integer color into the <tt class="docutils literal"><span class="pre">RGB</span></tt> color components for
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
753 this Surface. Mapped color values are not often used inside Pygame, but
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
754 can be passed to most functions that require a Surface and a color.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
755 <p>See the Surface object documentation for more information about colors
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
756 and pixel formats.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
757 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
758
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
759 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
760 <dt class="title" id="pygame.Surface.set_clip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
761 <tt class="descname">set_clip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.set_clip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
762 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
763 <div class="line"><span class="summaryline">set the current clipping area of the Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
764 <div class="line"><span class="signature">set_clip(rect) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
765 <div class="line"><span class="signature">set_clip(None) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
766 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
767 <p>Each Surface has an active clipping area. This is a rectangle that
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
768 represents the only pixels on the Surface that can be modified. If None
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
769 is passed for the rectangle the full Surface will be available for
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
770 changes.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
771 <p>The clipping area is always restricted to the area of the Surface itself.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
772 If the clip rectangle is too large it will be shrunk to fit inside the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
773 Surface.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
774 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
775
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
776 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
777 <dt class="title" id="pygame.Surface.get_clip">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
778 <tt class="descname">get_clip</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_clip" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
779 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
780 <div class="line"><span class="summaryline">get the current clipping area of the Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
781 <div class="line"><span class="signature">get_clip() -&gt; Rect</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
782 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
783 <p>Return a rectangle of the current clipping area. The Surface will always
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
784 return a valid rectangle that will never be outside the bounds of the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
785 image. If the Surface has had None set for the clipping area, the Surface
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
786 will return a rectangle with the full area of the Surface.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
787 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
788
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
789 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
790 <dt class="title" id="pygame.Surface.subsurface">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
791 <tt class="descname">subsurface</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.subsurface" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
792 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
793 <div class="line"><span class="summaryline">create a new surface that references its parent</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
794 <div class="line"><span class="signature">subsurface(Rect) -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
795 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
796 <p>Returns a new Surface that shares its pixels with its new parent. The new
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
797 Surface is considered a child of the original. Modifications to either
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
798 Surface pixels will effect each other. Surface information like clipping
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
799 area and color keys are unique to each Surface.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
800 <p>The new Surface will inherit the palette, color key, and alpha settings
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
801 from its parent.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
802 <p>It is possible to have any number of subsurfaces and subsubsurfaces on
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
803 the parent. It is also possible to subsurface the display Surface if the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
804 display mode is not hardware accelerated.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
805 <p>See the <tt class="docutils literal"><span class="pre">Surface.get_offset()</span></tt>, <tt class="docutils literal"><span class="pre">Surface.get_parent()</span></tt> to learn more
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
806 about the state of a subsurface.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
807 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
808
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
809 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
810 <dt class="title" id="pygame.Surface.get_parent">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
811 <tt class="descname">get_parent</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_parent" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
812 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
813 <div class="line"><span class="summaryline">find the parent of a subsurface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
814 <div class="line"><span class="signature">get_parent() -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
815 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
816 <p>Returns the parent Surface of a subsurface. If this is not a subsurface
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
817 then None will be returned.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
818 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
819
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
820 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
821 <dt class="title" id="pygame.Surface.get_abs_parent">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
822 <tt class="descname">get_abs_parent</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_abs_parent" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
823 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
824 <div class="line"><span class="summaryline">find the top level parent of a subsurface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
825 <div class="line"><span class="signature">get_abs_parent() -&gt; Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
826 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
827 <p>Returns the parent Surface of a subsurface. If this is not a subsurface
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
828 then this surface will be returned.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
829 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
830
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
831 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
832 <dt class="title" id="pygame.Surface.get_offset">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
833 <tt class="descname">get_offset</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_offset" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
834 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
835 <div class="line"><span class="summaryline">find the position of a child subsurface inside a parent</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
836 <div class="line"><span class="signature">get_offset() -&gt; (x, y)</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
837 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
838 <p>Get the offset position of a child subsurface inside of a parent. If the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
839 Surface is not a subsurface this will return (0, 0).</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
840 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
841
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
842 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
843 <dt class="title" id="pygame.Surface.get_abs_offset">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
844 <tt class="descname">get_abs_offset</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_abs_offset" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
845 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
846 <div class="line"><span class="summaryline">find the absolute position of a child subsurface inside its top level parent</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
847 <div class="line"><span class="signature">get_abs_offset() -&gt; (x, y)</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
848 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
849 <p>Get the offset position of a child subsurface inside of its top level
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
850 parent Surface. If the Surface is not a subsurface this will return (0,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
851 0).</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
852 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
853
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
854 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
855 <dt class="title" id="pygame.Surface.get_size">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
856 <tt class="descname">get_size</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.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: 2166
diff changeset
857 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
858 <div class="line"><span class="summaryline">get the dimensions of the Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
859 <div class="line"><span class="signature">get_size() -&gt; (width, height)</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
860 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
861 <p>Return the width and height of the Surface in pixels.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
862 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
863
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
864 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
865 <dt class="title" id="pygame.Surface.get_width">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
866 <tt class="descname">get_width</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_width" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
867 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
868 <div class="line"><span class="summaryline">get the width of the Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
869 <div class="line"><span class="signature">get_width() -&gt; width</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
870 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
871 <p>Return the width of the Surface in pixels.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
872 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
873
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
874 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
875 <dt class="title" id="pygame.Surface.get_height">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
876 <tt class="descname">get_height</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_height" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
877 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
878 <div class="line"><span class="summaryline">get the height of the Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
879 <div class="line"><span class="signature">get_height() -&gt; height</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
880 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
881 <p>Return the height of the Surface in pixels.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
882 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
883
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
884 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
885 <dt class="title" id="pygame.Surface.get_rect">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
886 <tt class="descname">get_rect</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_rect" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
887 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
888 <div class="line"><span class="summaryline">get the rectangular area of the Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
889 <div class="line"><span class="signature">get_rect(**kwargs) -&gt; Rect</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
890 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
891 <p>Returns a new rectangle covering the entire surface. This rectangle will
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
892 always start at 0, 0 with a width. and height the same size as the image.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
893 <p>You can pass keyword argument values to this function. These named values
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
894 will be applied to the attributes of the Rect before it is returned. An
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
895 example would be &#8216;mysurf.get_rect(center=(100,100))&#8217; to create a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
896 rectangle for the Surface centered at a given position.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
897 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
898
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
899 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
900 <dt class="title" id="pygame.Surface.get_bitsize">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
901 <tt class="descname">get_bitsize</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_bitsize" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
902 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
903 <div class="line"><span class="summaryline">get the bit depth of the Surface pixel format</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
904 <div class="line"><span class="signature">get_bitsize() -&gt; int</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
905 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
906 <p>Returns the number of bits used to represent each pixel. This value may
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
907 not exactly fill the number of bytes used per pixel. For example a 15 bit
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
908 Surface still requires a full 2 bytes.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
909 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
910
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
911 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
912 <dt class="title" id="pygame.Surface.get_bytesize">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
913 <tt class="descname">get_bytesize</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_bytesize" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
914 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
915 <div class="line"><span class="summaryline">get the bytes used per Surface pixel</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
916 <div class="line"><span class="signature">get_bytesize() -&gt; int</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
917 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
918 <p>Return the number of bytes used per pixel.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
919 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
920
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
921 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
922 <dt class="title" id="pygame.Surface.get_flags">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
923 <tt class="descname">get_flags</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_flags" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
924 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
925 <div class="line"><span class="summaryline">get the additional flags used for the Surface</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
926 <div class="line"><span class="signature">get_flags() -&gt; int</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
927 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
928 <p>Returns a set of current Surface features. Each feature is a bit in the
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
929 flags bitmask. Typical flags are <tt class="docutils literal"><span class="pre">HWSURFACE</span></tt>, <tt class="docutils literal"><span class="pre">RLEACCEL</span></tt>,
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
930 <tt class="docutils literal"><span class="pre">SRCALPHA</span></tt>, and <tt class="docutils literal"><span class="pre">SRCCOLORKEY</span></tt>.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
931 <p>Here is a more complete list of flags. A full list can be found in
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
932 <tt class="docutils literal"><span class="pre">SDL_video.h</span></tt></p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
933 <div class="highlight-python"><pre>SWSURFACE 0x00000000 # Surface is in system memory
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
934 HWSURFACE 0x00000001 # Surface is in video memory
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
935 ASYNCBLIT 0x00000004 # Use asynchronous blits if possible</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
936 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
937 <p>Available for <tt class="docutils literal"><span class="pre">pygame.display.set_mode()</span></tt></p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
938 <div class="highlight-python"><pre>ANYFORMAT 0x10000000 # Allow any video depth/pixel-format
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
939 HWPALETTE 0x20000000 # Surface has exclusive palette
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
940 DOUBLEBUF 0x40000000 # Set up double-buffered video mode
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
941 FULLSCREEN 0x80000000 # Surface is a full screen display
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
942 OPENGL 0x00000002 # Create an OpenGL rendering context
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
943 OPENGLBLIT 0x0000000A # Create an OpenGL rendering context
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
944 # and use it for blitting. Obsolete.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
945 RESIZABLE 0x00000010 # This video mode may be resized
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
946 NOFRAME 0x00000020 # No window caption or edge frame</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
947 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
948 <p>Used internally (read-only)</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
949 <div class="highlight-python"><pre>HWACCEL 0x00000100 # Blit uses hardware acceleration
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
950 SRCCOLORKEY 0x00001000 # Blit uses a source color key
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
951 RLEACCELOK 0x00002000 # Private flag
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
952 RLEACCEL 0x00004000 # Surface is RLE encoded
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
953 SRCALPHA 0x00010000 # Blit uses source alpha blending
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
954 PREALLOC 0x01000000 # Surface uses preallocated memory</pre>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
955 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
956 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
957
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
958 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
959 <dt class="title" id="pygame.Surface.get_pitch">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
960 <tt class="descname">get_pitch</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_pitch" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
961 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
962 <div class="line"><span class="summaryline">get the number of bytes used per Surface row</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
963 <div class="line"><span class="signature">get_pitch() -&gt; int</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
964 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
965 <p>Return the number of bytes separating each row in the Surface. Surfaces
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
966 in video memory are not always linearly packed. Subsurfaces will also
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
967 have a larger pitch than their real width.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
968 <p>This value is not needed for normal Pygame usage.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
969 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
970
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
971 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
972 <dt class="title" id="pygame.Surface.get_masks">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
973 <tt class="descname">get_masks</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_masks" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
974 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
975 <div class="line"><span class="summaryline">the bitmasks needed to convert between a color and a mapped integer</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
976 <div class="line"><span class="signature">get_masks() -&gt; (R, G, B, A)</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
977 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
978 <p>Returns the bitmasks used to isolate each color in a mapped integer.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
979 <p>This value is not needed for normal Pygame usage.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
980 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
981
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
982 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
983 <dt class="title" id="pygame.Surface.set_masks">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
984 <tt class="descname">set_masks</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.set_masks" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
985 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
986 <div class="line"><span class="summaryline">set the bitmasks needed to convert between a color and a mapped integer</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
987 <div class="line"><span class="signature">set_masks((r,g,b,a)) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
988 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
989 <p>This is not needed for normal Pygame usage. New in pygame 1.8.1</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
990 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
991
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
992 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
993 <dt class="title" id="pygame.Surface.get_shifts">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
994 <tt class="descname">get_shifts</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_shifts" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
995 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
996 <div class="line"><span class="summaryline">the bit shifts needed to convert between a color and a mapped integer</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
997 <div class="line"><span class="signature">get_shifts() -&gt; (R, G, B, A)</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
998 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
999 <p>Returns the pixel shifts need to convert between each color and a mapped
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1000 integer.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1001 <p>This value is not needed for normal Pygame usage.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1002 </dd></dl>
1234
2ad2aa11e514 Added Surface.set_masks and .set_shifts useful for using data in
Rene Dudfield <renesd@gmail.com>
parents: 1221
diff changeset
1003
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1004 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1005 <dt class="title" id="pygame.Surface.set_shifts">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1006 <tt class="descname">set_shifts</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.set_shifts" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1007 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1008 <div class="line"><span class="summaryline">sets the bit shifts needed to convert between a color and a mapped integer</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1009 <div class="line"><span class="signature">set_shifts((r,g,b,a)) -&gt; None</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1010 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1011 <p>This is not needed for normal Pygame usage. New in pygame 1.8.1</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1012 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
1013
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1014 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1015 <dt class="title" id="pygame.Surface.get_losses">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1016 <tt class="descname">get_losses</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_losses" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1017 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1018 <div class="line"><span class="summaryline">the significant bits used to convert between a color and a mapped integer</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1019 <div class="line"><span class="signature">get_losses() -&gt; (R, G, B, A)</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1020 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1021 <p>Return the least significant number of bits stripped from each color in a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1022 mapped integer.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1023 <p>This value is not needed for normal Pygame usage.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1024 </dd></dl>
627
18b5fa9180bf new reference documentation system
pygame
parents:
diff changeset
1025
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1026 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1027 <dt class="title" id="pygame.Surface.get_bounding_rect">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1028 <tt class="descname">get_bounding_rect</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_bounding_rect" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1029 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1030 <div class="line"><span class="summaryline">find the smallest rect containing data</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1031 <div class="line"><span class="signature">get_bounding_rect(min_alpha = 1) -&gt; Rect</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1032 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1033 <p>Returns the smallest rectangular region that contains all the pixels in
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1034 the surface that have an alpha value greater than or equal to the minimum
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1035 alpha value.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1036 <p>This function will temporarily lock and unlock the Surface as needed.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1037 <p>New in pygame 1.8.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1038 </dd></dl>
1234
2ad2aa11e514 Added Surface.set_masks and .set_shifts useful for using data in
Rene Dudfield <renesd@gmail.com>
parents: 1221
diff changeset
1039
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1040 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1041 <dt class="title" id="pygame.Surface.get_view">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1042 <tt class="descname">get_view</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_view" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1043 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1044 <div class="line"><span class="summaryline">return a view of a surface&#8217;s pixel data.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1045 <div class="line"><span class="signature">get_view(kind=&#8216;2&#8217;) -&gt; &lt;view&gt;</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1046 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1047 <p>Return an object which exposes a surface&#8217;s internal pixel buffer to a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1048 NumPy array. For now a custom object with an array struct interface is
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1049 returned. A Python memoryview may be returned in the future. The buffer
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1050 is writeable.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1051 <p>The kind argument is the length 1 string &#8216;2&#8217;, &#8216;3&#8217;, &#8216;r&#8217;, &#8216;g&#8217;, &#8216;b&#8217;, or &#8216;a&#8217;.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1052 The letters are case insensitive; &#8216;A&#8217; will work as well. The argument can
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1053 be either a Unicode or byte (char) string. The default is &#8216;2&#8217;.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1054 <p>A kind &#8216;2&#8217; view is a (surface-width, surface-height) array of raw pixels.
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1055 The pixels are surface bytesized unsigned integers. The pixel format is
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1056 surface specific. The 3 byte unsigned integers of 24 bit surfaces are
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1057 unlikely accepted by anything other than other Pygame functions.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1058 <p>&#8216;3&#8217; returns a (surface-width, surface-height, 3) view of <tt class="docutils literal"><span class="pre">RGB</span></tt> color
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1059 components. Each of the red, green, and blue components are unsigned
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1060 bytes. Only 24-bit and 32-bit surfaces are supported. The color
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1061 components must be in either <tt class="docutils literal"><span class="pre">RGB</span></tt> or <tt class="docutils literal"><span class="pre">BGR</span></tt> order within the pixel.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1062 <p>&#8216;r&#8217; for red, &#8216;g&#8217; for green, &#8216;b&#8217; for blue, and &#8216;a&#8217; for alpha return a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1063 (surface-width, surface-height) view of a single color component within a
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1064 surface: a color plane. Color components are unsigned bytes. Both 24-bit
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1065 and 32-bit surfaces support &#8216;r&#8217;, &#8216;g&#8217;, and &#8216;b&#8217;. Only 32-bit surfaces with
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1066 <tt class="docutils literal"><span class="pre">SRCALPHA</span></tt> support &#8216;a&#8217;.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1067 <p>This method implicitly locks the Surface. The lock will be released, once
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1068 the returned view object is deleted.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1069 <p>New in pygame 1.9.2.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1070 </dd></dl>
957
a1b08375b132 Added display.set_mode() resolution enhancement as posted by Lorenz Quack.
marcus
parents: 862
diff changeset
1071
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1072 <dl class="definition method">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1073 <dt class="title" id="pygame.Surface.get_buffer">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1074 <tt class="descname">get_buffer</tt><big>(</big><big>)</big><a class="headerlink" href="#pygame.Surface.get_buffer" title="Permalink to this definition">¶</a></dt>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1075 <dd><div class="line-block">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1076 <div class="line"><span class="summaryline">acquires a buffer object for the pixels of the Surface.</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1077 <div class="line"><span class="signature">get_buffer() -&gt; BufferProxy</span></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1078 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1079 <p>Return a buffer object for the pixels of the Surface. The buffer can be
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1080 used for direct pixel access and manipulation.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1081 <p>This method implicitly locks the Surface. The lock will be released, once
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1082 the returned BufferProxy object is deleted.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1083 <p>New in pygame 1.8.</p>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1084 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1085
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1086 </dd></dl>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1087
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1088 </div>
2131
018779fb04f5 Merge the buffer branch back into trunk.
Lenard Lindstrom <len-l@telus.net>
parents: 1994
diff changeset
1089
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1090 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1091 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1092 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1093 <div class="clearer"></div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1094 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1095 <div class="related">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1096 <h3>Navigation</h3>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1097 <ul>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1098 <li class="right" style="margin-right: 10px">
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1099 <a href="../genindex.html" title="General Index"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1100 accesskey="I">index</a></li>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1101 <li class="right" >
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1102 <a href="surfarray.html" title="pygame.surfarray"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1103 accesskey="N">next</a> |</li>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1104 <li class="right" >
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1105 <a href="sprite.html" title="pygame.sprite"
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1106 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
1107 <li><a href="../index.html">Pygame v1.9.2 documentation</a> &raquo;</li>
ca88e9308d44 regenerated html docs. Should all have doc comments from the website now.
Rene Dudfield <renesd@gmail.com>
parents: 2225
diff changeset
1108 <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
1109
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1110 </ul>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1111 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1112 <div class="footer">
2225
5f65dd2d9267 regenerate sphinx docs
Rene Dudfield <renesd@gmail.com>
parents: 2217
diff changeset
1113 &copy; Copyright 2011, Pygame Developers.
2198
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1114 </div>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1115 </body>
da4302429d3b replace makeref.py generated documents with makeref2.py documents
Lenard Lindstrom <len-l@telus.net>
parents: 2166
diff changeset
1116 </html>