Changeset 2600 for trunk/src/gdi32/dibitmap.cpp
- Timestamp:
- Feb 3, 2000, 12:45:07 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/dibitmap.cpp
r2592 r2600 1 /* $Id: dibitmap.cpp,v 1. 1 2000-02-01 12:53:29sandervl Exp $ */1 /* $Id: dibitmap.cpp,v 1.2 2000-02-02 23:45:06 sandervl Exp $ */ 2 2 3 3 /* … … 82 82 HBITMAP res = 0; 83 83 BOOL fFlip = 0; 84 int iHeight, iWidth;84 int iHeight, iWidth; 85 85 86 86 dprintf(("GDI32: CreateDIBSection %x %x %x %x %d", hdc, iUsage, ppvBits, hSection, dwOffset)); … … 110 110 if (res) 111 111 { 112 ULONG Pal[256];113 112 char PalSize; 114 LOGPALETTE tmpPal = { 0x300,1,{0,0,0,0}}; 115 HPALETTE hpalCur, hpalTmp; 116 DIBSection *dsect = new DIBSection((WINBITMAPINFOHEADER *)&pbmi->bmiHeader, iUsage, (DWORD)res, fFlip); 117 118 if(NULL!=dsect) 113 DIBSection *dsect = new DIBSection((BITMAPINFOHEADER_W *)&pbmi->bmiHeader, (char *)&pbmi->bmiColors, iUsage, (DWORD)res, fFlip); 114 115 if(dsect != NULL) 119 116 { 120 117 PalSize = dsect->GetBitCount(); 121 if(PalSize <=8)118 if(PalSize <= 8) 122 119 { 120 ULONG Pal[256]; 121 LOGPALETTE tmpPal = { 0x300,1,{0,0,0,0}}; 122 HPALETTE hpalCur, hpalTmp; 123 123 124 // Now get the current Palette from the DC 124 125 hpalTmp = CreatePalette(&tmpPal); … … 170 171 RGBQUAD *pColors) 171 172 { 172 HPALETTE hpal = O32_GetCurrentObject(hdc, OBJ_PAL);173 HPALETTE hpal = GetCurrentObject(hdc, OBJ_PAL); 173 174 UINT rc; 174 175 int i; … … 208 209 //****************************************************************************** 209 210 //****************************************************************************** 210 LONG WIN32API GetBitmapBits( HBITMAP arg1, LONG arg2, PVOID arg3)211 { 212 dprintf(("GDI32: GetBitmapBits "));213 return O32_GetBitmapBits( arg1, arg2, arg3);214 } 215 //****************************************************************************** 216 //****************************************************************************** 217 LONG WIN32API SetBitmapBits( HBITMAP arg1, LONG arg2, const VOID * arg3)218 { 219 dprintf(("GDI32: SetBitmapBits "));220 return O32_SetBitmapBits( arg1, (DWORD)arg2, arg3);221 } 222 //****************************************************************************** 223 //****************************************************************************** 224 BOOL WIN32API GetBitmapDimensionEx( HBITMAP arg1, PSIZE arg2)225 { 226 dprintf(("GDI32: GetBitmapDimensionEx "));227 return O32_GetBitmapDimensionEx( arg1, arg2);211 LONG WIN32API GetBitmapBits( HBITMAP hBitmap, LONG arg2, PVOID arg3) 212 { 213 dprintf(("GDI32: GetBitmapBits %x", hBitmap)); 214 return O32_GetBitmapBits(hBitmap, arg2, arg3); 215 } 216 //****************************************************************************** 217 //****************************************************************************** 218 LONG WIN32API SetBitmapBits( HBITMAP hBitmap, LONG arg2, const VOID * arg3) 219 { 220 dprintf(("GDI32: SetBitmapBits %x", hBitmap)); 221 return O32_SetBitmapBits(hBitmap, (DWORD)arg2, arg3); 222 } 223 //****************************************************************************** 224 //****************************************************************************** 225 BOOL WIN32API GetBitmapDimensionEx( HBITMAP hBitmap, PSIZE pSize) 226 { 227 dprintf(("GDI32: GetBitmapDimensionEx %x (%d,%d)", hBitmap, pSize->cx, pSize->cy)); 228 return O32_GetBitmapDimensionEx(hBitmap, pSize); 228 229 } 229 230 //****************************************************************************** … … 251 252 dprintf(("GDI32: SetDIBits %x %x %x %x %x %x %x\n", arg1, arg2, arg3, arg4, arg5, arg6, arg7)); 252 253 253 if(DIBSection::getSection() != NULL) { 254 if(DIBSection::getSection() != NULL) 255 { 254 256 DIBSection *dsect; 255 257 256 258 dsect = DIBSection::find((DWORD)arg2); 257 259 if(dsect) { 258 return dsect->SetDIBits(arg1, arg2, arg3, arg4, arg5, ( WINBITMAPINFOHEADER*)&arg6->bmiHeader, arg7);260 return dsect->SetDIBits(arg1, arg2, arg3, arg4, arg5, (BITMAPINFOHEADER_W *)&arg6->bmiHeader, arg7); 259 261 } 260 262 }
Note:
See TracChangeset
for help on using the changeset viewer.