#Trouble limiting scrolling text to a certain part of a daisychained RGB Matrix display
1 messages · Page 1 of 1 (latest)
All the scrolling examples I'm finding are simply dealing with the text overflow by ignoring it since it leaves the visible display but I'm trying eliminate the overflow since it bleeds over to my other displays which I'd like to have separate visuals or messages on
Example of the overflow issue:
I was able to do a temporary solution by creating blackout bitmaps that sit underneath the ball animations but on top of the text
Shown here
The issue is that this only works if the format of my displays is: (animation, text, animation) but would not work once I want to add more scrolling text
As in this example which would be (text, text, animation)
So ideally I would like some help figuring out how to make a "cropped" area that displays scrolling text without overflow if at all possible
My current project code, lots of comments from my attempts at figuring it out myself over the past weeks
is this Gallauger's smooth_scroller library https://github.com/gallaugher/smooth_scroller/blob/main/smooth_scroller.py? there's a private method in there _setup_boundaries() that you may be able to tweak to put limits on the scrolling box
or tweak the library to expose those boundaries, even put them in the init
or
this learn guide example https://learn.adafruit.com/scroll-an-sms-text-message-on-your-rgb-matrix/code-the-message-board uses a messageboard library class that seems to be able to set the limits
class Scroll(Animation):
def scroll_from_to(self, message, duration, start_x, start_y, end_x, end_y):
Hey thanks for the advice, got caught up in something but I’ll test them out once I get time to get to my workshop
Sorry, did not expect that to take 2 weeks
@scenic crystal checked out your suggestions, you're right I was using Gallauger's smooth_scroller which he was kind enough to post in the discord, upon checking the boundaries function it simply is setting the endpoint at which the scroller is reset back to the starting position to conduct the looping effect, no limiting of where the text is visible sadly
Your second example that uses the messageboard library takes it from here: https://learn.adafruit.com/matrixportal-circuitpython-animated-message-board/code-the-message-board which I've read through and has the same issue where it is simply moving the text label like a static object from one point to the other
Quick look back at smooth_scroller … it gets appended directly to the root group, but maybe you could append it to a subgroup of the root group that imposes a mask to limit the visible area?
Though the extensive use of the blit function seems interesting so might be the next thing I dive into
Would a mask not interfere with surrounding animations at all?