We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 888dc16 commit cb43b76Copy full SHA for cb43b76
3 files changed
BitmapView.cpp
@@ -19,10 +19,10 @@ BOOL CBitmapView::PreTranslateMessage(MSG* /*pMsg*/)
19
return FALSE;
20
}
21
22
-void CBitmapView::ClearBitmap(bool bResetOffset)
+void CBitmapView::ClearBitmap()
23
{
24
m_image.Clear();
25
- UpdateScrollSize(bResetOffset);
+ UpdateScrollSize(true);
26
27
28
void CBitmapView::SetBitmap(Image image, bool bResetOffset)
@@ -43,7 +43,7 @@ void CBitmapView::SetFrame(UINT nFrame)
43
m_image.SetFrame(nFrame);
44
const Image::Size framesize = m_image.GetFrameSize();
45
SetZoomScale((float) m_sizeAll.cx / framesize.nWidth);
46
- UpdateScrollSize(FALSE);
+ UpdateScrollSize(false);
47
48
49
void CBitmapView::SetFlipRotate(WICBitmapTransformOptions FlipRotate)
BitmapView.h
@@ -19,7 +19,7 @@ class CBitmapView : public CZoomScrollWindowImpl<CBitmapView>
CBitmapView();
BOOL PreTranslateMessage(MSG* pMsg);
- void ClearBitmap(bool bResetOffset = true);
+ void ClearBitmap();
void SetBitmap(Image image, bool bResetOffset = true);
const Image& GetImage() const { return m_image; }
void SetBackground(HBRUSH hBackground);
Image.cpp
@@ -313,12 +313,12 @@ void Image::RenderFrame(HDC hDC, int x, int y, int cx, int cy, HBRUSH hBackgroun
313
const Size sz = GetFrameSize();
314
CBitmapDC hMemDC(hDC, sz.nWidth, sz.nHeight); // Necessary as FillRect brush doesn't respect mapping mode
315
hMemDC.SetBrushOrg(sz.nWidth / 2, sz.nHeight / 2);
316
- hMemDC.FillRect(&RECT({ 0, 0, (LONG) sz.nWidth, (LONG) sz.nHeight }), hBackground);
+ const RECT r = { 0, 0, (LONG) sz.nWidth, (LONG) sz.nHeight };
317
+ hMemDC.FillRect(&r, hBackground);
318
StretchBlt(hDC, 0, 0, cx, cy, hMemDC, 0, 0, sz.nWidth, sz.nHeight, SRCCOPY);
319
320
- BLENDFUNCTION bf{ AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
321
- ::AlphaBlend(hDC, x, y, cx, cy, hDIBBitmap, bf);
+ ::AlphaBlend(hDC, x, y, cx, cy, hDIBBitmap, { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA });
322
323
else
324
::SetDIBitsToDevice(hDC, x, y, cx, cy, 0, 0, 0, cy, pvImageBits, &bminfo, DIB_RGB_COLORS);
0 commit comments