mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 22:46:43 +00:00
[MSPAINT] Make imageArea window-less (#5215)
- Move imageArea code into canvasWindow. - Delete imgarea.cpp, imgarea.h, and imageArea. - Add CCanvasWindow::ImageToCanvas and CCanvasWindow::CanvasToImage to convert the coordinates. - Realize drawing of resizing image area. CORE-18867
This commit is contained in:
parent
fa322c2e14
commit
efe7368c46
16 changed files with 544 additions and 666 deletions
|
@ -151,14 +151,14 @@ struct FreeSelTool : ToolBase
|
|||
selectionModel.ResetPtStack();
|
||||
selectionModel.m_bShow = FALSE;
|
||||
}
|
||||
imageArea.Invalidate(FALSE);
|
||||
canvasWindow.Invalidate(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void OnFinishDraw()
|
||||
{
|
||||
if (m_bLeftButton)
|
||||
imageArea.Invalidate(FALSE);
|
||||
canvasWindow.Invalidate(FALSE);
|
||||
|
||||
m_bLeftButton = FALSE;
|
||||
ToolBase::OnFinishDraw();
|
||||
|
@ -214,14 +214,14 @@ struct RectSelTool : ToolBase
|
|||
if (start.x == x && start.y == y)
|
||||
imageModel.Undo(TRUE);
|
||||
selectionModel.m_bShow = !selectionModel.m_rc.IsRectEmpty();
|
||||
imageArea.Invalidate(FALSE);
|
||||
canvasWindow.Invalidate(FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
void OnFinishDraw()
|
||||
{
|
||||
if (m_bLeftButton)
|
||||
imageArea.Invalidate(FALSE);
|
||||
canvasWindow.Invalidate(FALSE);
|
||||
|
||||
m_bLeftButton = FALSE;
|
||||
ToolBase::OnFinishDraw();
|
||||
|
@ -417,7 +417,7 @@ struct TextTool : ToolBase
|
|||
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick)
|
||||
{
|
||||
if (!textEditWindow.IsWindow())
|
||||
textEditWindow.Create(imageArea);
|
||||
textEditWindow.Create(canvasWindow);
|
||||
|
||||
imageModel.CopyPrevious();
|
||||
UpdatePoint(x, y);
|
||||
|
@ -484,7 +484,7 @@ struct TextTool : ToolBase
|
|||
}
|
||||
|
||||
if (!textEditWindow.IsWindow())
|
||||
textEditWindow.Create(imageArea);
|
||||
textEditWindow.Create(canvasWindow);
|
||||
|
||||
textEditWindow.SetWindowText(NULL);
|
||||
textEditWindow.ValidateEditRect(&rc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue