- Timestamp:
- Mar 24, 2000, 8:24:48 PM (26 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibitmap.cpp
r3126 r3227 1 /* $Id: dibitmap.cpp,v 1. 5 2000-03-16 19:18:14sandervl Exp $ */1 /* $Id: dibitmap.cpp,v 1.6 2000-03-24 19:24:47 sandervl Exp $ */ 2 2 3 3 /* … … 69 69 70 70 rc = O32_CreateBitmap(nWidth, nHeight, cPlanes, cBitsPerPel, lpvBits); 71 dprintf(("GDI32: CreateBitmap (%d,%d) bps %d returned % d\n", nWidth, nHeight, cBitsPerPel, rc));71 dprintf(("GDI32: CreateBitmap (%d,%d) bps %d returned %x", nWidth, nHeight, cBitsPerPel, rc)); 72 72 return(rc); 73 73 } -
trunk/src/gdi32/dibsect.cpp
r3184 r3227 1 /* $Id: dibsect.cpp,v 1.2 1 2000-03-21 19:46:47 sandervl Exp $ */1 /* $Id: dibsect.cpp,v 1.22 2000-03-24 19:24:47 sandervl Exp $ */ 2 2 3 3 /* … … 73 73 bmpsize *= 4; 74 74 break; 75 default: 76 dprintf(("Unsupported nr of bits %d", pbmi->biBitCount)); 77 DebugInt3(); 78 break; 75 79 } 76 80 … … 130 134 dibinfo.dsOffset = 0; // TODO: put the correct value here (if createdibsection with file handle) 131 135 132 if(pbmi->biCompression == BI_BITFIELDS) { 133 dibinfo.dsBitfields[0] = *((DWORD *)pColors); 134 dibinfo.dsBitfields[1] = *((DWORD *)pColors+1); 135 dibinfo.dsBitfields[2] = *((DWORD *)pColors+2); 136 if(iUsage == DIB_PAL_COLORS || pbmi->biBitCount <= 8) 137 { 138 dibinfo.dsBitfields[0] = dibinfo.dsBitfields[1] = dibinfo.dsBitfields[2] = 0; 139 } 140 else { 141 switch(pbmi->biBitCount) 142 { 143 case 16: 144 dibinfo.dsBitfields[0] = (pbmi->biCompression == BI_BITFIELDS) ? *(DWORD *)pColors : 0x7c00; 145 dibinfo.dsBitfields[1] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 1) : 0x03e0; 146 dibinfo.dsBitfields[2] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 2) : 0x001f; 147 break; 148 149 case 24: 150 dibinfo.dsBitfields[0] = 0xff; 151 dibinfo.dsBitfields[1] = 0xff00; 152 dibinfo.dsBitfields[2] = 0xff0000; 153 break; 154 155 case 32: 156 dibinfo.dsBitfields[0] = (pbmi->biCompression == BI_BITFIELDS) ? *(DWORD *)pColors : 0xff; 157 dibinfo.dsBitfields[1] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 1) : 0xff00; 158 dibinfo.dsBitfields[2] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 2) : 0xff0000; 159 if(dibinfo.dsBitfields[0] != 0xff && dibinfo.dsBitfields[1] != 0xff00 && dibinfo.dsBitfields[2] != 0xff0000) { 160 dprintf(("DIBSection: unsupported bitfields for 32 bits bitmap!!")); 161 } 162 break; 163 } 136 164 dprintf(("BI_BITFIELDS %x %x %x", dibinfo.dsBitfields[0], dibinfo.dsBitfields[1], dibinfo.dsBitfields[2])); 137 165 } -
trunk/src/gdi32/dibsect.h
r2718 r3227 1 /* $Id: dibsect.h,v 1.1 2 2000-02-10 00:36:10sandervl Exp $ */1 /* $Id: dibsect.h,v 1.13 2000-03-24 19:24:48 sandervl Exp $ */ 2 2 3 3 /* … … 50 50 51 51 #ifdef OS2_ONLY 52 #define DIB_RGB_COLORS 0 53 #define DIB_PAL_COLORS 1 54 52 55 typedef struct 53 56 {
Note:
See TracChangeset
for help on using the changeset viewer.