Code cleanup.

This commit is contained in:
spx
2011-11-01 04:56:46 +00:00
parent 6644b81909
commit 1aaa03308c
13 changed files with 46 additions and 60 deletions

View File

@ -104,15 +104,13 @@ void CMeterButton::Initialize()
}
// Separate the frames
Graphics desktopGraphics(GetDesktopWindow());
for (int i = 0; i < BUTTON_FRAMES; ++i)
{
Bitmap bitmapPart(m_W, m_H, PixelFormat32bppPARGB);
Graphics graphics(&bitmapPart);
Rect r(0, 0, m_W, m_H);
if (bitmap->GetHeight() > bitmap->GetWidth())
if (m_H > m_W)
{
graphics.DrawImage(bitmap, r, 0, m_H * i, m_W, m_H, UnitPixel);
}