-
Notifications
You must be signed in to change notification settings - Fork 63
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
Support static areas (such as bottom line of pixels) that get excluded from scrolling #23
Comments
This is an interesting idea. I'll have to think if there's a graceful way to integrate it into the library without beginning to make things overly complicated. |
I think this may be one of those things that's best demonstrated with an example, rather than building it directly into the library itself. That said, it does require a redraw of the lower portion of the buffer after each scroll to place the "fix" portion into the right place. So perhaps a static layer is a good idea? Thinking about it, a balance between these two extremes- keeping the library simple, but making it easier to produce an example that accomplishes this effect (and more)- might be the best approach. Here's the contents of scroll-phat-hd/library/scrollphathd/is31fl3731.py Lines 453 to 506 in edb45d8
What if we had a This would allow you to modify the buffer in-place right before it's displayed on Scroll pHAT HD, giving an opportunity to draw static UI over the top without having a whole spaghetti mess of static drawing functions and an additional buffer stored within the library. How does that sound? |
Sounds very sound! |
See: f6447a6 This includes a proposed static drawing hook, plus an example to demonstrate how it works. You get direct access to the raw buffer right before it's rotated and drawn. This buffer is two dimensional, indexed X then Y and is the same size as the Scroll pHAT HD display. It represents the slice of the full buffer that is going to be drawn in that My example is not very imaginative, but serves to demonstrate how it works. |
When using a smaller font for scrolling text through the LED matrix, a static top/bottom row of pixels could be used to signal some static information, such as a progress bar, status "bar", et cetera.
The text was updated successfully, but these errors were encountered: