mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
[paint]
Andrew Faulds <ajfweb AT googlemail DOT com>: Add support for deletion of rectangular selections See issue #5043 for more details. svn path=/trunk/; revision=44651
This commit is contained in:
parent
6ceb354c5c
commit
077c75ad65
1 changed files with 13 additions and 0 deletions
|
@ -711,8 +711,21 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
CloseClipboard();
|
||||
break;
|
||||
case IDM_EDITDELETESELECTION:
|
||||
{
|
||||
/* FIXME: deleting freeform selections unsupported */
|
||||
RECT selectionRect, areaRect;
|
||||
long x1, x2, y1, y2;
|
||||
|
||||
GetWindowRect(hSelection, &selectionRect);
|
||||
GetWindowRect(hImageArea, &areaRect);
|
||||
x1 = ((selectionRect.left - areaRect.left) / (zoom / 1000)) + 1;
|
||||
y1 = ((selectionRect.top - areaRect.top) / (zoom / 1000)) + 1;
|
||||
x2 = (selectionRect.right - areaRect.left) / (zoom / 1000);
|
||||
y2 = (selectionRect.bottom - areaRect.top) / (zoom / 1000);
|
||||
Rect(hDrawingDC, x1, y1, x2, y2, bgColor, bgColor, 0, TRUE);
|
||||
ShowWindow(hSelection, SW_HIDE);
|
||||
break;
|
||||
}
|
||||
case IDM_EDITSELECTALL:
|
||||
if (activeTool == 2)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue