mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 05:12:55 +00:00
[MSPAINT] Scrolled canvas has defects in dragging a selection
CORE-18990, CORE-18867
This commit is contained in:
parent
62b6859a67
commit
cb245ff711
2 changed files with 13 additions and 13 deletions
|
@ -258,7 +258,7 @@ LRESULT CCanvasWindow::OnLRButtonDown(BOOL bLeftButton, UINT nMsg, WPARAM wParam
|
|||
{
|
||||
if (bLeftButton)
|
||||
{
|
||||
UnZoomed(pt);
|
||||
CanvasToImage(pt);
|
||||
StartSelectionDrag(hitSelection, pt);
|
||||
}
|
||||
return 0;
|
||||
|
@ -741,7 +741,7 @@ VOID CCanvasWindow::finishDrawing()
|
|||
Invalidate(FALSE);
|
||||
}
|
||||
|
||||
CANVAS_HITTEST CCanvasWindow::SelectionHitTest(POINT ptZoomed)
|
||||
CANVAS_HITTEST CCanvasWindow::SelectionHitTest(POINT ptImage)
|
||||
{
|
||||
if (!selectionModel.m_bShow)
|
||||
return HIT_NONE;
|
||||
|
@ -751,28 +751,28 @@ CANVAS_HITTEST CCanvasWindow::SelectionHitTest(POINT ptZoomed)
|
|||
::OffsetRect(&rcSelection, GRIP_SIZE - GetScrollPos(SB_HORZ), GRIP_SIZE - GetScrollPos(SB_VERT));
|
||||
::InflateRect(&rcSelection, GRIP_SIZE, GRIP_SIZE);
|
||||
|
||||
return getSizeBoxHitTest(ptZoomed, &rcSelection);
|
||||
return getSizeBoxHitTest(ptImage, &rcSelection);
|
||||
}
|
||||
|
||||
VOID CCanvasWindow::StartSelectionDrag(CANVAS_HITTEST hit, POINT ptUnZoomed)
|
||||
VOID CCanvasWindow::StartSelectionDrag(CANVAS_HITTEST hit, POINT ptImage)
|
||||
{
|
||||
m_hitSelection = hit;
|
||||
selectionModel.m_ptHit = ptUnZoomed;
|
||||
selectionModel.m_ptHit = ptImage;
|
||||
selectionModel.TakeOff();
|
||||
|
||||
SetCapture();
|
||||
Invalidate(FALSE);
|
||||
}
|
||||
|
||||
VOID CCanvasWindow::SelectionDragging(POINT ptUnZoomed)
|
||||
VOID CCanvasWindow::SelectionDragging(POINT ptImage)
|
||||
{
|
||||
selectionModel.Dragging(m_hitSelection, ptUnZoomed);
|
||||
selectionModel.Dragging(m_hitSelection, ptImage);
|
||||
Invalidate(FALSE);
|
||||
}
|
||||
|
||||
VOID CCanvasWindow::EndSelectionDrag(POINT ptUnZoomed)
|
||||
VOID CCanvasWindow::EndSelectionDrag(POINT ptImage)
|
||||
{
|
||||
selectionModel.Dragging(m_hitSelection, ptUnZoomed);
|
||||
selectionModel.Dragging(m_hitSelection, ptImage);
|
||||
m_hitSelection = HIT_NONE;
|
||||
Invalidate(FALSE);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue