[ros-diffs] [gschneider] 44651: [paint] Andrew Faulds <ajfweb AT googlemail DOT com>: Add support for deletion of rectangular selections See issue #5043 for more details.

gschneider at svn.reactos.org gschneider at svn.reactos.org
Fri Dec 18 21:33:22 CET 2009


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/winproc.c?rev=44651&r1=44650&r2=44651&view=diff
==============================================================================
--- 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)
                     {




More information about the Ros-diffs mailing list