mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 15:03:00 +00:00
[MSPAINT] Improve Zoom tool (#5781)
- Delete CCanvasWindow::drawZoomFrame. - Invalidate the canvas on mouse move when the active tool is Zoom tool. - Add ZoomTool::OnDrawOverlayOnCanvas to draw the zoom rectangle without flickering. - Improve the zoom trackbar position. - Display the zoom rate on changing the value of the zoom trackbar. - Reverse the direction of the zoom trackbar. - Don't draw the focus rectangle. CORE-19215, CORE-19216
This commit is contained in:
parent
0c164f081a
commit
62eeb158a5
5 changed files with 57 additions and 31 deletions
|
@ -569,6 +569,21 @@ struct ZoomTool : ToolBase
|
|||
{
|
||||
}
|
||||
|
||||
void OnDrawOverlayOnCanvas(HDC hdc) override
|
||||
{
|
||||
CRect rc;
|
||||
canvasWindow.GetImageRect(rc);
|
||||
canvasWindow.ImageToCanvas(rc);
|
||||
|
||||
POINT pt;
|
||||
::GetCursorPos(&pt);
|
||||
::ScreenToClient(canvasWindow, &pt);
|
||||
|
||||
// FIXME: Draw the border of the area that is to be zoomed in
|
||||
if (rc.PtInRect(pt))
|
||||
DrawXorRect(hdc, &rc);
|
||||
}
|
||||
|
||||
void OnButtonDown(BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) override
|
||||
{
|
||||
if (bLeftButton)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue