Add Centreing a surface
8
Centreing-a-surface.md
Normal file
8
Centreing-a-surface.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Centreing a surface
|
||||||
|
`gameUtils.centre(surface, size)` provides an easy way to centre a surface.
|
||||||
|
|
||||||
|
## Usage:
|
||||||
|
```python
|
||||||
|
self.surf.blit(gameUtils.centre(image, self.size), (0, 0))
|
||||||
|
```
|
||||||
|
This will centre `image` to the middle of the game window.
|
||||||
Reference in New Issue
Block a user