Skip to content

Added rotation property and added HX8357 support #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 11, 2019

Conversation

makermelissa
Copy link
Collaborator

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.

@makermelissa makermelissa requested a review from a team October 11, 2019 00:08
@makermelissa makermelissa merged commit eab4823 into adafruit:master Oct 11, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 11, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.5.1 from 3.4.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#39 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#38 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#37 from makermelissa/master
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#36 from makermelissa/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants