mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 19:22:58 +00:00
[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:
parent
03283371c1
commit
cbc63d876c
7 changed files with 51 additions and 6 deletions
|
@ -299,3 +299,16 @@ void ImageModel::UnlockBitmap(HBITMAP hbmLocked)
|
|||
m_hBms[m_currInd] = hbmLocked;
|
||||
m_hbmOld = ::SelectObject(m_hDrawingDC, hbmLocked); // Re-select
|
||||
}
|
||||
|
||||
void ImageModel::SelectionClone(BOOL bUndoable)
|
||||
{
|
||||
if (!selectionModel.m_bShow || ::IsRectEmpty(&selectionModel.m_rc))
|
||||
return;
|
||||
|
||||
if (bUndoable)
|
||||
PushImageForUndo(CopyBitmap());
|
||||
|
||||
selectionModel.DrawSelection(m_hDrawingDC, paletteModel.GetBgColor(),
|
||||
toolsModel.IsBackgroundTransparent());
|
||||
NotifyImageChanged();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue