Skip to content

Commit 70c0951

Browse files
Finomnismstumpf-vected
authored andcommitted
samples: drivers: display: adjust alpha handling
ARGB8888 values all had alpha '0x00' (=transparent). Changed them to '0xFF' and added a transparency test patch in the middle of the screen. Signed-off-by: Martin Stumpf <[email protected]>
1 parent 3c66212 commit 70c0951

File tree

1 file changed

+5
-5
lines changed
  • samples/drivers/display/src

1 file changed

+5
-5
lines changed

samples/drivers/display/src/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ static void fill_buffer_argb8888(enum corner corner, uint8_t grey, uint8_t *buf,
5050

5151
switch (corner) {
5252
case TOP_LEFT:
53-
color = 0x00FF0000u;
53+
color = 0xFFFF0000u;
5454
break;
5555
case TOP_RIGHT:
56-
color = 0x0000FF00u;
56+
color = 0xFF00FF00u;
5757
break;
5858
case BOTTOM_RIGHT:
59-
color = 0x000000FFu;
59+
color = 0xFF0000FFu;
6060
break;
6161
case BOTTOM_LEFT:
62-
color = grey << 16 | grey << 8 | grey;
62+
color = 0xFF000000u | grey << 16 | grey << 8 | grey;
6363
break;
6464
}
6565

@@ -239,7 +239,7 @@ int main(void)
239239

240240
switch (capabilities.current_pixel_format) {
241241
case PIXEL_FORMAT_ARGB_8888:
242-
bg_color = 0xFFu;
242+
bg_color = 0x00u;
243243
fill_buffer_fnc = fill_buffer_argb8888;
244244
buf_size *= 4;
245245
break;

0 commit comments

Comments
 (0)