Changeset 1606 for trunk/src/gdi32/gdi32.cpp
- Timestamp:
- Nov 5, 1999, 10:17:27 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/gdi32.cpp
r1533 r1606 1 /* $Id: gdi32.cpp,v 1.1 2 1999-10-31 21:38:17 achimhaExp $ */1 /* $Id: gdi32.cpp,v 1.13 1999-11-05 09:17:27 sandervl Exp $ */ 2 2 3 3 /* … … 297 297 //****************************************************************************** 298 298 //****************************************************************************** 299 int WIN32API StretchDIBits( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int arg9, const void * arg10, const BITMAPINFO *arg11, UINT arg12, DWORD arg13) 300 { 299 INT WIN32API StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst, 300 INT heightDst, INT xSrc, INT ySrc, INT widthSrc, 301 INT heightSrc, const void *bits, 302 const BITMAPINFO *info, UINT wUsage, DWORD dwRop ) 303 { 304 #if 1 305 dprintf(("GDI32: StretchDIBits")); 306 307 if(wUsage == DIB_PAL_COLORS && info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER)) 308 { 309 // workaround for open32 bug. 310 // If syscolors > 256 and wUsage == DIB_PAL_COLORS. 311 312 int i; 313 USHORT *pColorIndex = (USHORT *)info->bmiColors; 314 RGBQUAD *pColors = (RGBQUAD *) alloca(info->bmiHeader.biClrUsed * 315 sizeof(RGBQUAD)); 316 BITMAPINFO *infoLoc = (BITMAPINFO *) alloca(sizeof(BITMAPINFO) + 317 info->bmiHeader.biClrUsed * sizeof(RGBQUAD)); 318 319 memcpy(infoLoc, info, sizeof(BITMAPINFO)); 320 321 if(GetDIBColorTable(hdc, 0, info->bmiHeader.biClrUsed, pColors) == 0) 322 return FALSE; 323 324 for(i=0;i<info->bmiHeader.biClrUsed;i++, pColorIndex++) 325 { 326 infoLoc->bmiColors[i] = pColors[*pColorIndex]; 327 } 328 329 return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc, 330 widthSrc, heightSrc, (void *)bits, 331 (PBITMAPINFO)infoLoc, DIB_RGB_COLORS, dwRop); 332 } 333 334 return O32_StretchDIBits(hdc, xDst, yDst, widthDst, heightDst, xSrc, ySrc, 335 widthSrc, heightSrc, (void *)bits, 336 (PBITMAPINFO)info, wUsage, dwRop); 337 #else 301 338 dprintf(("GDI32: StretchDIBits\n")); 302 339 return O32_StretchDIBits(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, (void *)arg10, (PBITMAPINFO)arg11, arg12, arg13); 340 #endif 303 341 } 304 342 //****************************************************************************** … … 2054 2092 int i; 2055 2093 2056 dprintf(("GDI32: OS2GetDIBColorTable, not implemented?\n"));2057 2094 rc = O32_GetPaletteEntries(hpal, 2058 2095 uStartIndex, … … 2063 2100 i++) 2064 2101 { 2102 BYTE tmp; 2103 tmp = pColors[i].rgbBlue; 2104 pColors[i].rgbBlue = pColors[i].rgbRed; 2105 pColors[i].rgbRed = tmp; 2065 2106 pColors[i].rgbReserved = 0; 2066 2107 } 2067 dprintf(("GDI32: GetDIBColor returns %d\n", rc));2108 dprintf(("GDI32: GetDIBColorTable returns %d\n", rc)); 2068 2109 return(rc); 2069 2110 }
Note:
See TracChangeset
for help on using the changeset viewer.