File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2951,13 +2951,13 @@ while all(event.type != pg.QUIT for event in pg.event.get()):
2951
2951
< Surf> = pg.display.set_mode((width, height)) # Returns the display surface.
2952
2952
< Surf> = pg.Surface((width, height)) # Creates a new surface.
2953
2953
< Surf> = pg.image.load(' <path>' ).convert() # Loads an image.
2954
+ < Surf> = < Surf> .subsurface(< Rect> ) # Returns a subsurface.
2954
2955
```
2955
2956
2956
2957
``` python
2957
2958
< Surf> .set_at((x, y), color) # Updates pixel.
2958
2959
< Surf> .fill(color) # Fills the whole surface.
2959
2960
< Surf> .blit(< Surface> , (x, y)) # Draws passed surface to the surface.
2960
- < Surf> = < Surf> .subsurface(< Rect> ) # Returns subsurface.
2961
2961
```
2962
2962
2963
2963
``` python
Original file line number Diff line number Diff line change 2508
2508
< div > < h3 id ="surface "> Surface</ h3 > < p > < strong > Object for representing images.</ strong > </ p > < pre > < code class ="python language-python hljs "> <Surf> = pg.display.set_mode((width, height)) < span class ="hljs-comment "> # Returns the display surface.</ span >
2509
2509
<Surf> = pg.Surface((width, height)) < span class ="hljs-comment "> # Creates a new surface.</ span >
2510
2510
<Surf> = pg.image.load(< span class ="hljs-string "> '<path>'</ span > ).convert() < span class ="hljs-comment "> # Loads an image.</ span >
2511
+ <Surf> = <Surf>.subsurface(<Rect>) < span class ="hljs-comment "> # Returns a subsurface.</ span >
2511
2512
</ code > </ pre > </ div >
2512
2513
2513
2514
2514
2515
< pre > < code class ="python language-python hljs "> <Surf>.set_at((x, y), color) < span class ="hljs-comment "> # Updates pixel.</ span >
2515
2516
<Surf>.fill(color) < span class ="hljs-comment "> # Fills the whole surface.</ span >
2516
2517
<Surf>.blit(<Surface>, (x, y)) < span class ="hljs-comment "> # Draws passed surface to the surface.</ span >
2517
- <Surf> = <Surf>.subsurface(<Rect>) < span class ="hljs-comment "> # Returns subsurface.</ span >
2518
2518
</ code > </ pre >
2519
2519
< pre > < code class ="python language-python hljs "> <Surf> = pg.transform.flip(<Surf>, xbool, ybool)
2520
2520
<Surf> = pg.transform.rotate(<Surf>, degrees)
You can’t perform that action at this time.
0 commit comments