Changeset 21 in dev for ProjectEditor/IconEditor_Main.cpp
- Timestamp:
- Dec 29, 2006, 12:25:04 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ProjectEditor/IconEditor_Main.cpp
r3 r21 309 309 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum].MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]; 310 310 311 if( !(pBmpInfoHdr->biBitCount == 4 || pBmpInfoHdr->biBitCount == 8 ) ){ 312 //16色、256色以外の場合 313 //未対応 314 return; 315 } 316 311 317 hPen=CreatePen(PS_SOLID,0,RGB(200,200,200)); 312 318 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum].MdiIconEditInfo->memdc,hPen); … … 362 368 //////////////// 363 369 // 通常ピクセル 364 switch(pBmpInfoHdr->biBitCount){ 365 case 4: //16色 366 i2=*(pBuffer+i/2); 367 if(i%2==0) i2>>=4; 368 i2&=0x0F; 369 ColorRef=RGB(pRgbq[i2].rgbRed,pRgbq[i2].rgbGreen,pRgbq[i2].rgbBlue); 370 break; 371 case 8: //256色 372 i2=pBuffer[i]; 373 ColorRef=RGB(pRgbq[i2].rgbRed,pRgbq[i2].rgbGreen,pRgbq[i2].rgbBlue); 374 break; 375 } 370 if( pBmpInfoHdr->biBitCount == 4 ){ 371 //16色 372 i2=*(pBuffer+i/2); 373 if(i%2==0) i2>>=4; 374 i2&=0x0F; 375 ColorRef=RGB(pRgbq[i2].rgbRed,pRgbq[i2].rgbGreen,pRgbq[i2].rgbBlue); 376 } 377 else if( pBmpInfoHdr->biBitCount == 8 ){ 378 //256色 379 i2=pBuffer[i]; 380 ColorRef=RGB(pRgbq[i2].rgbRed,pRgbq[i2].rgbGreen,pRgbq[i2].rgbBlue); 381 break; 382 } 383 376 384 hBrush=CreateSolidBrush(ColorRef); 377 385 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum].MdiIconEditInfo->memdc,hBrush);
Note:
See TracChangeset
for help on using the changeset viewer.