Skip to content
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

presto.partial_update not updating the supplied region #56

Open
themissingcow opened this issue Feb 12, 2025 · 2 comments
Open

presto.partial_update not updating the supplied region #56

themissingcow opened this issue Feb 12, 2025 · 2 comments

Comments

@themissingcow
Copy link

I was attempting to use presto.partial_update, and finding the screen didn't update. Did I miss anything?

Expected Behaviour

The screen is white in the top half, and blue in the bottom.

Observed Behaviour

The screen is blue.

Repro

Run the following snippet on the Presto with release 0.0.7.

from presto import Presto

presto = Presto()
display = presto.display
w, h = display.get_bounds()

BLUE = display.create_pen(28, 181, 202)
WHITE = display.create_pen(255, 255, 255)

display.set_pen(BLUE)
display.clear()

presto.update()

display.set_pen(WHITE)
display.clear()

presto.partial_update(0, 0, w, h // 2)
@MichaelBell
Copy link
Collaborator

Partial update currently only works if there is a single layer. Use presto = Presto(layers=1) for that.

Keep this issue open though to track fixing it to work in the default case.

@themissingcow
Copy link
Author

themissingcow commented Feb 12, 2025

Got you, thanks for the clarification 👍

@Gadgetoid Gadgetoid mentioned this issue Apr 1, 2025
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

No branches or pull requests

2 participants