From a47e54c4693e42b818da56d8d72ec7a1aef9ae92 Mon Sep 17 00:00:00 2001 From: Brosef Date: Sat, 21 Jun 2025 22:24:00 +0000 Subject: [PATCH] Add Centreing a surface --- Centreing-a-surface.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Centreing-a-surface.md diff --git a/Centreing-a-surface.md b/Centreing-a-surface.md new file mode 100644 index 0000000..82ff5c2 --- /dev/null +++ b/Centreing-a-surface.md @@ -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. \ No newline at end of file