- Timestamp:
- Mar 19, 2001, 8:27:53 PM (24 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibsect.cpp
r4873 r5333 1 /* $Id: dibsect.cpp,v 1.4 5 2001-01-05 23:25:30sandervl Exp $ */1 /* $Id: dibsect.cpp,v 1.46 2001-03-19 19:27:53 sandervl Exp $ */ 2 2 3 3 /* … … 600 600 DIBSection *destdib = DIBSection::findHDC(hdcDest); 601 601 if(destdib) { 602 destdib->sync(hps, nYdest, nDestHeight );602 destdib->sync(hps, nYdest, nDestHeight, FALSE); 603 603 } 604 604 #ifdef INVERT … … 619 619 } 620 620 //****************************************************************************** 621 int WIN32API GetDIBits(HDC hdc, HBITMAP hBitmap, UINT uStartScan, UINT cScanLines, 622 void *lpvBits, BITMAPINFO_W * lpbi, UINT uUsage); 623 624 //****************************************************************************** 625 void DIBSection::sync(HDC hdc, DWORD nYdest, DWORD nDestHeight) 621 //****************************************************************************** 622 void DIBSection::sync(HDC hdc, DWORD nYdest, DWORD nDestHeight, BOOL orgYInversion) 626 623 { 627 624 APIRET rc; 628 625 char *destBuf; 629 626 630 dprintf(("Sync destination dibsection %x (%x)", handle, hdc)); 631 632 #if 0 633 BITMAPINFO_W *tmphdr = (BITMAPINFO_W *)malloc(os2bmphdrsize + sizeof(BITMAPINFO_W)); 634 tmphdr->bmiHeader.biSize = sizeof(BITMAPINFOHEADER_W); 635 GetDIBits(hdc, handle, nYdest, nDestHeight, NULL, tmphdr, 0); 636 destBuf = GetDIBObject() + nYdest*dibinfo.dsBm.bmWidthBytes; 637 rc = GetDIBits(hdc, handle, nYdest, nDestHeight, destBuf, tmphdr, 0); 638 #ifdef DEBUG_PALETTE 639 if(rc && tmphdr->bmiHeader.biBitCount <= 8) { 640 for(int i=0;i<(1<<tmphdr->bmiHeader.biBitCount);i++) 641 { 642 dprintf2(("Index %d : 0x%08X\n",i, *((ULONG*)(&tmphdr->bmiColors[i])) )); 643 } 644 } 645 #endif 646 647 #else 627 dprintf(("Sync destination dibsection %x (%x) (%d,%d) flip %d", handle, hdc, nYdest, nDestHeight, fFlip)); 628 648 629 BITMAPINFO2 *tmphdr = (BITMAPINFO2 *)malloc(os2bmphdrsize); 649 630 memcpy(tmphdr, pOS2bmp, os2bmphdrsize); 631 632 #ifdef INVERT 633 int oldyinversion = 0; 634 if(orgYInversion == TRUE) { 635 oldyinversion = GpiQueryYInversion(hdc); 636 dprintf(("Sync destination dibsection: hdc y inversion = %d", oldyinversion)); 637 if(oldyinversion != 0) { 638 GpiEnableYInversion(hdc, 0); 639 } 640 } 641 #endif 650 642 651 643 if(fFlip & FLIP_VERT) { … … 666 658 destBuf = GetDIBObject() + nYdest*dibinfo.dsBm.bmWidthBytes; 667 659 rc = GpiQueryBitmapBits(hdc, nYdest, nDestHeight, destBuf, 668 tmphdr); 660 tmphdr); 661 669 662 #ifdef DEBUG_PALETTE 670 663 if(rc != GPI_ALTERROR && tmphdr->cBitCount <= 8) { … … 676 669 #endif 677 670 } 678 #endif 671 679 672 #if 0 680 673 if(dibinfo.dsBitfields[1] == 0x3E0) {//RGB 555? … … 693 686 DebugInt3(); 694 687 } 688 689 #ifdef INVERT 690 if(oldyinversion) GpiEnableYInversion(hdc, oldyinversion); 691 #endif 692 695 693 } 696 694 //****************************************************************************** -
trunk/src/gdi32/dibsect.h
r4574 r5333 1 /* $Id: dibsect.h,v 1.2 2 2000-11-09 18:16:56sandervl Exp $ */1 /* $Id: dibsect.h,v 1.23 2001-03-19 19:27:53 sandervl Exp $ */ 2 2 3 3 /* … … 97 97 int nSrcWidth, int nSrcHeight, 98 98 DWORD Rop); 99 void sync(HDC hdc, DWORD nYdest, DWORD nDestHeight );99 void sync(HDC hdc, DWORD nYdest, DWORD nDestHeight, BOOL orgYInversion = TRUE); 100 100 void sync(DWORD xDst, DWORD yDst, DWORD widthDst, DWORD heightDst, PVOID bits); 101 101 int SetDIBColorTable(int startIdx, int cEntries, RGBQUAD *rgb);
Note:
See TracChangeset
for help on using the changeset viewer.