Open croisez opened 4 years ago
You have to implement a canvas (Canvas is just an interface) that delegates to another Canvas but keeps the pixels in an array so that you can implement getPixel(). The FrameCanvas internally converts it into the memory representation needed to push it to the matrix and there is no cheap way converting it back.
Can you point me to some example, I have no idea how to create such delegated Canvas
Le dim. 17 mai 2020 à 18:02, Henner Zeller notifications@github.com a écrit :
You have to implement a canvas (Canvas is just an interface) that delegates to another Canvas but keeps the pixels in an array so that you can implement getPixel(). The FrameCanvas internally converts it into the memory representation needed to push it to the matrix and there is no cheap way converting it back.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hzeller/rpi-rgb-led-matrix/issues/1067#issuecomment-629820444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANRFSJHGOPSZ6VPWABTMP3RSADCNANCNFSM4NDKZWKQ .
I was thinking that it could be of interest to implement a diffusion of a pixel to its surrounded pixels. It could be an equivalent of an anti-aliasing process.
I tried to dig into the code, and arrived at the FrameCanvas::SetPixel() function, and tried to modify it to implement the pixel diffusion. But I was searching for something like FrameCanvas::GetPixel(), but could not find it.
So, how could I determine the RGB values of a pixel, given its coordinates?