-
Notifications
You must be signed in to change notification settings - Fork 53
Allow image drawing in subscreen areas #50
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
Conversation
👌 Will take care of it after work today. |
Sounds good. Thanks! |
This extends the `image` method with two additional arguments for the image origin on the screen. The previous exact size check was adapted to ensure that the image drawn at the supplied origin does not exceed the display dimensions. The changes allow to update a smaller part of the screen with an image which is especially benefitial on lower end hardware. Some example test results from a Rasberry Pi Zero: - Draw fullscreen image (240x320): ~0.3s - Draw half-screen image (240x160): ~0.2s - Draw single line of text (240x22): ~0.06s Fixes: #48
Ok, it's rebased on |
Awesome! Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this and the image appears in the upper right and passing x and y values does not seem to make a difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying on the wrong image statement and got this to work. Thanks for adding.
Updating https://github.com/adafruit/Adafruit_CircuitPython_AMG88xx to 1.1.5 from 1.1.4: > Update README.rst > Merge pull request adafruit/Adafruit_CircuitPython_AMG88xx#20 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_AMG88xx#19 from siqueira-ec/master Updating https://github.com/adafruit/Adafruit_CircuitPython_DS2413 to 1.1.4 from 1.1.3: > Merge pull request adafruit/Adafruit_CircuitPython_DS2413#12 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_DS2413#11 from rhooper/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_FocalTouch to 1.1.5 from 1.1.4: > Merge pull request adafruit/Adafruit_CircuitPython_FocalTouch#12 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_FocalTouch#11 from dsudduth/master Updating https://github.com/adafruit/Adafruit_CircuitPython_ILI9341 to 1.1.0 from 1.0.6: > Merge pull request adafruit/Adafruit_CircuitPython_ILI9341#16 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_ILI9341#15 from makermelissa/master Updating https://github.com/adafruit/Adafruit_CircuitPython_INA219 to 3.3.0 from 3.2.1: > Merge pull request adafruit/Adafruit_CircuitPython_INA219#14 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_INA219#13 from wallarug/master Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX7219 to 1.2.2 from 1.2.1: > Merge pull request adafruit/Adafruit_CircuitPython_MAX7219#22 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_MAX7219#21 from rhooper/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.7.0 from 3.6.0: > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#50 from Johennes/feature/subscreen > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#52 from Johennes/feature/readme Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1608 to 1.1.0 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_SSD1608#3 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_SSD1608#2 from urish/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_VL53L0X to 3.1.6 from 3.1.5: > Merge pull request adafruit/Adafruit_CircuitPython_VL53L0X#11 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_VL53L0X#10 from rhooper/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_AVRprog to 1.2.1 from 1.2.0: > Update README.rst > Merge pull request adafruit/Adafruit_CircuitPython_AVRprog#14 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_AVRprog#13 from abkosar/master Updating https://github.com/adafruit/Adafruit_CircuitPython_BoardTest to 1.1.1 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_BoardTest#8 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_BoardTest#7 from om8007/fix-issue6 Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 4.0.1 from 4.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#34 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#32 from huyle1097/master Updating https://github.com/adafruit/Adafruit_CircuitPython_Motor to 2.0.1 from 2.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_Motor#34 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_Motor#33 from william3031/master Updating https://github.com/adafruit/Adafruit_CircuitPython_OneWire to 1.1.3 from 1.1.2: > Merge pull request adafruit/Adafruit_CircuitPython_OneWire#15 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_OneWire#13 from sreekaran16/patch-2 Updating https://github.com/adafruit/Adafruit_CircuitPython_RTTTL to 2.3.1 from 2.3.0: > Merge pull request adafruit/Adafruit_CircuitPython_RTTTL#17 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_RTTTL#16 from rhooper/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_SimpleIO to 2.0.2 from 2.0.1: > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#50 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#49 from ilmanzo/simpleio_map_range_simpletest Updating https://github.com/adafruit/Adafruit_CircuitPython_Waveform to 1.2.5 from 1.2.4: > Merge pull request adafruit/Adafruit_CircuitPython_Waveform#14 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_Waveform#13 from abkosar/master
This extends the
image
method with two additional arguments for theimage origin on the screen. The previous exact size check was adapted
to ensure that the image drawn at the supplied origin does not exceed
the display dimensions.
The changes allow to update a smaller part of the screen with an
image which is especially benefitial on lower end hardware. Some
example test results from a Rasberry Pi Zero:
Fixes: #48
Note that this was based off of my changes in #47 and will have to be rebased before merging.