Merge pull request #395 from kevinmcaleer/main

Updated PicoGraphics README and .gitignore
This commit is contained in:
Philip Howard 2022-06-21 07:53:24 +01:00 committed by GitHub
commit 8638e42b7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

4
.gitignore vendored
View File

@ -33,3 +33,7 @@
**/build
.vscode
# Apple filesystem cruft
.DS_Store
venv

View File

@ -78,7 +78,7 @@ All SPI LCDs support 0, 90, 180 and 270 degree rotations.
Eg:
```python
display = PicoGraphics(display=PICO_DISPLAY, roation=90)
display = PicoGraphics(display=PICO_DISPLAY, rotate=90)
```
### Custom Pins
@ -362,12 +362,25 @@ We've prepared some RGB332-compatible sprite assets for you, but you can use `sp
#### Loading Sprites
You'll need to include the [pen_type](#supported-graphics-modes-pen-type) in the import statement, and define the pen_type before using loading the spritesheet:
``` python
from picographics import PicoGraphics, PEN_RGB565, PEN_RGB332
display = PicoGraphics(display=PICO_DISPLAY, pen_type=PEN_RGB332)
```
Use Thonny to upload your `spritesheet.rgb332` file onto your Pico. Then load it into Pico Graphics:
```python
display.load_spritesheet("s4m_ur4i-dingbads.rgb332")
```
and then update the display, to show the sprite:
```python
display.update()
```
#### Drawing Sprites
And finally display a sprite: