Added rotation property and added HX8357 support #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.