[GME-commit] GMESRC/GME/MgaDecorators BitmapUtil.cpp,1.6,1.7
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Wed Sep 21 15:23:40 CDT 2005
Update of /project/gme-repository/GMESRC/GME/MgaDecorators
In directory escher:/tmp/cvs-serv14957
Modified Files:
BitmapUtil.cpp
Log Message:
If a successfully loaded icon file can't be drawn because the image is somehow corrupted, draw a red rectangle of the same size instead.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: BitmapUtil.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/MgaDecorators/BitmapUtil.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** BitmapUtil.cpp 12 Sep 2005 19:09:47 -0000 1.6
--- BitmapUtil.cpp 21 Sep 2005 14:23:38 -0000 1.7
***************
*** 405,409 ****
Graphics graphics(pDC->m_hDC);
graphics.SetPageUnit( UnitPixel);
! graphics.DrawImage(m_pImage, dstRect.left, dstRect.top, dstRect.Width(), dstRect.Height());
}
--- 405,411 ----
Graphics graphics(pDC->m_hDC);
graphics.SetPageUnit( UnitPixel);
! Status st = graphics.DrawImage(m_pImage, dstRect.left, dstRect.top, dstRect.Width(), dstRect.Height());
! if( st == Win32Error) // in case of corrupted image file (although successfully loaded)
! graphics.FillRectangle( &SolidBrush(Color::Red), dstRect.left, dstRect.top, dstRect.Width(), dstRect.Height());
}
More information about the GME-commit
mailing list