[MSPAINT] Improve Zoom tool (#5798)

- Delete global zoomTo function.
- Add CCanvasWindow::zoomTo and
  CCanvasWindow::getNewZoomRect functions.
- Rename CCanvasWindow::updateScrollInfo as
  CCanvasWindow::updateScrollRange.
- Rename CCanvasWindow::resetScrollPos as
  CCanvasWindow::updateScrollPos.
- Draw the proper zoom rectangle on mouse move.
- Revert the active tool on click when the tool
  was Zoom.
CORE-19094
This commit is contained in:
Katayama Hirofumi MZ 2023-10-17 07:25:50 +09:00 committed by GitHub
parent e2d3aa7f4a
commit 8f1eb03ad2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 113 additions and 73 deletions

View file

@ -241,7 +241,7 @@ HBITMAP InitializeImage(LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
HBITMAP SetBitmapAndInfo(HBITMAP hBitmap, LPCWSTR name, LPWIN32_FIND_DATAW pFound, BOOL isFile)
{
// update image
canvasWindow.resetScrollPos();
canvasWindow.updateScrollPos();
imageModel.PushImageForUndo(hBitmap);
imageModel.ClearHistory();