I’m trying to get a bitmap to display over scrolling text. (moving right to left.) Right now it just shows up behind it like it is transparent. Is there a way to limit how far the text scrolls to the left or to place a background under the bitmap the blocks the text? I’m newish to programming and am having a slow time understanding some of the classes.
I figured out what to do. I drew a second background layer and put the bitmap on top of that. I never thought to add more background layers, it seemed to me that the explanation of it implied only one background layer could be used.
Huh, that shouldn’t work. Not that you can’t do that, but the background layer isn’t transparent so you shouldn’t be able to see through it. Are you using
I have that in the code, but I don’t think I’m using that. I am likely assuming how it works is different than what is going on. I have a background layer, a scrolling layer, a background layer01, and an indexed layer (that I don’t use yet.). I call the drawBitmap function I copied from the example code and draw it on top of the background01 layer, and it seems to sit on top of the scrolling layer. I wouldn’t mind someone looking at the code to see what insanity I’ve done, but I don’t know where to put it.
Here is the gist link. I don’t know if there is a better way to do this or to embed it here. I don’t know if I was clear on what I was trying to accomplish, I was trying to keep the scrolling layer from showing up behind the bitmap. This seems to do just that.
I tried out your code and see what you’re doing now. Your second background layer doesn’t fill the whole screen, so you can see around it, but not see through it. I assumed you would want a transparent bitmap, so for example, you’d see the circle but not the black border. (I changed the dimensions of your sketch to match my matrix, I’m sure it looks better on your matrix)
I’m glad this is working for you, but SmartMatrix Library wasn’t designed for this use case. You can’t position the extra bitmap layer anywhere but starting from coordinates (0,0) for example.
If you do want a full color layer with transparency, this is the only solution I know of compatible with SmartMatrix Library:
I really appreciate looking at the code. In the narrow scope I’m using this for, it works for it, as my matrix is a wide marquee trying to emulate some subway signage. I can see how that would not work on a differently configured matrix. This whole setup though is fantastic, being able to drive these panels with relative ease. Thank you for all the hard work put into this board and the software. I’ll play around with the JPG SD code, that looks interesting.