From 6bab45e2238c0e2acfa6c8f3776c2ee29d1df0e7 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Fri, 6 Apr 2012 12:27:40 +0000 Subject: [PATCH] LazRegions: Minor fixes and commenting git-svn-id: trunk@36606 - --- lcl/interfaces/customdrawn/customdrawnwinapi.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lcl/interfaces/customdrawn/customdrawnwinapi.inc b/lcl/interfaces/customdrawn/customdrawnwinapi.inc index 7d0cc7418d..f955d9f429 100644 --- a/lcl/interfaces/customdrawn/customdrawnwinapi.inc +++ b/lcl/interfaces/customdrawn/customdrawnwinapi.inc @@ -238,11 +238,16 @@ begin if (fnCombineMode<>RGN_COPY) and not IsValidGDIObject(Src2) then Exit; + // If the operation is a copy, execute it now, as it will not involve Src2 + // The common code would not work in this case if fnCombineMode = RGN_COPY then begin if Dest <> Src1 then DestRgn.Assign(Src1Rgn); + Result := DestRgn.GetRegionKind(); + Exit; end; + // Now operations which involve Src2, consider both cases: Dest=Src1 and Dest<>Src1 if Dest = Src1 then DestRgn.CombineWith(Src2Rgn, fnCombineMode) else