Drawing Circles and Lines in Indexed/Scrolling

Is there a way to draw circles or lines (from point A to point B) in a scrolling layer or Indexed layer?

Is there a readPixel function for index or scrolling layers?

I found out how to draw lines and such in the Indexed layer.

How do you check if the pixel at a location is lit up in the Indexed layer?

A sort of readPixel that spit out a 1 or a 0.
indexedLayer.readPixel(x,y) does not seem to work.

There’s a readPixel. Works like this, but will return 0/1 for indexed later

I tried using:

bool pixelcheck = indexedLayer.readPixel(5,6);

and it gives me an error message:

‘class SMLayerGFXMono<rgb24, bool, 0u>’ has no member named ‘readPixel’

Maybe I misunderstood, but do you mean that if you use:
backgroundLayer.readPixel(x,y)

and that pixel is lit up by the index layer, it will return a 1 instead of an rgb value?

I thought the backgroundLayer.readPixel(x,y) would only read what is on the background layer and not the index layer.

Sorry, I didn’t remember that Indexed and Scrolling layers are missing a readPixel method. It’s something that should be added ideally, but I’m not actively working on this library anymore. There’s already an open issue on GitHub that mentions this missing features among other things:

Thanks for the prompt responses, I and everyone here appreciates your guidance! I will have to find a work around then.

You might be able to use an Adafruit_GFX compatible layer, and the getPixel() method through Adafruit_GFX.

Sorry there’s no read example code for that I can think of, but try modifying this example (use SMARTMATRIX_ALLOCATE_GFX_MONO_LAYER for the equivalent of indexedLayer) and see if readPixel works: