Browse Source

Pygame

pull/52/head
Jure Šorn 5 years ago
parent
commit
274e40e49e
2 changed files with 6 additions and 6 deletions
  1. 6
      README.md
  2. 6
      index.html

6
README.md

@ -2932,9 +2932,9 @@ while all(event.type != pg.QUIT for event in pg.event.get()):
### Rect
**Object for storing rectangular coordinates.**
```python
<Rect> = pg.Rect(topleft_x, topleft_y, width, height)
<Rect> = pg.Rect(x, y, width, height)
<int> = <Rect>.x/y/centerx/centery
<tup.> = <Rect>.topleft/topright/bottomright/bottomleft/center
<tup.> = <Rect>.topleft/center
<Rect> = <Rect>.move((x, y))
```
@ -2950,7 +2950,7 @@ while all(event.type != pg.QUIT for event in pg.event.get()):
```python
<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>').convert() # Loads an image.
<Surf> = pg.image.load('<path>') # Loads the image.
<Surf> = <Surf>.subsurface(<Rect>) # Returns a subsurface.
```

6
index.html

@ -2493,9 +2493,9 @@ rect = pg.Rect(<span class="hljs-number">240</span>, <span class="hljs-number">2
</code></pre></div></div>
<div><h3 id="rect">Rect</h3><p><strong>Object for storing rectangular coordinates.</strong></p><pre><code class="python language-python hljs">&lt;Rect&gt; = pg.Rect(topleft_x, topleft_y, width, height)
<div><h3 id="rect">Rect</h3><p><strong>Object for storing rectangular coordinates.</strong></p><pre><code class="python language-python hljs">&lt;Rect&gt; = pg.Rect(x, y, width, height)
&lt;int&gt; = &lt;Rect&gt;.x/y/centerx/centery
&lt;tup.&gt; = &lt;Rect&gt;.topleft/topright/bottomright/bottomleft/center
&lt;tup.&gt; = &lt;Rect&gt;.topleft/center
&lt;Rect&gt; = &lt;Rect&gt;.move((x, y))
</code></pre></div>
@ -2507,7 +2507,7 @@ rect = pg.Rect(<span class="hljs-number">240</span>, <span class="hljs-number">2
</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>
&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>).convert() <span class="hljs-comment"># Loads an image.</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; = &lt;Surf&gt;.subsurface(&lt;Rect&gt;) <span class="hljs-comment"># Returns a subsurface.</span>
</code></pre></div>

Loading…
Cancel
Save