From 82047b1ac6e56361abac0c4b01f06c405e941d19 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 1 Oct 2017 18:00:49 +1000 Subject: STM32LTDC 2nd layer support with alpha --- src/gdisp/gdisp_colors.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gdisp') diff --git a/src/gdisp/gdisp_colors.h b/src/gdisp/gdisp_colors.h index 8c72f9ac..5bfcfca2 100644 --- a/src/gdisp/gdisp_colors.h +++ b/src/gdisp/gdisp_colors.h @@ -328,6 +328,13 @@ typedef uint16_t colorformat; #endif #define HTML2COLOR(h) ((COLOR_TYPE)(HTML2COLOR_R(h) | HTML2COLOR_G(h) | HTML2COLOR_B(h))) + // Special hack to allow alpha on RGB888 + #if GDISP_PIXELFORMAT == GDISP_PIXELFORMAT_RGB888 + #define GFXTRANSPARENT (0xFF000000) + #define AHTML2COLOR(h) ((h) ^ 0xFF000000) + #define ARGB2COLOR(a,r,g,b) ((((COLOR_TYPE)(((a) ^ 0xFF) & 0xFF)) << 24) | RGB2COLOR_R(r) | RGB2COLOR_G(g) | RGB2COLOR_B(b)) + #endif + //------------------------- // Gray-scale color system //------------------------- -- cgit v1.2.3