[MSPAINT] Restrict drawing direction on Shift key (#5726)

- While holding down the Shift key, drawing lines with the
  pen/brush is limited to either of 8 directions (horizontal/vertical/diagonal).
- s/abs/labs/
CORE-19094
This commit is contained in:
Katayama Hirofumi MZ 2023-09-26 22:47:23 +09:00 committed by GitHub
parent d1e9fe13de
commit 389d04650f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 189 additions and 65 deletions

View file

@ -42,8 +42,8 @@ struct ToolBase
virtual ~ToolBase() { }
virtual void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) { }
virtual void OnMouseMove(BOOL bLeftButton, LONG x, LONG y) { }
virtual void OnButtonUp(BOOL bLeftButton, LONG x, LONG y) { }
virtual BOOL OnMouseMove(BOOL bLeftButton, LONG& x, LONG& y) { return TRUE; }
virtual BOOL OnButtonUp(BOOL bLeftButton, LONG& x, LONG& y) { return TRUE; }
virtual void OnCancelDraw();
virtual void OnFinishDraw();