Browse Source

Pygame

pull/79/head
Jure Šorn 4 years ago
parent
commit
97c94e009c
2 changed files with 4 additions and 4 deletions
  1. 4
      README.md
  2. 4
      index.html

4
README.md

@ -2949,8 +2949,8 @@ while all(event.type != pg.QUIT for event in pg.event.get()):
**Object for representing images.** **Object for representing images.**
```python ```python
<Surf> = pg.display.set_mode((width, height)) # Returns the display surface. <Surf> = pg.display.set_mode((width, height)) # Returns the display surface.
<Surf> = pg.Surface((width, height)) # Creates a new surface.
<Surf> = pg.image.load('<path>') # Loads the image.
<Surf> = pg.Surface((width, height) [, ...]) # New RGB surface. Add `pg.SRCALPHA` for RGBA.
<Surf> = pg.image.load('<path>') # Loads the image. Format depends on source.
<Surf> = <Surf>.subsurface(<Rect>) # Returns a subsurface. <Surf> = <Surf>.subsurface(<Rect>) # Returns a subsurface.
``` ```

4
index.html

@ -2521,8 +2521,8 @@ rect = pg.Rect(<span class="hljs-number">240</span>, <span class="hljs-number">2
&lt;list&gt; = &lt;Rect&gt;.collidelistall(&lt;list_of_Rect&gt;) <span class="hljs-comment"># Returns indexes of all colliding Rects.</span> &lt;list&gt; = &lt;Rect&gt;.collidelistall(&lt;list_of_Rect&gt;) <span class="hljs-comment"># Returns indexes of all colliding Rects.</span>
</code></pre> </code></pre>
<div><h3 id="surface">Surface</h3><p><strong>Object for representing images.</strong></p><pre><code class="python language-python hljs">&lt;Surf&gt; = pg.display.set_mode((width, height)) <span class="hljs-comment"># Returns the display surface.</span> <div><h3 id="surface">Surface</h3><p><strong>Object for representing images.</strong></p><pre><code class="python language-python hljs">&lt;Surf&gt; = pg.display.set_mode((width, height)) <span class="hljs-comment"># Returns the display surface.</span>
&lt;Surf&gt; = pg.Surface((width, height)) <span class="hljs-comment"># Creates a new surface.</span>
&lt;Surf&gt; = pg.image.load(<span class="hljs-string">'&lt;path&gt;'</span>) <span class="hljs-comment"># Loads the image.</span>
&lt;Surf&gt; = pg.Surface((width, height) [, ...]) <span class="hljs-comment"># New RGB surface. Add `pg.SRCALPHA` for RGBA.</span>
&lt;Surf&gt; = pg.image.load(<span class="hljs-string">'&lt;path&gt;'</span>) <span class="hljs-comment"># Loads the image. Format depends on source.</span>
&lt;Surf&gt; = &lt;Surf&gt;.subsurface(&lt;Rect&gt;) <span class="hljs-comment"># Returns a subsurface.</span> &lt;Surf&gt; = &lt;Surf&gt;.subsurface(&lt;Rect&gt;) <span class="hljs-comment"># Returns a subsurface.</span>
</code></pre></div> </code></pre></div>

Loading…
Cancel
Save