Changeset 3755 for trunk/src


Ignore:
Timestamp:
Jun 26, 2000, 12:27:45 PM (25 years ago)
Author:
sandervl
Message:

reverse video fix for sdd & rp7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/dibsect.cpp

    r3726 r3755  
    1 /* $Id: dibsect.cpp,v 1.35 2000-06-17 11:58:07 sandervl Exp $ */
     1/* $Id: dibsect.cpp,v 1.36 2000-06-26 10:27:45 sandervl Exp $ */
    22
    33/*
     
    397397 pDCData pHps;
    398398
    399   pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc);
     399  pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdcDest);
    400400  if(!pHps)
    401401  {
     
    428428  }
    429429
    430   //win32 coordinates are of the left top, OS/2 expects left bottom
     430  //win32 coordinates are relative to left top, OS/2 expects left bottom
    431431  //source rectangle is non-inclusive (top, right not included)
     432  //destination rectangle is incl.-inclusive (everything included)
    432433  if(nXdest + nDestWidth > hdcWidth) {
    433434        nDestWidth  = hdcWidth - nXdest;
     
    438439  point[0].x = nXdest;
    439440  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;
    442443
    443444  //target rectangle is inclusive-inclusive
     
    453454  point[3].y = pOS2bmp->cy - nYsrc;
    454455
     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*/
    455467  oldyinversion = GpiQueryYInversion(hps);
    456468  if(oldyinversion != 0) {
     
    511523  else  rc = GpiDrawBits(hps, bitmapBits, pOS2bmp, 4, &point[0], ROP_SRCCOPY, os2mode);
    512524
     525/*
     526  if(hwndDest != 0)
     527  {
     528    WinReleasePS(hps);
     529  }
     530*/
    513531  if(rc == GPI_OK) {
    514532        DIBSection *destdib = DIBSection::findHDC(hdcDest);
     
    519537        if(fRestoryYInversion) GpiEnableYInversion(hps, oldyinversion);
    520538        SetLastError(ERROR_SUCCESS_W);
     539
    521540        return(TRUE);
    522541  }
Note: See TracChangeset for help on using the changeset viewer.