qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 07/23] console: switch color_table_rgb to pixman


From: Søren Sandmann
Subject: Re: [Qemu-devel] [PATCH 07/23] console: switch color_table_rgb to pixman_color_t
Date: Thu, 21 Mar 2013 05:49:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Gerd Hoffmann <address@hidden> writes:

> @@ -255,7 +250,10 @@ enum color_names {
>  };
>  #endif
>  
> -static const uint32_t color_table_rgb[2][8] = {
> +#define QEMU_RGB(r, g, b)                                               \
> +    { .red = r << 8, .green = g << 8, .blue = b << 8, .alpha = 0 }

Are you sure you don't want alpha = 0xffff here? When using alpha = 0
with the OVER operator, the result will be that the color is added to
the background rather than composited with it. For example if the
foreground color is pink: 0xff00ff and the background is green:
0x00ff00, the result will be white (0xff00ff + 0x00ff00 = 0xffffff) text
on green background. With alpha = 0xffff, you would get pink text on
green background.


Søren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]