https://git.reactos.org/?p=reactos.git;a=commitdiff;h=96d388368696b481b5e28…
commit 96d388368696b481b5e280898e7d788244d3976a
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Jun 19 10:00:39 2023 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Mon Jun 19 10:00:39 2023 +0900
[MSPAINT] Follow-up of Realize Masked Skew (9afcbea)
CORE-18867
---
base/applications/mspaint/dib.cpp | 2 +-
base/applications/mspaint/selectionmodel.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/base/applications/mspaint/dib.cpp b/base/applications/mspaint/dib.cpp
index d72136f79d6..e2886e80a79 100644
--- a/base/applications/mspaint/dib.cpp
+++ b/base/applications/mspaint/dib.cpp
@@ -101,7 +101,7 @@ HBITMAP CopyMonoImage(HBITMAP hbm, INT cx, INT cy)
HGDIOBJ hbm2Old = SelectObject(hdc2, hbmNew);
StretchBlt(hdc2, 0, 0, cx, cy, hdc1, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
SelectObject(hdc1, hbm1Old);
- SelectObject(hdc1, hbm2Old);
+ SelectObject(hdc2, hbm2Old);
DeleteDC(hdc1);
DeleteDC(hdc2);
return hbmNew;
diff --git a/base/applications/mspaint/selectionmodel.cpp
b/base/applications/mspaint/selectionmodel.cpp
index b96213313b1..609d2ffd59c 100644
--- a/base/applications/mspaint/selectionmodel.cpp
+++ b/base/applications/mspaint/selectionmodel.cpp
@@ -367,8 +367,8 @@ void SelectionModel::StretchSkew(int nStretchPercentX, int
nStretchPercentY, int
hbmColor = SkewDIB(hDC, m_hbmColor, nSkewDegX, FALSE);
::SelectObject(hDC, m_hbmMask);
hbmMask = SkewDIB(hDC, m_hbmMask, nSkewDegX, FALSE, TRUE);
- InsertFromHBITMAP(hbmColor, m_rc.left, m_rc.top, hbmMask);
::SelectObject(hDC, hbmOld);
+ InsertFromHBITMAP(hbmColor, m_rc.left, m_rc.top, hbmMask);
::DeleteObject(hbmColor);
::DeleteObject(hbmMask);
}
@@ -379,8 +379,8 @@ void SelectionModel::StretchSkew(int nStretchPercentX, int
nStretchPercentY, int
hbmColor = SkewDIB(hDC, m_hbmColor, nSkewDegY, TRUE);
::SelectObject(hDC, m_hbmMask);
hbmMask = SkewDIB(hDC, m_hbmColor, nSkewDegY, TRUE, TRUE);
- InsertFromHBITMAP(hbmColor, m_rc.left, m_rc.top, hbmMask);
::SelectObject(hDC, hbmOld);
+ InsertFromHBITMAP(hbmColor, m_rc.left, m_rc.top, hbmMask);
::DeleteObject(hbmColor);
::DeleteObject(hbmMask);
}