Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4d53f8e

Browse files
committed
Pygame
1 parent cc51dd3 commit 4d53f8e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2940,31 +2940,31 @@ while all(event.type != pg.QUIT for event in pg.event.get()):
29402940
```
29412941

29422942
```python
2943-
<bool> = <Rect>.collidepoint((x, y)) # Tests if a point is inside the rectangle.
2944-
<bool> = <Rect>.colliderect(<Rect>) # Tests if two rectangles overlap.
2943+
<bool> = <Rect>.collidepoint((x, y)) # Tests if point is inside the rectangle.
2944+
<bool> = <Rect>.colliderect(<Rect>) # Tests if the two rectangles overlap.
29452945
<int> = <Rect>.collidelist(<list_of_Rect>) # Returns index of first colliding Rect or -1.
29462946
<list> = <Rect>.collidelistall(<list_of_Rect>) # Returns indexes of all colliding Rects.
29472947
```
29482948

29492949
### Surface
29502950
**Object for representing images.**
29512951
```python
2952-
<Surf> = pg.display.set_mode((width, height)) # Returns the display surface.
2953-
<Surf> = pg.Surface((width, height) [, ...]) # New RGB surface. Add `pg.SRCALPHA` for RGBA.
2952+
<Surf> = pg.display.set_mode((width, height)) # Returns display surface.
2953+
<Surf> = pg.Surface((width, height), …) # New RGB surface. Add `pg.SRCALPHA` for RGBA.
29542954
<Surf> = pg.image.load('<path>') # Loads the image. Format depends on source.
29552955
<Surf> = <Surf>.subsurface(<Rect>) # Returns a subsurface.
29562956
```
29572957

29582958
```python
2959-
<Surf>.fill(color) # Fills the whole surface.
2959+
<Surf>.fill(color) # Tuple, Color('#rrggbb[aa]') or Color(<name>).
29602960
<Surf>.set_at((x, y), color) # Updates pixel.
29612961
<Surf>.blit(<Surf>, (x, y)) # Draws passed surface to the surface.
29622962
```
29632963

29642964
```python
29652965
<Surf> = pg.transform.scale(<Surf>, (width, height))
29662966
<Surf> = pg.transform.rotate(<Surf>, degrees)
2967-
<Surf> = pg.transform.flip(<Surf>, xbool, ybool)
2967+
<Surf> = pg.transform.flip(<Surf>, x_bool, y_bool)
29682968
```
29692969

29702970
```python

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2516,25 +2516,25 @@
25162516
</code></pre></div>
25172517

25182518

2519-
<pre><code class="python language-python hljs">&lt;bool&gt; = &lt;Rect&gt;.collidepoint((x, y)) <span class="hljs-comment"># Tests if a point is inside the rectangle.</span>
2520-
&lt;bool&gt; = &lt;Rect&gt;.colliderect(&lt;Rect&gt;) <span class="hljs-comment"># Tests if two rectangles overlap.</span>
2519+
<pre><code class="python language-python hljs">&lt;bool&gt; = &lt;Rect&gt;.collidepoint((x, y)) <span class="hljs-comment"># Tests if point is inside the rectangle.</span>
2520+
&lt;bool&gt; = &lt;Rect&gt;.colliderect(&lt;Rect&gt;) <span class="hljs-comment"># Tests if the two rectangles overlap.</span>
25212521
&lt;int&gt; = &lt;Rect&gt;.collidelist(&lt;list_of_Rect&gt;) <span class="hljs-comment"># Returns index of first colliding Rect or -1.</span>
25222522
&lt;list&gt; = &lt;Rect&gt;.collidelistall(&lt;list_of_Rect&gt;) <span class="hljs-comment"># Returns indexes of all colliding Rects.</span>
25232523
</code></pre>
2524-
<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>
2525-
&lt;Surf&gt; = pg.Surface((width, height) [, ...]) <span class="hljs-comment"># New RGB surface. Add `pg.SRCALPHA` for RGBA.</span>
2524+
<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 display surface.</span>
2525+
&lt;Surf&gt; = pg.Surface((width, height), …) <span class="hljs-comment"># New RGB surface. Add `pg.SRCALPHA` for RGBA.</span>
25262526
&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>
25272527
&lt;Surf&gt; = &lt;Surf&gt;.subsurface(&lt;Rect&gt;) <span class="hljs-comment"># Returns a subsurface.</span>
25282528
</code></pre></div>
25292529

25302530

2531-
<pre><code class="python language-python hljs">&lt;Surf&gt;.fill(color) <span class="hljs-comment"># Fills the whole surface.</span>
2531+
<pre><code class="python language-python hljs">&lt;Surf&gt;.fill(color) <span class="hljs-comment"># Tuple, Color('#rrggbb[aa]') or Color(&lt;name&gt;).</span>
25322532
&lt;Surf&gt;.set_at((x, y), color) <span class="hljs-comment"># Updates pixel.</span>
25332533
&lt;Surf&gt;.blit(&lt;Surf&gt;, (x, y)) <span class="hljs-comment"># Draws passed surface to the surface.</span>
25342534
</code></pre>
25352535
<pre><code class="python language-python hljs">&lt;Surf&gt; = pg.transform.scale(&lt;Surf&gt;, (width, height))
25362536
&lt;Surf&gt; = pg.transform.rotate(&lt;Surf&gt;, degrees)
2537-
&lt;Surf&gt; = pg.transform.flip(&lt;Surf&gt;, xbool, ybool)
2537+
&lt;Surf&gt; = pg.transform.flip(&lt;Surf&gt;, x_bool, y_bool)
25382538
</code></pre>
25392539
<pre><code class="python language-python hljs">pg.draw.line(&lt;Surf&gt;, color, (x1, y1), (x2, y2), width)
25402540
pg.draw.arc(&lt;Surf&gt;, color, &lt;Rect&gt;, from_radians, to_radians)

0 commit comments

Comments
 (0)