epaper area calls

This commit is contained in:
gemu2015 2021-11-16 08:03:15 +01:00
parent 7c60a72995
commit 1278682182
2 changed files with 22 additions and 0 deletions

View File

@ -633,6 +633,12 @@ LVGL_PARAMS *Renderer::lvgl_pars(void) {
return &lvgl_param;
}
void Renderer::ep_update_mode(uint8_t mode) {
}
void Renderer::ep_update_area(uint16_t xp, uint16_t yp, uint16_t width, uint16_t height, uint8_t mode) {
}
// #ifndef USE_DISPLAY_LVGL_ONLY
@ -642,6 +648,18 @@ void VButton::xdrawButton(bool inverted) {
wr_redir=0;
}
void VButton::xinitButtonUL(Renderer *renderer, int16_t gxp, int16_t gyp, uint16_t gxs, uint16_t gys, uint16_t outline,\
uint16_t fill, uint16_t textcolor , char *label, uint8_t textsize) {
initButtonUL(renderer, gxp, gyp, gxs, gys, outline, fill, textcolor, label, textsize);
spars.xp = gxp;
spars.yp = gyp;
spars.xs = gxs;
spars.ys = gys;
}
boolean VButton::didhit(int16_t x, int16_t y) {
return ((x >= spars.xp) && (x < (int16_t) (spars.xp + spars.xs)) &&
(y >= spars.yp) && (y < (int16_t) (spars.yp + spars.ys)));

View File

@ -88,6 +88,8 @@ public:
virtual void Splash(void);
virtual char *devname(void);
virtual LVGL_PARAMS *lvgl_pars(void);
virtual void ep_update_mode(uint8_t mode);
virtual void ep_update_area(uint16_t xp, uint16_t yp, uint16_t width, uint16_t height, uint8_t mode);
void setDrawMode(uint8_t mode);
uint8_t drawmode;
@ -144,6 +146,8 @@ class VButton : public Adafruit_GFX_Button {
boolean didhit(int16_t x, int16_t y);
uint16_t UpdateSlider(int16_t x, int16_t y);
void SliderInit(Renderer *rend, uint16_t xp, uint16_t yp, uint16_t xs, uint16_t ys, uint16_t nelem, uint16_t bgcol, uint16_t frcol, uint16_t barcol);
void xinitButtonUL(Renderer *renderer, int16_t gxp, int16_t gyp, uint16_t gxs, uint16_t gys, uint16_t outline,\
uint16_t fill, uint16_t textcolor , char *label, uint8_t textsize);
};
// #endif // USE_DISPLAY_LVGL_ONLY