[ros-diffs] [bfreisen] 45533: [paint] fix rectangular selection tool
bfreisen at svn.reactos.org
bfreisen at svn.reactos.org
Tue Feb 9 19:06:18 CET 2010
Author: bfreisen
Date: Tue Feb 9 19:06:18 2010
New Revision: 45533
URL: http://svn.reactos.org/svn/reactos?rev=45533&view=rev
Log:
[paint] fix rectangular selection tool
Modified:
trunk/reactos/base/applications/paint/mouse.c
Modified: trunk/reactos/base/applications/paint/mouse.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/paint/mouse.c?rev=45533&r1=45532&r2=45533&view=diff
==============================================================================
--- trunk/reactos/base/applications/paint/mouse.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/paint/mouse.c [iso-8859-1] Tue Feb 9 19:06:18 2010
@@ -251,15 +251,18 @@
resetToU1();
if ((rectSel_src[2] != 0) && (rectSel_src[3] != 0))
{
- DeleteObject(SelectObject
- (hSelDC, hSelBm =
- (HBITMAP) CreateDIBWithProperties(rectSel_src[2], rectSel_src[3])));
DeleteObject(hSelMask);
+ hSelMask = CreateBitmap(rectSel_src[2], rectSel_src[3], 1, 1, NULL);
+ DeleteObject(SelectObject(hSelDC, hSelMask));
+ Rect(hSelDC, 0, 0, rectSel_src[2], rectSel_src[3], 0x00ffffff, 0x00ffffff, 1, 2);
+ SelectObject(hSelDC, hSelBm = CreateDIBWithProperties(rectSel_src[2], rectSel_src[3]));
+ resetToU1();
BitBlt(hSelDC, 0, 0, rectSel_src[2], rectSel_src[3], hDrawingDC, rectSel_src[0],
rectSel_src[1], SRCCOPY);
Rect(hdc, rectSel_src[0], rectSel_src[1], rectSel_src[0] + rectSel_src[2],
rectSel_src[1] + rectSel_src[3], bgColor, bgColor, 0, TRUE);
newReversible();
+
placeSelWin();
ShowWindow(hSelection, SW_SHOW);
}
More information about the Ros-diffs
mailing list