mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[MSPAINT] Larger/smaller Rubber/AirBrush on Ctrl+Plus/Minus (#5740)
- Enable changing rubber/airbrush thickness by Ctrl+Plus / Ctrl+Minus key combination in TOOL_AIRBRUSH and TOOL_RUBBER. CORE-19094
This commit is contained in:
parent
8a4787b384
commit
945ee4b2a4
3 changed files with 24 additions and 0 deletions
|
@ -505,6 +505,11 @@ struct RubberTool : SmoothDrawTool
|
|||
else
|
||||
Replace(m_hdc, g_ptEnd.x, g_ptEnd.y, x, y, m_fg, m_bg, toolsModel.GetRubberRadius());
|
||||
}
|
||||
|
||||
void OnSpecialTweak(BOOL bMinus) override
|
||||
{
|
||||
toolsModel.MakeRubberThickerOrThinner(bMinus);
|
||||
}
|
||||
};
|
||||
|
||||
// TOOL_FILL
|
||||
|
@ -631,6 +636,11 @@ struct AirBrushTool : SmoothDrawTool
|
|||
COLORREF rgb = bLeftButton ? m_fg : m_bg;
|
||||
Airbrush(m_hdc, x, y, rgb, toolsModel.GetAirBrushWidth());
|
||||
}
|
||||
|
||||
void OnSpecialTweak(BOOL bMinus) override
|
||||
{
|
||||
toolsModel.MakeAirBrushThickerOrThinner(bMinus);
|
||||
}
|
||||
};
|
||||
|
||||
// TOOL_TEXT
|
||||
|
|
|
@ -99,6 +99,18 @@ void ToolsModel::MakeBrushThickerOrThinner(BOOL bThinner)
|
|||
SetBrushWidth(bThinner ? max(1, thickness - 1) : (thickness + 1));
|
||||
}
|
||||
|
||||
void ToolsModel::MakeAirBrushThickerOrThinner(BOOL bThinner)
|
||||
{
|
||||
INT thickness = GetAirBrushWidth();
|
||||
SetAirBrushWidth(bThinner ? max(1, thickness - 1) : (thickness + 1));
|
||||
}
|
||||
|
||||
void ToolsModel::MakeRubberThickerOrThinner(BOOL bThinner)
|
||||
{
|
||||
INT thickness = GetRubberRadius();
|
||||
SetRubberRadius(bThinner ? max(1, thickness - 1) : (thickness + 1));
|
||||
}
|
||||
|
||||
int ToolsModel::GetShapeStyle() const
|
||||
{
|
||||
return m_shapeStyle;
|
||||
|
|
|
@ -120,9 +120,11 @@ public:
|
|||
|
||||
int GetAirBrushWidth() const;
|
||||
void SetAirBrushWidth(int nAirBrushWidth);
|
||||
void MakeAirBrushThickerOrThinner(BOOL bThinner);
|
||||
|
||||
int GetRubberRadius() const;
|
||||
void SetRubberRadius(int nRubberRadius);
|
||||
void MakeRubberThickerOrThinner(BOOL bThinner);
|
||||
|
||||
BOOL IsBackgroundTransparent() const;
|
||||
void SetBackgroundTransparent(BOOL bTransparent);
|
||||
|
|
Loading…
Reference in a new issue