Cleanup
This commit is contained in:
+3
-7
@@ -420,19 +420,16 @@ void BitmapBuffer::drawFilledRect(coord_t x, coord_t y, coord_t w, coord_t h, ui
|
|||||||
else {
|
else {
|
||||||
// SOLID
|
// SOLID
|
||||||
|
|
||||||
|
|
||||||
// TODO: can this be done in one step? (see drawBitmapPattern())
|
// TODO: can this be done in one step? (see drawBitmapPattern())
|
||||||
|
|
||||||
// Use the DMA2D to blend a scratch buffer filled with overlay color
|
// Use the DMA2D to blend a scratch buffer filled with overlay color
|
||||||
BitmapBuffer scratch(BMP_ARGB4444, LCD_W, LCD_H, lcdGetScratchBuffer());
|
BitmapBuffer scratch(BMP_ARGB4444, LCD_W, LCD_H, lcdGetScratchBuffer());
|
||||||
RGB_SPLIT(COLOR_VAL(flags), r, g, b);
|
|
||||||
|
|
||||||
LcdFlags flags =
|
RGB_SPLIT(COLOR_VAL(flags), r, g, b);
|
||||||
uint32_t(ARGB((OPACITY_MAX - opacity) << 4, r << 3, g << 2, b << 3))
|
pixel_t color_argb = ARGB((OPACITY_MAX - opacity) << 4, r << 3, g << 2, b << 3);
|
||||||
<< 16;
|
|
||||||
|
|
||||||
// Fill the buffer
|
// Fill the buffer
|
||||||
scratch.drawSolidFilledRect(0, 0, w, h, flags);
|
scratch.drawSolidFilledRect(0, 0, w, h, color_argb << 16);
|
||||||
|
|
||||||
// And blend
|
// And blend
|
||||||
drawBitmapAbs(x, y, &scratch, 0, 0, w, h);
|
drawBitmapAbs(x, y, &scratch, 0, 0, w, h);
|
||||||
@@ -760,7 +757,6 @@ void BitmapBuffer::drawMask(coord_t x, coord_t y, const BitmapBuffer * mask, con
|
|||||||
// drawAlphaPixel(bmp[x][y], pixel(x,y), color)
|
// drawAlphaPixel(bmp[x][y], pixel(x,y), color)
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
void DMACopyAlphaMask(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint8_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h, uint16_t bg_color);
|
|
||||||
//
|
//
|
||||||
void BitmapBuffer::drawBitmapPattern(coord_t x, coord_t y, const uint8_t * bmp, LcdFlags flags, coord_t offset, coord_t width)
|
void BitmapBuffer::drawBitmapPattern(coord_t x, coord_t y, const uint8_t * bmp, LcdFlags flags, coord_t offset, coord_t width)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ void lcdNextLayer();
|
|||||||
uint16_t* lcdGetScratchBuffer();
|
uint16_t* lcdGetScratchBuffer();
|
||||||
void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h);
|
void DMACopyBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h);
|
||||||
void DMACopyAlphaBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h);
|
void DMACopyAlphaBitmap(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint16_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h);
|
||||||
|
void DMACopyAlphaMask(uint16_t * dest, uint16_t destw, uint16_t desth, uint16_t x, uint16_t y, const uint8_t * src, uint16_t srcw, uint16_t srch, uint16_t srcx, uint16_t srcy, uint16_t w, uint16_t h, uint16_t bg_color);
|
||||||
void onKeyPress();
|
void onKeyPress();
|
||||||
void onKeyError();
|
void onKeyError();
|
||||||
void killEvents(event_t event);
|
void killEvents(event_t event);
|
||||||
|
|||||||
Reference in New Issue
Block a user