aboutsummaryrefslogtreecommitdiff
path: root/examples/ChainedPanelsScreenBuffer/FastLED_Pixel_Buffer.h
diff options
context:
space:
mode:
authormrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2023-03-10 00:23:22 +0000
committerGitHub <noreply@github.com>2023-03-10 00:23:22 +0000
commitcd47c77bb32ce7e3a14722582dbaf0d5e33270fb (patch)
treedca9aba0b085c0af6c9c4a17b3d0af3d9c6f4e68 /examples/ChainedPanelsScreenBuffer/FastLED_Pixel_Buffer.h
parentde27834976b7ca615a2039f5d8d2b2ba21e64914 (diff)
Delete examples/ChainedPanelsScreenBuffer directory
Diffstat (limited to 'examples/ChainedPanelsScreenBuffer/FastLED_Pixel_Buffer.h')
-rw-r--r--examples/ChainedPanelsScreenBuffer/FastLED_Pixel_Buffer.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/examples/ChainedPanelsScreenBuffer/FastLED_Pixel_Buffer.h b/examples/ChainedPanelsScreenBuffer/FastLED_Pixel_Buffer.h
deleted file mode 100644
index 28db7d5..0000000
--- a/examples/ChainedPanelsScreenBuffer/FastLED_Pixel_Buffer.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef VIRTUAL_MATRIX_PANEL_FASTLED_LAYER
-#define VIRTUAL_MATRIX_PANEL_FASTLED_LAYER
-
-#include <ESP32-VirtualMatrixPanel-I2S-DMA.h>
-#include <FastLED.h>
-
-class VirtualMatrixPanel_FastLED_Pixel_Buffer : public VirtualMatrixPanel
-{
- public:
- using VirtualMatrixPanel::VirtualMatrixPanel; // perform VirtualMatrixPanel class constructor
-
- bool allocateMemory() // allocate memory
- {
- // https://www.geeksforgeeks.org/how-to-declare-a-2d-array-dynamically-in-c-using-new-operator/
- buffer = new CRGB[virtualResX * virtualResY]; // These are defined in the underliny
-
- if (!buffer) { return false; }
-
- Serial.printf("Allocated %d bytes of memory for pixel buffer.\r\n", sizeof(CRGB)*((virtualResX * virtualResY)+1));
- this->clear();
-
- return true;
-
- } // end Buffer
-
- virtual void drawPixel(int16_t x, int16_t y, uint16_t color); // overwrite adafruit implementation
- void drawPixel(int16_t x, int16_t y, int r, int g, int b); // Buffer implementation
- void drawPixel(int16_t x, int16_t y, CRGB color); // Buffer implementation
- CRGB getPixel(int16_t x, int16_t y); // Returns a pixel value from the buffer.
-
-
- void dimAll(byte value);
- void dimRect(int16_t x, int16_t y, int16_t w, int16_t h, byte value);
-
- void clear();
-
- void show(); // Send buffer to physical hardware / DMA engine.
-
- // Release Memory
- ~VirtualMatrixPanel_FastLED_Pixel_Buffer(void);
-
- protected:
- uint16_t XY16( uint16_t x, uint16_t y);
-
- private:
- CRGB* buffer = nullptr;
-};
-
-
-
-#endif \ No newline at end of file