- Timestamp:
- Jun 26, 2000, 12:27:45 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibsect.cpp
r3726 r3755 1 /* $Id: dibsect.cpp,v 1.3 5 2000-06-17 11:58:07sandervl Exp $ */1 /* $Id: dibsect.cpp,v 1.36 2000-06-26 10:27:45 sandervl Exp $ */ 2 2 3 3 /* … … 397 397 pDCData pHps; 398 398 399 pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc );399 pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdcDest); 400 400 if(!pHps) 401 401 { … … 428 428 } 429 429 430 //win32 coordinates are of theleft top, OS/2 expects left bottom430 //win32 coordinates are relative to left top, OS/2 expects left bottom 431 431 //source rectangle is non-inclusive (top, right not included) 432 //destination rectangle is incl.-inclusive (everything included) 432 433 if(nXdest + nDestWidth > hdcWidth) { 433 434 nDestWidth = hdcWidth - nXdest; … … 438 439 point[0].x = nXdest; 439 440 point[0].y = hdcHeight - nYdest - nDestHeight; 440 point[1].x = nXdest + nDestWidth ;441 point[1].y = hdcHeight - nYdest ;441 point[1].x = nXdest + nDestWidth - 1; 442 point[1].y = hdcHeight - nYdest - 1; 442 443 443 444 //target rectangle is inclusive-inclusive … … 453 454 point[3].y = pOS2bmp->cy - nYsrc; 454 455 456 dprintf(("DIBSection::BitBlt (%d,%d)(%d,%d) from (%d,%d)(%d,%d) dim (%d,%d)(%d,%d)", point[0].x, point[0].y, 457 point[1].x, point[1].y, point[2].x, point[2].y, point[3].x, point[3].y, 458 nDestWidth, nDestHeight, nSrcWidth, nSrcHeight)); 459 460 /* 461 hwndDest = Win32ToOS2Handle(hwndDest); 462 if(hwndDest != 0) 463 { 464 hps = WinGetPS(hwndDest); 465 } 466 */ 455 467 oldyinversion = GpiQueryYInversion(hps); 456 468 if(oldyinversion != 0) { … … 511 523 else rc = GpiDrawBits(hps, bitmapBits, pOS2bmp, 4, &point[0], ROP_SRCCOPY, os2mode); 512 524 525 /* 526 if(hwndDest != 0) 527 { 528 WinReleasePS(hps); 529 } 530 */ 513 531 if(rc == GPI_OK) { 514 532 DIBSection *destdib = DIBSection::findHDC(hdcDest); … … 519 537 if(fRestoryYInversion) GpiEnableYInversion(hps, oldyinversion); 520 538 SetLastError(ERROR_SUCCESS_W); 539 521 540 return(TRUE); 522 541 }
Note:
See TracChangeset
for help on using the changeset viewer.