Commit a135e471 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Don't set gradient alpha channel for 8888 bitmaps created with bitfields.

parent a869fc47
...@@ -1320,6 +1320,8 @@ BOOL dibdrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert, ...@@ -1320,6 +1320,8 @@ BOOL dibdrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert,
v[0].y = min( pt[0].y, pt[1].y ); v[0].y = min( pt[0].y, pt[1].y );
v[1].x = max( pt[0].x, pt[1].x ); v[1].x = max( pt[0].x, pt[1].x );
v[1].y = max( pt[0].y, pt[1].y ); v[1].y = max( pt[0].y, pt[1].y );
if (pdev->dib.funcs == &funcs_8888 && pdev->dib.compression == BI_BITFIELDS)
v[0].Alpha = v[1].Alpha = 0; /* Windows bug: no alpha on a8r8g8b8 created with bitfields */
gradient_rect( &pdev->dib, v, mode, pdev->clip ); gradient_rect( &pdev->dib, v, mode, pdev->clip );
} }
return TRUE; return TRUE;
......
...@@ -73,6 +73,7 @@ BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD *bit_f ...@@ -73,6 +73,7 @@ BOOL init_dib_info(dib_info *dib, const BITMAPINFOHEADER *bi, const DWORD *bit_f
dib->bit_count = bi->biBitCount; dib->bit_count = bi->biBitCount;
dib->width = bi->biWidth; dib->width = bi->biWidth;
dib->height = bi->biHeight; dib->height = bi->biHeight;
dib->compression = bi->biCompression;
dib->stride = get_dib_stride( dib->width, dib->bit_count ); dib->stride = get_dib_stride( dib->width, dib->bit_count );
dib->bits.ptr = bits; dib->bits.ptr = bits;
dib->bits.is_copy = FALSE; dib->bits.is_copy = FALSE;
......
...@@ -26,6 +26,7 @@ enum dib_info_flags ...@@ -26,6 +26,7 @@ enum dib_info_flags
typedef struct typedef struct
{ {
int bit_count, width, height; int bit_count, width, height;
int compression;
int stride; /* stride in bytes. Will be -ve for bottom-up dibs (see bits). */ int stride; /* stride in bytes. Will be -ve for bottom-up dibs (see bits). */
struct gdi_image_bits bits; /* bits.ptr points to the top-left corner of the dib. */ struct gdi_image_bits bits; /* bits.ptr points to the top-left corner of the dib. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment