Skip to content

Commit cb43b76

Browse files
committed
Small tidy up
1 parent 888dc16 commit cb43b76

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

BitmapView.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ BOOL CBitmapView::PreTranslateMessage(MSG* /*pMsg*/)
1919
return FALSE;
2020
}
2121

22-
void CBitmapView::ClearBitmap(bool bResetOffset)
22+
void CBitmapView::ClearBitmap()
2323
{
2424
m_image.Clear();
25-
UpdateScrollSize(bResetOffset);
25+
UpdateScrollSize(true);
2626
}
2727

2828
void CBitmapView::SetBitmap(Image image, bool bResetOffset)
@@ -43,7 +43,7 @@ void CBitmapView::SetFrame(UINT nFrame)
4343
m_image.SetFrame(nFrame);
4444
const Image::Size framesize = m_image.GetFrameSize();
4545
SetZoomScale((float) m_sizeAll.cx / framesize.nWidth);
46-
UpdateScrollSize(FALSE);
46+
UpdateScrollSize(false);
4747
}
4848

4949
void CBitmapView::SetFlipRotate(WICBitmapTransformOptions FlipRotate)

BitmapView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CBitmapView : public CZoomScrollWindowImpl<CBitmapView>
1919
CBitmapView();
2020

2121
BOOL PreTranslateMessage(MSG* pMsg);
22-
void ClearBitmap(bool bResetOffset = true);
22+
void ClearBitmap();
2323
void SetBitmap(Image image, bool bResetOffset = true);
2424
const Image& GetImage() const { return m_image; }
2525
void SetBackground(HBRUSH hBackground);

Image.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,12 @@ void Image::RenderFrame(HDC hDC, int x, int y, int cx, int cy, HBRUSH hBackgroun
313313
const Size sz = GetFrameSize();
314314
CBitmapDC hMemDC(hDC, sz.nWidth, sz.nHeight); // Necessary as FillRect brush doesn't respect mapping mode
315315
hMemDC.SetBrushOrg(sz.nWidth / 2, sz.nHeight / 2);
316-
hMemDC.FillRect(&RECT({ 0, 0, (LONG) sz.nWidth, (LONG) sz.nHeight }), hBackground);
316+
const RECT r = { 0, 0, (LONG) sz.nWidth, (LONG) sz.nHeight };
317+
hMemDC.FillRect(&r, hBackground);
317318
StretchBlt(hDC, 0, 0, cx, cy, hMemDC, 0, 0, sz.nWidth, sz.nHeight, SRCCOPY);
318319
}
319320

320-
BLENDFUNCTION bf{ AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
321-
::AlphaBlend(hDC, x, y, cx, cy, hDIBBitmap, bf);
321+
::AlphaBlend(hDC, x, y, cx, cy, hDIBBitmap, { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA });
322322
}
323323
else
324324
::SetDIBitsToDevice(hDC, x, y, cx, cy, 0, 0, 0, cy, pvImageBits, &bminfo, DIB_RGB_COLORS);

0 commit comments

Comments
 (0)