[MSPAINT] "Selection Clone" and "Selection Brush" (#5734)

- Stamp the image of the selection when the user clicks on
  the selection while holding down the Ctrl key.
- Draw the image of the selection continuously when the user
  starts dragging the selection while holding down the Shift key.
CORE-19094
This commit is contained in:
Katayama Hirofumi MZ 2023-09-28 07:34:25 +09:00 committed by GitHub
parent 03283371c1
commit cbc63d876c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 51 additions and 6 deletions

View file

@ -187,6 +187,17 @@ BOOL SelectionModel::TakeOff()
// Save the selection area
m_rcOld = m_rc;
if (toolsModel.GetActiveTool() == TOOL_RECTSEL)
{
imageModel.PushImageForUndo();
selectionModel.DrawBackgroundRect(imageModel.GetDC(), selectionModel.m_rgbBack);
}
else if (toolsModel.GetActiveTool() == TOOL_FREESEL)
{
imageModel.PushImageForUndo();
selectionModel.DrawBackgroundPoly(imageModel.GetDC(), selectionModel.m_rgbBack);
}
imageModel.NotifyImageChanged();
return TRUE;
}