- Timestamp:
- Jan 31, 2000, 11:30:08 PM (26 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibsect.cpp
r2267 r2581 1 /* $Id: dibsect.cpp,v 1.1 2 1999-12-30 11:21:29sandervl Exp $ */1 /* $Id: dibsect.cpp,v 1.13 2000-01-31 22:30:07 sandervl Exp $ */ 2 2 3 3 /* … … 19 19 #define OS2_ONLY 20 20 #include "dibsect.h" 21 #include <vmutex.h> 21 22 22 23 HWND WIN32API WindowFromDC(HDC hdc); … … 36 37 } 37 38 39 static VMutex dibMutex; 38 40 39 41 //NOTE: … … 48 50 bmpsize = pbmi->biWidth; 49 51 /* @@@PH 98/06/07 -- high-color bitmaps don't have palette */ 50 51 52 52 53 this->fFlip = fFlip; … … 81 82 82 83 bmpBits = (char *)malloc(bmpsize*pbmi->biHeight); 84 memset(bmpBits, 0, bmpsize*pbmi->biHeight); 83 85 84 86 pOS2bmp = (BITMAPINFO2 *)malloc(os2bmpsize); 85 87 86 memset(pOS2bmp, /* set header + palette entries to zero */87 0,88 os2bmpsize);88 memset(pOS2bmp, /* set header + palette entries to zero */ 89 0, 90 os2bmpsize); 89 91 90 92 pOS2bmp->cbFix = sizeof(BITMAPINFO2) - sizeof(RGB2); … … 95 97 pOS2bmp->ulCompression = pbmi->biCompression; 96 98 pOS2bmp->cbImage = pbmi->biSizeImage; 99 dprintf(("handle %x", handle)); 97 100 dprintf(("pOS2bmp->cx %d\n", pOS2bmp->cx)); 98 101 dprintf(("pOS2bmp->cy %d\n", pOS2bmp->cy)); … … 105 108 this->handle = handle; 106 109 110 dibMutex.enter(); 107 111 if(section == NULL) 108 112 { … … 124 128 dsect->next = this; 125 129 } 126 127 dprintf2(("Class created")); 130 dibMutex.leave(); 128 131 } 129 132 //****************************************************************************** … … 131 134 DIBSection::~DIBSection() 132 135 { 136 dprintf(("Delete DIBSection %x", handle)); 133 137 if(bmpBits) 134 138 free(bmpBits); … … 136 140 free(pOS2bmp); 137 141 142 dibMutex.enter(); 138 143 if(section == this) 139 144 { … … 150 155 dsect->next = this->next; 151 156 } 157 dibMutex.leave(); 152 158 } 153 159 //****************************************************************************** … … 253 259 if(hwndDest != 0) 254 260 { 255 hps = WinGetPS(hwndDest);261 hps = WinGetPS(hwndDest); 256 262 } 257 263 if(hps == 0) 258 264 { 259 eprintf(("DIBSection::BitBlt, hps == 0 hwndDest = %X", hwndDest));265 dprintf(("ERROR: DIBSection::BitBlt, hps == 0 hwndDest = %X", hwndDest)); 260 266 return(FALSE); 261 267 } 262 268 263 dprintf(("DIBSection::BitBlt % X %x to(%d,%d)(%d,%d) from (%d,%d)(%d,%d) rop %x\n",264 h dcDest, hwndDest, nXdest, nYdest, nDestWidth, nDestHeight,265 nXsrc, nYsrc, nSrcWidth, nSrcHeight, Rop ));269 dprintf(("DIBSection::BitBlt %x %X (hps %x) %x to(%d,%d)(%d,%d) from (%d,%d)(%d,%d) rop %x flip %x", 270 handle, hdcDest, hps, hwndDest, nXdest, nYdest, nDestWidth, nDestHeight, 271 nXsrc, nYsrc, nSrcWidth, nSrcHeight, Rop, fFlip)); 266 272 267 273 point[0].x = nXdest; … … 327 333 DIBSection *dsect = section; 328 334 335 dibMutex.enter(); 329 336 while(dsect) 330 337 { 331 338 if(dsect->handle == handle) 332 339 { 333 return(dsect); 340 dibMutex.leave(); 341 return(dsect); 334 342 } 335 343 dsect = dsect->next; 336 344 } 345 dibMutex.leave(); 337 346 return(NULL); 338 347 } … … 423 432 char DIBSection::GetBitCount() 424 433 { 425 if( NULL==pOS2bmp)434 if(pOS2bmp == NULL) 426 435 return 0; 427 436 else -
trunk/src/gdi32/gdi32.cpp
r2573 r2581 1 /* $Id: gdi32.cpp,v 1.3 5 2000-01-30 15:04:40sandervl Exp $ */1 /* $Id: gdi32.cpp,v 1.36 2000-01-31 22:30:08 sandervl Exp $ */ 2 2 3 3 /* … … 319 319 320 320 OSLibGpiSetCp(newHdc, oldcp); 321 dprintf(("CreateCompatibleDC %X returned %x", hdc, newHdc)); 321 322 return newHdc; 322 323 } … … 329 330 { 330 331 #if 1 331 dprintf(("GDI32: StretchDIBits "));332 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)); 332 333 333 334 if(wUsage == DIB_PAL_COLORS && info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER)) … … 1246 1247 //****************************************************************************** 1247 1248 //****************************************************************************** 1248 HANDLE WIN32API GetCurrentObject( HDC arg1, UINT arg2)1249 { 1250 dprintf(("GDI32: GetCurrentObject "));1251 return (HANDLE)O32_GetCurrentObject( arg1, arg2);1249 HANDLE WIN32API GetCurrentObject( HDC hdc, UINT arg2) 1250 { 1251 dprintf(("GDI32: GetCurrentObject %x %x", hdc, arg2)); 1252 return (HANDLE)O32_GetCurrentObject(hdc, arg2); 1252 1253 } 1253 1254 //****************************************************************************** … … 1515 1516 //****************************************************************************** 1516 1517 //****************************************************************************** 1517 BOOL WIN32API GetTextExtentPoint32A( HDC arg1, LPCSTR arg2, int arg3, PSIZE lpSize) 1518 { 1519 dprintf(("GDI32: GetTextExtentPoint32A")); 1518 BOOL WIN32API GetTextExtentPoint32A( HDC hdc, LPCSTR lpsz, int cbString, PSIZE lpSize) 1519 { 1520 BOOL rc; 1521 1520 1522 lpSize->cx = lpSize->cy = 0; 1521 return O32_GetTextExtentPoint32(arg1, arg2, arg3, lpSize); 1523 rc = O32_GetTextExtentPoint32(hdc, lpsz, cbString, lpSize); 1524 dprintf(("GDI32: GetTextExtentPoint32A %x %s %d returned %d (%d,%d)", hdc, lpsz, cbString, rc, lpSize->cx, lpSize->cy)); 1525 return rc; 1522 1526 } 1523 1527 //****************************************************************************** … … 1896 1900 //****************************************************************************** 1897 1901 //****************************************************************************** 1898 int WIN32API SelectClipRgn( HDC arg1, HRGN arg2)1899 { 1900 dprintf(("GDI32: SelectClipRgn "));1901 return O32_SelectClipRgn( arg1, arg2);1902 int WIN32API SelectClipRgn( HDC hdc, HRGN hRgn) 1903 { 1904 dprintf(("GDI32: SelectClipRgn %x %x", hdc, hRgn)); 1905 return O32_SelectClipRgn(hdc, hRgn); 1902 1906 } 1903 1907 //****************************************************************************** … … 2006 2010 // if(xDest == 0 && yDest == 0 && xSrc == 0 && ySrc == 0 && cx == width && cy == height) { 2007 2011 // result = OSLibSetDIBitsToDevice(hdc, xDest, yDest, cx, cy, xSrc, ySrc, startscan, lines, (PVOID) bits, (WINBITMAPINFOHEADER*)info, coloruse); 2012 // result = lines; 2008 2013 // } 2009 2014 // else { … … 2241 2246 if(pbmi->bmiHeader.biWidth < 0) 2242 2247 { 2243 pbmi->bmiHeader.biWidth = -pbmi->bmiHeader.biWidth; 2244 fFlip = FLIP_HOR; 2248 dprintf(("CreateDIBSection: width %d", pbmi->bmiHeader.biWidth)); 2249 pbmi->bmiHeader.biWidth = -pbmi->bmiHeader.biWidth; 2250 fFlip = FLIP_HOR; 2245 2251 } 2246 2252 iHeight = pbmi->bmiHeader.biHeight; 2247 2253 if(pbmi->bmiHeader.biHeight < 0) 2248 2254 { 2249 pbmi->bmiHeader.biHeight = -pbmi->bmiHeader.biHeight; 2250 fFlip |= FLIP_VERT; 2255 dprintf(("CreateDIBSection: height %d", pbmi->bmiHeader.biHeight)); 2256 pbmi->bmiHeader.biHeight = -pbmi->bmiHeader.biHeight; 2257 fFlip |= FLIP_VERT; 2251 2258 } 2252 2259 … … 2288 2295 pbmi->bmiHeader.biHeight = iHeight; 2289 2296 2290 dprintf(("GDI32: return %08X\n",res));2291 2297 return(res); 2292 2298 } -
trunk/src/gdi32/line.cpp
r2221 r2581 1 /* $Id: line.cpp,v 1. 3 1999-12-27 22:52:39 cbratschiExp $ */1 /* $Id: line.cpp,v 1.4 2000-01-31 22:30:08 sandervl Exp $ */ 2 2 /* 3 3 * Line API's … … 71 71 PVOID pHps = OSLibGpiQueryDCData(hdc); 72 72 73 dprintf(("GDI32: MoveToEx \n"));73 dprintf(("GDI32: MoveToEx %x (%d,%d)", hdc, X, Y)); 74 74 75 75 if (pHps) … … 105 105 BOOL rc = TRUE; 106 106 107 dprintf(("GDI32: LineTo "));107 dprintf(("GDI32: LineTo %x (%d,%d)", hdc, nXEnd, nYEnd)); 108 108 109 109 if (pHps)
Note:
See TracChangeset
for help on using the changeset viewer.