mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 15:42:19 +00:00
[MSPAINT] Add selectionModel.drawFrameOnCanvas and use it
Refactoring. CORE-19094
This commit is contained in:
parent
c2bb5aa01d
commit
4a52a4b04c
4 changed files with 16 additions and 19 deletions
|
@ -523,8 +523,7 @@ void SelectionModel::NotifyContentChanged()
|
|||
|
||||
void SelectionModel::SwapWidthAndHeight()
|
||||
{
|
||||
INT cx = m_rc.Width();
|
||||
INT cy = m_rc.Height();
|
||||
INT cx = m_rc.Width(), cy = m_rc.Height();
|
||||
m_rc.right = m_rc.left + cy;
|
||||
m_rc.bottom = m_rc.top + cx;
|
||||
}
|
||||
|
@ -540,6 +539,18 @@ HITTEST SelectionModel::hitTest(POINT ptCanvas)
|
|||
return getSizeBoxHitTest(ptCanvas, &rcSelection);
|
||||
}
|
||||
|
||||
void SelectionModel::drawFrameOnCanvas(HDC hCanvasDC)
|
||||
{
|
||||
if (!m_bShow)
|
||||
return;
|
||||
|
||||
RECT rcSelection = m_rc;
|
||||
canvasWindow.ImageToCanvas(rcSelection);
|
||||
|
||||
::InflateRect(&rcSelection, GRIP_SIZE, GRIP_SIZE);
|
||||
drawSizeBoxes(hCanvasDC, &rcSelection, TRUE);
|
||||
}
|
||||
|
||||
void SelectionModel::StretchSelection(BOOL bShrink)
|
||||
{
|
||||
if (!m_bShow)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue