Changeset 3589 for trunk/src/gdi32/gdi32.cpp
- Timestamp:
- May 22, 2000, 9:11:28 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/gdi32.cpp
r3255 r3589 1 /* $Id: gdi32.cpp,v 1.4 6 2000-03-28 15:25:47 cbratschiExp $ */1 /* $Id: gdi32.cpp,v 1.47 2000-05-22 19:11:28 sandervl Exp $ */ 2 2 3 3 /* … … 188 188 dprintf(("CreateCompatibleDC %X returned %x", hdc, newHdc)); 189 189 return newHdc; 190 }191 //******************************************************************************192 //******************************************************************************193 INT WIN32API StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,194 INT heightDst, INT xSrc, INT ySrc, INT widthSrc,195 INT heightSrc, const void *bits,196 const BITMAPINFO *info, UINT wUsage, DWORD dwRop )197 {198 #if 1199 dprintf(("GDI32: StretchDIBits %x to (%d,%d) (%d,%d) from (%d,%d) (%d,%d), %x %x %x %x", hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc, widthSrc, heightSrc, bits, info, wUsage, dwRop));200 201 if(wUsage == DIB_PAL_COLORS && info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))202 {203 // workaround for open32 bug.204 // If syscolors > 256 and wUsage == DIB_PAL_COLORS.205 206 int i;207 USHORT *pColorIndex = (USHORT *)info->bmiColors;208 RGBQUAD *pColors = (RGBQUAD *) alloca(info->bmiHeader.biClrUsed *209 sizeof(RGBQUAD));210 BITMAPINFO *infoLoc = (BITMAPINFO *) alloca(sizeof(BITMAPINFO) +211 info->bmiHeader.biClrUsed * sizeof(RGBQUAD));212 213 memcpy(infoLoc, info, sizeof(BITMAPINFO));214 215 if(GetDIBColorTable(hdc, 0, info->bmiHeader.biClrUsed, pColors) == 0)216 return FALSE;217 218 for(i=0;i<info->bmiHeader.biClrUsed;i++, pColorIndex++)219 {220 infoLoc->bmiColors[i] = pColors[*pColorIndex];221 }222 223 return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,224 widthSrc, heightSrc, (void *)bits,225 (PBITMAPINFO)infoLoc, DIB_RGB_COLORS, dwRop);226 }227 228 return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc,229 widthSrc, heightSrc, (void *)bits,230 (PBITMAPINFO)info, wUsage, dwRop);231 #else232 dprintf(("GDI32: StretchDIBits\n"));233 return O32_StretchDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, (void *)arg10, (PBITMAPINFO)arg11, arg12, arg13);234 #endif235 190 } 236 191 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.