mrcodetastic / ESP32-HUB75-MatrixPanel-DMA

An Adafruit GFX Compatible Library for the ESP32, ESP32-S2, ESP32-S3 to drive HUB75 LED matrix panels using DMA for high refresh rates. Supports panel chaining.
MIT License
939 stars 208 forks source link

DrawIcon with VirtualMatrixPanel (2X2 structure) is not Implemented yet (class VirtualMatrixPanel' has no member named drawIcon) #585

Closed Abdulrahman-owayj closed 1 month ago

Abdulrahman-owayj commented 7 months ago

hi, Im using 4 panels with (2x2) structure, it works great with (fillRect, print , etc), but I see that there is no drawicon function implemented yet, when trying to solve it i found your note in the library.

/*
// need to recreate this one, as it wouldn't work to just map where it starts.
inline void VirtualMatrixPanel::drawIcon (int *ico, int16_t x, int16_t y, int16_t icon_cols, int16_t icon_rows) {
  int i, j;
  for (i = 0; i < icon_rows; i++) {
    for (j = 0; j < icon_cols; j++) {
      // This is a call to this libraries version of drawPixel
      // which will map each pixel, which is what we want.
      //drawPixelRGB565 (x + j, y + i, ico[i * module_cols + j]);
    drawPixel (x + j, y + i, ico[i * icon_cols + j]);
    }
  }
}
*/

I appreciate your effort for this library, You did a very fantastic job!

Abdulrahman-owayj commented 7 months ago

Well, i tried your commented code and it works great, im not sure why its not released.

the only problem is that when i use drawIcon more than one time the DRAM is filled and i get an error, i need to find a solution to release resources after every call

thank you for your effort

Lukaswnd commented 6 months ago

The VirtualMatrixPanel itselfe is not ment to have any GFX functionallity. You are suppost, to use Adafruit_GFX, GFX, or any other GFX implementation, you have to combine yourselfe.

mrcodetastic commented 1 month ago

I will be removing drawIcon from the library at some point.