As I was adding displays to the Pillow examples, I've noticed that for some displays 90 degrees is landscape and some it is portrait. This is not too difficult to deal except I figured it would be even easier if we could place it in the initialization like it is in displayio now.
I added a kw arg rotation property that can be passed in the initialization so the user will only need to uncomment one line. Also, the way I added it, it is completely backwards compatible.
I added HX8357 support to the Pillow examples and updated the examples to take advantage of the rotation property in the initializer. It then reads the property to determine if the with and height variables need to be swapped.
As I was adding displays to the Pillow examples, I've noticed that for some displays 90 degrees is landscape and some it is portrait. This is not too difficult to deal except I figured it would be even easier if we could place it in the initialization like it is in displayio now.
I added a kw arg rotation property that can be passed in the initialization so the user will only need to uncomment one line. Also, the way I added it, it is completely backwards compatible.
I added HX8357 support to the Pillow examples and updated the examples to take advantage of the rotation property in the initializer. It then reads the property to determine if the with and height variables need to be swapped.
Tested on the HX8357 and ILI9341 displays.