- Timestamp:
- May 25, 2001, 12:05:29 PM (24 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibitmap.cpp
r5390 r5799 1 /* $Id: dibitmap.cpp,v 1.1 5 2001-03-27 20:47:52sandervl Exp $ */1 /* $Id: dibitmap.cpp,v 1.16 2001-05-25 10:05:28 sandervl Exp $ */ 2 2 3 3 /* … … 301 301 const BITMAPINFO *pBitmapInfo, UINT usage) 302 302 { 303 int ret; 304 303 305 dprintf(("GDI32: SetDIBits %x %x %x %x %x %x %x", hdc, hBitmap, startscan, numlines, pBits, pBitmapInfo, usage)); 304 306 305 if(DIBSection::getSection() != NULL)306 {307 DIBSection *dsect;308 309 dsect = DIBSection::findObj(hBitmap);310 if(dsect) {311 return dsect->SetDIBits(hdc, hBitmap, startscan, numlines, pBits, (BITMAPINFOHEADER_W *)&pBitmapInfo->bmiHeader, usage);312 }313 }314 307 //SvL: Open32's SetDIBits really messes things up for 1 bpp bitmaps, must use SetBitmapBits 315 308 if(pBitmapInfo->bmiHeader.biBitCount == 1 && startscan == 0 && numlines == pBitmapInfo->bmiHeader.biHeight) … … 344 337 } 345 338 #endif 346 return O32_SetDIBits(hdc, hBitmap, startscan, numlines, pBits, pBitmapInfo, usage); 347 } 348 //****************************************************************************** 349 //****************************************************************************** 339 ret = O32_SetDIBits(hdc, hBitmap, startscan, numlines, pBits, pBitmapInfo, usage); 340 if(DIBSection::getSection() != NULL) 341 { 342 DIBSection *dsect; 343 344 dsect = DIBSection::findObj(hBitmap); 345 if(dsect) { 346 HBITMAP hBmpOld = SelectObject(hdc, hBitmap); 347 dsect->sync(hdc, 0, dsect->GetHeight()); 348 SelectObject(hdc, hBmpOld); 349 } 350 } 351 352 return ret; 353 } 354 //****************************************************************************** 355 //****************************************************************************** -
trunk/src/gdi32/dibsect.cpp
r5677 r5799 1 /* $Id: dibsect.cpp,v 1.5 0 2001-05-10 17:03:18sandervl Exp $ */1 /* $Id: dibsect.cpp,v 1.51 2001-05-25 10:05:29 sandervl Exp $ */ 2 2 3 3 /* … … 389 389 int i; 390 390 391 dprintf(("SetDIBColorTable %d %d %x", startIdx, cEntries, rgb)); 391 392 if(startIdx + cEntries > (1 << pOS2bmp->cBitCount)) 392 393 { … … 713 714 #endif 714 715 } 716 memcpy(pOS2bmp, tmphdr, os2bmphdrsize); 715 717 716 718 #if 0 -
trunk/src/gdi32/palette.cpp
r4127 r5799 1 /* $Id: palette.cpp,v 1. 7 2000-08-30 18:05:25sandervl Exp $ */1 /* $Id: palette.cpp,v 1.8 2001-05-25 10:05:29 sandervl Exp $ */ 2 2 3 3 /* … … 81 81 HPALETTE WIN32API SelectPalette(HDC hdc, HPALETTE hPalette, BOOL bForceBackground) 82 82 { 83 HPALETTE hPal; 84 83 85 dprintf(("GDI32: SelectPalette (0x%08X, 0x%08X, 0x%08X)", hdc, hPalette, bForceBackground)); 86 hPal = O32_SelectPalette(hdc, hPalette, bForceBackground); 84 87 if(DIBSection::getSection() != NULL) 85 88 { … … 87 90 if(dsect) 88 91 { 89 int nrcolors; 90 PALETTEENTRY Pal[256]; 91 char PalSize = dsect->GetBitCount(); 92 dprintf((" - Set Palette Values in DIBSection\n")); 93 if(PalSize<=8) 94 { 95 nrcolors = GetPaletteEntries( hPalette, 0, 1<<PalSize, (LPPALETTEENTRY)&Pal); 96 dsect->SetDIBColorTable(0, nrcolors, (RGBQUAD*)&Pal); 97 } 98 92 dsect->sync(hdc, 0, dsect->GetHeight()); 99 93 } 100 94 } 101 return O32_SelectPalette(hdc, hPalette, bForceBackground);95 return hPal; 102 96 } 103 97 //****************************************************************************** -
trunk/src/gdi32/text.cpp
r5795 r5799 1 /* $Id: text.cpp,v 1.2 1 2001-05-24 19:26:31sandervl Exp $ */1 /* $Id: text.cpp,v 1.22 2001-05-25 10:05:29 sandervl Exp $ */ 2 2 3 3 /* … … 874 874 // in the Settings dialog box of VirtualPC. Strings are clipped. 875 875 // (e.g.: Hard Disk 1 -> Hard Disk) 876 return O32_GetTextExtentPoint(hdc, lpsz, cbString, lpsSize); 876 dprintf(("GDI32: GetTextExtentPointA %s\n", lpsz)); 877 BOOL rc = O32_GetTextExtentPoint(hdc, lpsz, cbString, lpsSize); 878 if(rc) { 879 dprintf(("GDI32: GetTextExtentPointA %x %s %d returned %d (%d,%d)", hdc, lpsz, cbString, rc, lpsSize->cx, lpsSize->cy)); 880 SetLastError(ERROR_SUCCESS); 881 return TRUE; 882 } 883 return FALSE; 877 884 #else 878 885 BOOL rc;
Note:
See TracChangeset
for help on using the changeset viewer.