Skip to content

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

Merged
merged 1 commit into from
Nov 26, 2019
Merged

Allow image drawing in subscreen areas #50

merged 1 commit into from
Nov 26, 2019

Conversation

Johennes
Copy link
Contributor

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

Note that this was based off of my changes in #47 and will have to be rebased before merging.

@makermelissa
Copy link
Collaborator

As a note to reviewers, it appears this PR is dependent on #47 being approved, so I'll grab this after I have a chance to review #47.

@makermelissa makermelissa self-requested a review November 19, 2019 05:55
@makermelissa
Copy link
Collaborator

@Johennes #47 was merged. Do you want to go ahead and rebase? Thanks

@Johennes
Copy link
Contributor Author

👌 Will take care of it after work today.

@makermelissa
Copy link
Collaborator

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
@Johennes
Copy link
Contributor Author

Ok, it's rebased on master now.

@makermelissa
Copy link
Collaborator

Awesome! Thank you.

Copy link
Collaborator

@makermelissa makermelissa left a 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.

Copy link
Collaborator

@makermelissa makermelissa left a 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.

@makermelissa makermelissa merged commit b236966 into adafruit:master Nov 26, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 26, 2019
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
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.

Can only draw full screen image
2 participants