Ignore:
Timestamp:
Feb 1, 2000, 1:53:31 PM (26 years ago)
Author:
sandervl
Message:

cleaned up + dibsection fixes

File:
1 edited

Legend:

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

    r2581 r2592  
    1 /* $Id: dibsect.cpp,v 1.13 2000-01-31 22:30:07 sandervl Exp $ */
     1/* $Id: dibsect.cpp,v 1.14 2000-02-01 12:53:29 sandervl Exp $ */
    22
    33/*
     
    4343//******************************************************************************
    4444//******************************************************************************
    45 DIBSection::DIBSection(WINBITMAPINFOHEADER *pbmi, DWORD handle, int fFlip)
     45DIBSection::DIBSection(WINBITMAPINFOHEADER *pbmi, DWORD iUsage, DWORD handle, int fFlip)
    4646                : bmpBits(NULL), pOS2bmp(NULL), next(NULL)
    4747{
     
    9696   pOS2bmp->cBitCount     = pbmi->biBitCount;
    9797   pOS2bmp->ulCompression = pbmi->biCompression;
     98   //SvL: Ignore BI_BITFIELDS type (GpiDrawBits fails otherwise)
     99   if(pOS2bmp->ulCompression == 3) {
     100        pOS2bmp->ulCompression = 0;
     101   }
    98102   pOS2bmp->cbImage       = pbmi->biSizeImage;
    99103   dprintf(("handle                 %x", handle));
     
    104108   dprintf(("pOS2bmp->ulCompression %d\n", pOS2bmp->ulCompression));
    105109   dprintf(("pOS2bmp->cbImage       %d\n", pOS2bmp->cbImage));
    106    dprintf(("Bits at 0x%08X\n",bmpBits));
     110   dprintf(("Bits at %x, size %d",bmpBits, bmpsize*pbmi->biHeight));
    107111
    108112   this->handle = handle;
     113   this->iUsage = iUsage;
    109114
    110115   dibMutex.enter();
     
    312317    WinReleasePS(hps);
    313318  }
    314   if(rc == GPI_OK)
    315     return(TRUE);
    316 
     319  if(rc == GPI_OK) {
     320        return(TRUE);
     321  }
    317322  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));
    318323  dprintf(("WinGetLastError returned %X\n", WinGetLastError(WinQueryAnchorBlock(hwndDest)) & 0xFFFF));
     
    325330  this->hdc  = hdc;
    326331  hwndParent = WinWindowFromDC(hdc);
    327   dprintf(("SelectDIBObject(0x%08X) hwndParent = 0x%08X\n",hdc, hwndParent));
     332  dprintf(("SelectDIBObject %x into %x hwndParent = %x", handle, hdc, hwndParent));
    328333}
    329334//******************************************************************************
     
    380385 LPWINBITMAP dsBm        = (LPWINBITMAP)lpBuffer;
    381386
     387  dprintf2(("GetDIBSection %x %d %x", handle, iSize, lpBuffer));
    382388  if(iSize == sizeof(DIBSECTION))
    383389  {
Note: See TracChangeset for help on using the changeset viewer.