Author: gschneider
Date: Fri Dec 18 21:33:22 2009
New Revision: 44651
URL:
http://svn.reactos.org/svn/reactos?rev=44651&view=rev
Log:
[paint]
Andrew Faulds <ajfweb AT googlemail DOT com>: Add support for deletion of
rectangular selections
See issue #5043 for more details.
Modified:
trunk/reactos/base/applications/paint/winproc.c
Modified: trunk/reactos/base/applications/paint/winproc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/wi…
==============================================================================
--- trunk/reactos/base/applications/paint/winproc.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/paint/winproc.c [iso-8859-1] Fri Dec 18 21:33:22 2009
@@ -711,8 +711,21 @@
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)
{