Changeset 10088 for trunk/src/gdi32/dibitmap.cpp
- Timestamp:
- May 14, 2003, 1:39:59 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibitmap.cpp
r9764 r10088 1 /* $Id: dibitmap.cpp,v 1. 39 2003-02-06 20:28:09 sandervl Exp $ */1 /* $Id: dibitmap.cpp,v 1.40 2003-05-14 11:39:59 sandervl Exp $ */ 2 2 3 3 /* … … 366 366 dprintf(("GDI32: GetDIBits %x %x %d %d %x %x (biBitCount %d) %d", hdc, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, lpbi->bmiHeader.biBitCount, uUsage)); 367 367 368 #if 0 369 if(lpvBits && DIBSection::getSection() != NULL) 370 { 371 DIBSection *dsect; 372 373 dsect = DIBSection::findObj(hBitmap); 374 if(dsect) { 375 char *bmpBits = dsect->GetDIBObject(); 376 377 if(lpbi->bmiHeader.biBitCount == dsect->GetBitCount() && 378 lpbi->bmiHeader.biWidth > 0) 379 { 380 LONG lLineByte; 381 382 dprintf(("Quick copy from DIB section memory")); 383 lLineByte = DIB_GetDIBWidthBytes(lpbi->bmiHeader.biWidth, lpbi->bmiHeader.biBitCount); 384 385 memcpy(lpvBits, bmpBits+(uStartScan*lLineByte), cScanLines*lLineByte); 386 return cScanLines; 387 } 388 } 389 } 390 #endif 391 368 392 //SvL: WGSS screws up the DC if it's a memory DC 369 393 // TODO: Fix in WGSS (tries to select another bitmap in the DC which fails) … … 415 439 } 416 440 else { 441 LONG height = lpbi->bmiHeader.biHeight; 442 443 if(lpbi->bmiHeader.biHeight < 0) { 444 lpbi->bmiHeader.biHeight = -lpbi->bmiHeader.biHeight; 445 } 417 446 nrlines = O32_GetDIBits(hdcMem, hBitmap, uStartScan, cScanLines, lpvBits, lpbi, uUsage); 447 448 //restore height 449 lpbi->bmiHeader.biHeight = height; 418 450 } 419 451 … … 470 502 } 471 503 472 //WGSS/Open32 returns 0when querying the bitmap info; must return nr of scanlines473 // as 0 signals failure504 //WGSS/Open32 returns 1 when querying the bitmap info; must return nr of scanlines 505 //(0 signals failure) 474 506 if(lpvBits == NULL) { 475 nrlines = cScanLines; 507 if(nrlines != 0) 508 nrlines = cScanLines; 509 else dprintf(("GetDIBits failed!!")); 476 510 } 477 511 return nrlines;
Note:
See TracChangeset
for help on using the changeset viewer.