mirror of
https://github.com/reactos/reactos.git
synced 2024-12-05 01:13:31 +08:00
[MSPAINT] s/AirBrushWidth/AirBrushRadius/
Fix logical error. CORE-19094
This commit is contained in:
parent
3faa56d2c7
commit
157739a658
@ -654,7 +654,7 @@ struct AirBrushTool : SmoothDrawTool
|
|||||||
void draw(BOOL bLeftButton, LONG x, LONG y) override
|
void draw(BOOL bLeftButton, LONG x, LONG y) override
|
||||||
{
|
{
|
||||||
COLORREF rgb = bLeftButton ? m_fg : m_bg;
|
COLORREF rgb = bLeftButton ? m_fg : m_bg;
|
||||||
Airbrush(m_hdc, x, y, rgb, toolsModel.GetAirBrushWidth());
|
Airbrush(m_hdc, x, y, rgb, toolsModel.GetAirBrushRadius());
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnSpecialTweak(BOOL bMinus) override
|
void OnSpecialTweak(BOOL bMinus) override
|
||||||
|
@ -219,7 +219,7 @@ VOID CToolSettingsWindow::drawAirBrush(HDC hdc, LPCRECT prc)
|
|||||||
RECT& rc = rects[i];
|
RECT& rc = rects[i];
|
||||||
INT x = (rc.left + rc.right) / 2;
|
INT x = (rc.left + rc.right) / 2;
|
||||||
INT y = (rc.top + rc.bottom) / 2;
|
INT y = (rc.top + rc.bottom) / 2;
|
||||||
BOOL bHigh = (s_AirRadius[i] == toolsModel.GetAirBrushWidth());
|
BOOL bHigh = (s_AirRadius[i] == toolsModel.GetAirBrushRadius());
|
||||||
if (bHigh)
|
if (bHigh)
|
||||||
{
|
{
|
||||||
::FillRect(hdc, &rc, ::GetSysColorBrush(COLOR_HIGHLIGHT));
|
::FillRect(hdc, &rc, ::GetSysColorBrush(COLOR_HIGHLIGHT));
|
||||||
@ -438,7 +438,7 @@ LRESULT CToolSettingsWindow::OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lPar
|
|||||||
case TOOL_AIRBRUSH:
|
case TOOL_AIRBRUSH:
|
||||||
iItem = getAirBrushRects(rects, &rect1, &pt);
|
iItem = getAirBrushRects(rects, &rect1, &pt);
|
||||||
if (iItem != -1)
|
if (iItem != -1)
|
||||||
toolsModel.SetAirBrushWidth(s_AirRadius[iItem]);
|
toolsModel.SetAirBrushRadius(s_AirRadius[iItem]);
|
||||||
break;
|
break;
|
||||||
case TOOL_LINE:
|
case TOOL_LINE:
|
||||||
case TOOL_BEZIER:
|
case TOOL_BEZIER:
|
||||||
|
@ -18,7 +18,7 @@ ToolsModel::ToolsModel()
|
|||||||
m_shapeStyle = 0;
|
m_shapeStyle = 0;
|
||||||
m_brushStyle = BrushStyleRound;
|
m_brushStyle = BrushStyleRound;
|
||||||
m_oldActiveTool = m_activeTool = TOOL_PEN;
|
m_oldActiveTool = m_activeTool = TOOL_PEN;
|
||||||
m_airBrushWidth = 5;
|
m_airBrushRadius = 5;
|
||||||
m_rubberRadius = 4;
|
m_rubberRadius = 4;
|
||||||
m_transpBg = FALSE;
|
m_transpBg = FALSE;
|
||||||
m_zoom = 1000;
|
m_zoom = 1000;
|
||||||
@ -99,8 +99,8 @@ void ToolsModel::MakeBrushThickerOrThinner(BOOL bThinner)
|
|||||||
|
|
||||||
void ToolsModel::MakeAirBrushThickerOrThinner(BOOL bThinner)
|
void ToolsModel::MakeAirBrushThickerOrThinner(BOOL bThinner)
|
||||||
{
|
{
|
||||||
INT thickness = GetAirBrushWidth();
|
INT thickness = GetAirBrushRadius();
|
||||||
SetAirBrushWidth(bThinner ? max(1, thickness - 1) : (thickness + 1));
|
SetAirBrushRadius(bThinner ? max(1, thickness - 1) : (thickness + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolsModel::MakeRubberThickerOrThinner(BOOL bThinner)
|
void ToolsModel::MakeRubberThickerOrThinner(BOOL bThinner)
|
||||||
@ -180,14 +180,14 @@ void ToolsModel::SetActiveTool(TOOLTYPE nActiveTool)
|
|||||||
NotifyToolChanged();
|
NotifyToolChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ToolsModel::GetAirBrushWidth() const
|
INT ToolsModel::GetAirBrushRadius() const
|
||||||
{
|
{
|
||||||
return m_airBrushWidth;
|
return m_airBrushRadius;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ToolsModel::SetAirBrushWidth(int nAirBrushWidth)
|
void ToolsModel::SetAirBrushRadius(INT nAirBrushRadius)
|
||||||
{
|
{
|
||||||
m_airBrushWidth = nAirBrushWidth;
|
m_airBrushRadius = nAirBrushRadius;
|
||||||
NotifyToolSettingsChanged();
|
NotifyToolSettingsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ private:
|
|||||||
BrushStyle m_brushStyle;
|
BrushStyle m_brushStyle;
|
||||||
TOOLTYPE m_activeTool;
|
TOOLTYPE m_activeTool;
|
||||||
TOOLTYPE m_oldActiveTool;
|
TOOLTYPE m_oldActiveTool;
|
||||||
int m_airBrushWidth;
|
INT m_airBrushRadius;
|
||||||
int m_rubberRadius;
|
int m_rubberRadius;
|
||||||
BOOL m_transpBg;
|
BOOL m_transpBg;
|
||||||
int m_zoom;
|
int m_zoom;
|
||||||
@ -116,8 +116,8 @@ public:
|
|||||||
TOOLTYPE GetOldActiveTool() const;
|
TOOLTYPE GetOldActiveTool() const;
|
||||||
void SetActiveTool(TOOLTYPE nActiveTool);
|
void SetActiveTool(TOOLTYPE nActiveTool);
|
||||||
|
|
||||||
int GetAirBrushWidth() const;
|
INT GetAirBrushRadius() const;
|
||||||
void SetAirBrushWidth(int nAirBrushWidth);
|
void SetAirBrushRadius(INT nAirBrushRadius);
|
||||||
void MakeAirBrushThickerOrThinner(BOOL bThinner);
|
void MakeAirBrushThickerOrThinner(BOOL bThinner);
|
||||||
|
|
||||||
int GetRubberRadius() const;
|
int GetRubberRadius() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user