https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d04e049284a934aea538b3f0a2defd6d1ac4c55f

commit d04e049284a934aea538b3f0a2defd6d1ac4c55f
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Thu Jun 22 07:57:36 2023 +0900
Commit:     Katayama Hirofumi MZ <[email protected]>
CommitDate: Thu Jun 22 07:57:36 2023 +0900

    [MSPAINT] s/Bound/Clamp/
    
    CORE-18867
---
 base/applications/mspaint/history.cpp |  2 +-
 base/applications/mspaint/history.h   |  2 +-
 base/applications/mspaint/mouse.cpp   | 10 +++++-----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/base/applications/mspaint/history.cpp 
b/base/applications/mspaint/history.cpp
index 46a7341ff1c..91cc1736614 100644
--- a/base/applications/mspaint/history.cpp
+++ b/base/applications/mspaint/history.cpp
@@ -254,7 +254,7 @@ void ImageModel::RotateNTimes90Degrees(int iN)
     NotifyImageChanged();
 }
 
-void ImageModel::Bound(POINT& pt) const
+void ImageModel::Clamp(POINT& pt) const
 {
     pt.x = max(0, min(pt.x, GetWidth()));
     pt.y = max(0, min(pt.y, GetHeight()));
diff --git a/base/applications/mspaint/history.h 
b/base/applications/mspaint/history.h
index 2b74f306248..321680236c7 100644
--- a/base/applications/mspaint/history.h
+++ b/base/applications/mspaint/history.h
@@ -36,7 +36,7 @@ public:
     void FlipHorizontally();
     void FlipVertically();
     void RotateNTimes90Degrees(int iN);
-    void Bound(POINT& pt) const;
+    void Clamp(POINT& pt) const;
     void NotifyImageChanged();
 
 protected:
diff --git a/base/applications/mspaint/mouse.cpp 
b/base/applications/mspaint/mouse.cpp
index dad03d9fc0a..0bb4607ad05 100644
--- a/base/applications/mspaint/mouse.cpp
+++ b/base/applications/mspaint/mouse.cpp
@@ -159,7 +159,7 @@ struct FreeSelTool : ToolBase
         if (bLeftButton)
         {
             POINT pt = { x, y };
-            imageModel.Bound(pt);
+            imageModel.Clamp(pt);
             selectionModel.PushToPtStack(pt);
             imageModel.NotifyImageChanged();
         }
@@ -247,7 +247,7 @@ struct RectSelTool : ToolBase
         if (bLeftButton)
         {
             POINT pt = { x, y };
-            imageModel.Bound(pt);
+            imageModel.Clamp(pt);
             selectionModel.SetRectFromPoints(g_ptStart, pt);
             imageModel.NotifyImageChanged();
         }
@@ -258,7 +258,7 @@ struct RectSelTool : ToolBase
         POINT pt = { x, y };
         if (bLeftButton)
         {
-            imageModel.Bound(pt);
+            imageModel.Clamp(pt);
             selectionModel.SetRectFromPoints(g_ptStart, pt);
             selectionModel.m_bShow = !selectionModel.m_rc.IsRectEmpty();
             imageModel.NotifyImageChanged();
@@ -528,7 +528,7 @@ struct TextTool : ToolBase
     void UpdatePoint(LONG x, LONG y)
     {
         POINT pt = { x, y };
-        imageModel.Bound(pt);
+        imageModel.Clamp(pt);
         selectionModel.SetRectFromPoints(g_ptStart, pt);
         imageModel.NotifyImageChanged();
     }
@@ -572,7 +572,7 @@ struct TextTool : ToolBase
     void OnButtonUp(BOOL bLeftButton, LONG x, LONG y) override
     {
         POINT pt = { x, y };
-        imageModel.Bound(pt);
+        imageModel.Clamp(pt);
         selectionModel.SetRectFromPoints(g_ptStart, pt);
 
         BOOL bTextBoxShown = ::IsWindowVisible(textEditWindow);

Reply via email to