From e197e9a3c4860b20b5d6def1bf7c640d761b0a96 Mon Sep 17 00:00:00 2001 From: Adam Fedor Date: Sat, 14 Apr 2001 20:06:13 +0000 Subject: [PATCH] Fix imgae compositing - intersect fromRect git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9589 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSImage.m | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7b80953fd..c7f9f09e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-04-14 Adam Fedor + + * Source/NSImage.m ([NSImage -compositeToPoint:fromRect:operation:]): + intersect fromRect with image rect to get proper composite rect. + 2001-03-27 Frederic De Jaeger * Tools/Functions.m: remove some dummy functions that are useless diff --git a/Source/NSImage.m b/Source/NSImage.m index 75cc93366..c323ae8af 100644 --- a/Source/NSImage.m +++ b/Source/NSImage.m @@ -627,7 +627,8 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep) // FIXME: This undos the change done in NSCell, perhaps we can remove both? if ([[ctxt focusView] isFlipped]) y -= rect.size.height; - // FIXME This should be able to cut out part of the image + + rect = NSIntersectionRect(aRect, rect); PScomposite(NSMinX(rect), NSMinY(rect), NSWidth(rect), NSHeight(rect), [[(NSCachedImageRep *)rep window] gState], aPoint.x, y, op); }