[MSPAINT] Larger/smaller brush nib on Ctrl+Plus/Minus (#5739)

- Introduce the concept of "brush width" to the
  tools model.
- Enable changing the brush width by Ctrl+Plus/Minus
  key combination in TOOL_BRUSH.
- Re-define brush styles.
CORE-19094
This commit is contained in:
Katayama Hirofumi MZ 2023-09-28 21:30:34 +09:00 committed by GitHub
parent c84b5007d0
commit 8a4787b384
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 132 additions and 76 deletions

View file

@ -609,12 +609,13 @@ struct BrushTool : SmoothDrawTool
void draw(BOOL bLeftButton, LONG x, LONG y) override
{
COLORREF rgb = bLeftButton ? m_fg : m_bg;
Brush(m_hdc, g_ptEnd.x, g_ptEnd.y, x, y, rgb, toolsModel.GetBrushStyle());
Brush(m_hdc, g_ptEnd.x, g_ptEnd.y, x, y, rgb, toolsModel.GetBrushStyle(),
toolsModel.GetBrushWidth());
}
void OnSpecialTweak(BOOL bMinus) override
{
// TODO:
toolsModel.MakeBrushThickerOrThinner(bMinus);
}
};