gdi/dib.c GetDIBits
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Thu Nov 4 04:49:47 CST 2004
On Wed, Nov 03, 2004 at 09:24:08PM -0800, Walt Ogburn wrote:
>
> Changelog:
> Take color info from existing hdc instead of creating a new memory HDC.
>
>
> Index: dlls/gdi/dib.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/gdi/dib.c,v
> retrieving revision 1.7
> diff -u -r1.7 dib.c
> --- dlls/gdi/dib.c 2 Nov 2004 05:23:49 -0000 1.7
> +++ dlls/gdi/dib.c 4 Nov 2004 05:08:24 -0000
> @@ -563,7 +559,7 @@
> same color depth then get the color map from it */
> if (bmp->dib && bmp->dib->dsBm.bmBitsPixel == bpp) {
> if(coloruse == DIB_RGB_COLORS) {
> - HBITMAP oldbm = SelectObject(memdc, hbitmap);
> + HBITMAP oldbm = SelectObject(hdc, hbitmap);
> unsigned int colors = 1 << bpp;
>
> if (core_header)
This won't always work since hdc does not necessarily have to be a
memory dc.
I think what you want to do is to store the dib colour table in the
gdi bmp->dib structure rather than in the driver's (x11drv) one. Then
retrieving the colour table can be done by simply accessing the data
directly, rather than through a call to GetDIBColorTable.
Huw.
--
Huw Davies
huw at codeweavers.com
More information about the wine-devel
mailing list