- Timestamp:
- Apr 13, 2000, 8:47:16 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibsect.cpp
r3356 r3371 1 /* $Id: dibsect.cpp,v 1.2 6 2000-04-09 11:10:34sandervl Exp $ */1 /* $Id: dibsect.cpp,v 1.27 2000-04-13 18:47:16 sandervl Exp $ */ 2 2 3 3 /* … … 384 384 PVOID bitmapBits = NULL; 385 385 int oldyinversion = 0; 386 387 #if 0 386 BOOL fRestoryYInversion = FALSE; 387 388 #if 1 388 389 HWND hwndDest = WindowFromDC(hdcDest); 389 390 hwndDest = Win32ToOS2Handle(hwndDest); … … 399 400 #endif 400 401 402 if(nDestWidth == 160 && nDestHeight == 120) { 403 nSrcWidth = 160; 404 } 405 401 406 dprintf(("DIBSection::BitBlt %x %X (hps %x) %x to(%d,%d)(%d,%d) from (%d,%d)(%d,%d) rop %x flip %x", 402 //handle, hdcDest, hps, hwndDest, nXdest, nYdest, nDestWidth, nDestHeight,403 handle, hdcDest, hps, 0, nXdest, nYdest, nDestWidth, nDestHeight,407 handle, hdcDest, hps, hwndDest, nXdest, nYdest, nDestWidth, nDestHeight, 408 // handle, hdcDest, hps, 0, nXdest, nYdest, nDestWidth, nDestHeight, 404 409 nXsrc, nYsrc, nSrcWidth, nSrcHeight, Rop, fFlip)); 405 410 … … 428 433 if(fFlip & FLIP_VERT) 429 434 { 430 GpiEnableYInversion(hps, pOS2bmp->cy-1); 431 } 432 else GpiEnableYInversion(hps, 0); 435 if(oldyinversion != pOS2bmp->cy-1) { 436 GpiEnableYInversion(hps, pOS2bmp->cy-1); 437 fRestoryYInversion = TRUE; 438 } 439 } 440 else 441 if(oldyinversion != 0) { 442 GpiEnableYInversion(hps, 0); 443 fRestoryYInversion = TRUE; 444 } 433 445 434 446 if(fFlip & FLIP_HOR) … … 442 454 //SvL: Optimize this.. (don't convert entire bitmap if only a part will be blitted to the dc) 443 455 if(dibinfo.dsBitfields[1] == 0x3E0) {//RGB 555? 444 dprintf(("DIBSection::BitBlt; convert rgb 555 to 565 "));456 dprintf(("DIBSection::BitBlt; convert rgb 555 to 565 (old y inv. = %d", oldyinversion)); 445 457 446 458 if(bmpBitsRGB565 == NULL) … … 471 483 } 472 484 //restore old y inversion height 473 GpiEnableYInversion(hps, oldyinversion); 474 // if(hwndDest != 0) 475 // { 476 // WinReleasePS(hps); 477 // } 485 if(fRestoryYInversion) GpiEnableYInversion(hps, oldyinversion); 486 #if 1 487 if(hwndDest != 0) 488 { 489 WinReleasePS(hps); 490 } 491 #endif 478 492 return(TRUE); 479 493 } 480 GpiEnableYInversion(hps, oldyinversion); 481 // if(hwndDest != 0) 482 // { 483 // WinReleasePS(hps); 484 // } 494 if(fRestoryYInversion) GpiEnableYInversion(hps, oldyinversion); 495 #if 1 496 if(hwndDest != 0) 497 { 498 WinReleasePS(hps); 499 } 500 #endif 485 501 dprintf(("DIBSection::BitBlt %X (%d,%d) (%d,%d) to (%d,%d) (%d,%d) returned %d\n", hps, point[0].x, point[0].y, point[1].x, point[1].y, point[2].x, point[2].y, point[3].x, point[3].y, rc)); 486 // dprintf(("WinGetLastError returned %X\n", WinGetLastError(WinQueryAnchorBlock(hwndDest)) & 0xFFFF)); 502 #if 1 503 dprintf(("WinGetLastError returned %X\n", WinGetLastError(WinQueryAnchorBlock(hwndDest)) & 0xFFFF)); 504 #endif 487 505 return(FALSE); 488 506 }
Note:
See TracChangeset
for help on using the changeset viewer.