Skip to content

Commit c88b949

Browse files
committed
PyGame
1 parent 79339b2 commit c88b949

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2935,11 +2935,7 @@ while all(event.type != pg.QUIT for event in pg.event.get()):
29352935
<Rect> = pg.Rect(topleft_x, topleft_y, width, height)
29362936
<tuple> = <Rect>.topleft/topright/bottomright/bottomleft/center
29372937
<int> = <Rect>.x/y/centerx/centery
2938-
```
2939-
2940-
```python
29412938
<Rect> = <Rect>.move(<tuple>) # Or: <Rect>.move(<int>, <int>)
2942-
<Rect>.move_ip(<tuple>) # Or: <Rect>.move_ip(<int>, <int>)
29432939
```
29442940

29452941
```python
@@ -2971,13 +2967,11 @@ indices = <Rect>.collidelistall(<list_of_Rect>) # Returns indices of all colind
29712967
```
29722968

29732969
```python
2970+
pg.draw.line(<Surface>, color, start_pos, end_pos, width)
2971+
pg.draw.arc(<Surface>, color, <Rect>, start_angle, stop_angle)
29742972
pg.draw.rect(<Surface>, color, <Rect>)
29752973
pg.draw.polygon(<Surface>, color, points)
2976-
pg.draw.circle(<Surface>, color, center, radius)
29772974
pg.draw.ellipse(<Surface>, color, <Rect>)
2978-
pg.draw.arc(<Surface>, color, <Rect>, start_angle, stop_angle)
2979-
pg.draw.line(<Surface>, color, start_pos, end_pos, width)
2980-
pg.draw.lines(<Surface>, color, points)
29812975
```
29822976

29832977
### Font

index.html

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,12 +2496,10 @@
24962496
<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)
24972497
&lt;tuple&gt; = &lt;Rect&gt;.topleft/topright/bottomright/bottomleft/center
24982498
&lt;int&gt; = &lt;Rect&gt;.x/y/centerx/centery
2499+
&lt;Rect&gt; = &lt;Rect&gt;.move(&lt;tuple&gt;) <span class="hljs-comment"># Or: &lt;Rect&gt;.move(&lt;int&gt;, &lt;int&gt;)</span>
24992500
</code></pre></div>
25002501

25012502

2502-
<pre><code class="python language-python hljs">&lt;Rect&gt; = &lt;Rect&gt;.move(&lt;tuple&gt;) <span class="hljs-comment"># Or: &lt;Rect&gt;.move(&lt;int&gt;, &lt;int&gt;)</span>
2503-
&lt;Rect&gt;.move_ip(&lt;tuple&gt;) <span class="hljs-comment"># Or: &lt;Rect&gt;.move_ip(&lt;int&gt;, &lt;int&gt;)</span>
2504-
</code></pre>
25052503
<pre><code class="python language-python hljs">&lt;bool&gt; = &lt;Rect&gt;.collidepoint(&lt;tuple&gt;) <span class="hljs-comment"># Or: &lt;Rect&gt;.collidepoint(&lt;int&gt;, &lt;int&gt;)</span>
25062504
&lt;bool&gt; = &lt;Rect&gt;.colliderect(&lt;Rect&gt;)
25072505
index = &lt;Rect&gt;.collidelist(&lt;list_of_Rect&gt;) <span class="hljs-comment"># Returns index of first coliding Rect or -1.</span>
@@ -2522,13 +2520,11 @@
25222520
&lt;Surface&gt; = pg.transform.rotate(&lt;Surface&gt;, angle)
25232521
&lt;Surface&gt; = pg.transform.scale(&lt;Surface&gt;, (width, height))
25242522
</code></pre>
2525-
<pre><code class="python language-python hljs">pg.draw.rect(&lt;Surface&gt;, color, &lt;Rect&gt;)
2523+
<pre><code class="python language-python hljs">pg.draw.line(&lt;Surface&gt;, color, start_pos, end_pos, width)
2524+
pg.draw.arc(&lt;Surface&gt;, color, &lt;Rect&gt;, start_angle, stop_angle)
2525+
pg.draw.rect(&lt;Surface&gt;, color, &lt;Rect&gt;)
25262526
pg.draw.polygon(&lt;Surface&gt;, color, points)
2527-
pg.draw.circle(&lt;Surface&gt;, color, center, radius)
25282527
pg.draw.ellipse(&lt;Surface&gt;, color, &lt;Rect&gt;)
2529-
pg.draw.arc(&lt;Surface&gt;, color, &lt;Rect&gt;, start_angle, stop_angle)
2530-
pg.draw.line(&lt;Surface&gt;, color, start_pos, end_pos, width)
2531-
pg.draw.lines(&lt;Surface&gt;, color, points)
25322528
</code></pre>
25332529
<div><h3 id="font">Font</h3><pre><code class="python language-python hljs">&lt;Font&gt; = pg.font.SysFont(name, size, bold=<span class="hljs-keyword">False</span>, italic=<span class="hljs-keyword">False</span>)
25342530
&lt;Font&gt; = pg.font.Font(<span class="hljs-string">'&lt;path&gt;'</span>, size)

0 commit comments

Comments
 (0)