mirror of
https://github.com/reactos/reactos.git
synced 2024-12-04 08:53:32 +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
|
||||
{
|
||||
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
|
||||
|
@ -219,7 +219,7 @@ VOID CToolSettingsWindow::drawAirBrush(HDC hdc, LPCRECT prc)
|
||||
RECT& rc = rects[i];
|
||||
INT x = (rc.left + rc.right) / 2;
|
||||
INT y = (rc.top + rc.bottom) / 2;
|
||||
BOOL bHigh = (s_AirRadius[i] == toolsModel.GetAirBrushWidth());
|
||||
BOOL bHigh = (s_AirRadius[i] == toolsModel.GetAirBrushRadius());
|
||||
if (bHigh)
|
||||
{
|
||||
::FillRect(hdc, &rc, ::GetSysColorBrush(COLOR_HIGHLIGHT));
|
||||
@ -438,7 +438,7 @@ LRESULT CToolSettingsWindow::OnLButtonDown(UINT nMsg, WPARAM wParam, LPARAM lPar
|
||||
case TOOL_AIRBRUSH:
|
||||
iItem = getAirBrushRects(rects, &rect1, &pt);
|
||||
if (iItem != -1)
|
||||
toolsModel.SetAirBrushWidth(s_AirRadius[iItem]);
|
||||
toolsModel.SetAirBrushRadius(s_AirRadius[iItem]);
|
||||
break;
|
||||
case TOOL_LINE:
|
||||
case TOOL_BEZIER:
|
||||
|
@ -18,7 +18,7 @@ ToolsModel::ToolsModel()
|
||||
m_shapeStyle = 0;
|
||||
m_brushStyle = BrushStyleRound;
|
||||
m_oldActiveTool = m_activeTool = TOOL_PEN;
|
||||
m_airBrushWidth = 5;
|
||||
m_airBrushRadius = 5;
|
||||
m_rubberRadius = 4;
|
||||
m_transpBg = FALSE;
|
||||
m_zoom = 1000;
|
||||
@ -99,8 +99,8 @@ void ToolsModel::MakeBrushThickerOrThinner(BOOL bThinner)
|
||||
|
||||
void ToolsModel::MakeAirBrushThickerOrThinner(BOOL bThinner)
|
||||
{
|
||||
INT thickness = GetAirBrushWidth();
|
||||
SetAirBrushWidth(bThinner ? max(1, thickness - 1) : (thickness + 1));
|
||||
INT thickness = GetAirBrushRadius();
|
||||
SetAirBrushRadius(bThinner ? max(1, thickness - 1) : (thickness + 1));
|
||||
}
|
||||
|
||||
void ToolsModel::MakeRubberThickerOrThinner(BOOL bThinner)
|
||||
@ -180,14 +180,14 @@ void ToolsModel::SetActiveTool(TOOLTYPE nActiveTool)
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ private:
|
||||
BrushStyle m_brushStyle;
|
||||
TOOLTYPE m_activeTool;
|
||||
TOOLTYPE m_oldActiveTool;
|
||||
int m_airBrushWidth;
|
||||
INT m_airBrushRadius;
|
||||
int m_rubberRadius;
|
||||
BOOL m_transpBg;
|
||||
int m_zoom;
|
||||
@ -116,8 +116,8 @@ public:
|
||||
TOOLTYPE GetOldActiveTool() const;
|
||||
void SetActiveTool(TOOLTYPE nActiveTool);
|
||||
|
||||
int GetAirBrushWidth() const;
|
||||
void SetAirBrushWidth(int nAirBrushWidth);
|
||||
INT GetAirBrushRadius() const;
|
||||
void SetAirBrushRadius(INT nAirBrushRadius);
|
||||
void MakeAirBrushThickerOrThinner(BOOL bThinner);
|
||||
|
||||
int GetRubberRadius() const;
|
||||
|
Loading…
Reference in New Issue
Block a user