Files
OpenEPaperLink/ESP32_AP-Flasher/lib2/Arduino_GFX-1.3.7/src/Arduino_G.h
mhwlng 8ff9826b3d add support for lilygo t-panel (#370)
* add support for lilygo t-panel

add support for lilygo t-panel (the rs485 version with an ESP32-S3 and ESP32-G2)
https://www.lilygo.cc/products/t-panel-s3

* refactor

* moved gfx library to lib2 folder and removed examples

* removed lib2\Arduino_GFX-1.3.7 and switch to moononournation/GFX Library for Arduino@^1.4.9

* added lilygo lib2\Arduino_GFX-1.3.7 back and removed all unused files. went from 166 files to 15 files!
2024-09-27 17:49:56 +02:00

51 lines
2.1 KiB
C++

#if !defined(LITTLE_FOOT_PRINT)
#ifndef _ARDUINO_G_H_
#define _ARDUINO_G_H_
#include <Arduino.h>
#include "Arduino_DataBus.h"
/// A generic graphics superclass that can handle all sorts of drawing. At a minimum you can subclass and provide drawPixel(). At a maximum you can do a ton of overriding to optimize. Used for any/all Adafruit displays!
class Arduino_G
{
public:
Arduino_G(int16_t w, int16_t h); // Constructor
// This MUST be defined by the subclass:
virtual bool begin(int32_t speed = GFX_NOT_DEFINED) = 0;
virtual void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color, uint16_t bg) = 0;
virtual void drawIndexedBitmap(int16_t x, int16_t y, uint8_t *bitmap, uint16_t *color_index, int16_t w, int16_t h, int16_t x_skip = 0) = 0;
virtual void draw3bitRGBBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h) = 0;
virtual void draw16bitRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, int16_t w, int16_t h) = 0;
virtual void draw24bitRGBBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h) = 0;
protected:
int16_t
WIDTH, ///< This is the 'raw' display width - never changes
HEIGHT; ///< This is the 'raw' display height - never changes
};
#endif // _ARDUINO_G_H_
// utility functions
bool gfx_draw_bitmap_to_framebuffer(
uint16_t *from_bitmap, int16_t bitmap_w, int16_t bitmap_h,
uint16_t *framebuffer, int16_t x, int16_t y, int16_t framebuffer_w, int16_t framebuffer_h);
bool gfx_draw_bitmap_to_framebuffer_rotate_1(
uint16_t *from_bitmap, int16_t bitmap_w, int16_t bitmap_h,
uint16_t *framebuffer, int16_t x, int16_t y, int16_t framebuffer_w, int16_t framebuffer_h);
bool gfx_draw_bitmap_to_framebuffer_rotate_2(
uint16_t *from_bitmap, int16_t bitmap_w, int16_t bitmap_h,
uint16_t *framebuffer, int16_t x, int16_t y, int16_t framebuffer_w, int16_t framebuffer_h);
bool gfx_draw_bitmap_to_framebuffer_rotate_3(
uint16_t *from_bitmap, int16_t bitmap_w, int16_t bitmap_h,
uint16_t *framebuffer, int16_t x, int16_t y, int16_t framebuffer_w, int16_t framebuffer_h);
#endif // !defined(LITTLE_FOOT_PRINT)