Temporary fix to round down image size

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12262 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-01-29 15:23:17 +00:00
parent fff7acc2b7
commit 69a9e0dea5
4 changed files with 18 additions and 56 deletions

View file

@ -289,7 +289,12 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
//_flags.flipDraw = NO;
if (aSize.width && aSize.height)
{
_size = aSize;
// FIXME: rounding down is just a quick fix.
// the non-integrality of the image should be
// taken care of in the composite methods in
// the backend.
_size.width = (int) aSize.width;
_size.height = (int) aSize.height;
_flags.sizeWasExplicitlySet = YES;
}
//_flags.usesEPSOnResolutionMismatch = NO;
@ -488,7 +493,12 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
- (void) setSize: (NSSize)aSize
{
_size = aSize;
// FIXME: the rounding down is just a quick fix
// it should actually be handled in composite in
// the backend.
_size.width = (int) aSize.width;
_size.height = (int) aSize.height;
_flags.sizeWasExplicitlySet = YES;
// TODO: This invalidates any cached data
}
@ -680,7 +690,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
aRect.origin.x += rect.origin.x;
aRect.origin.y += rect.origin.y;
rect = NSIntersectionRect(aRect, rect);
PScomposite(NSMinX(rect), NSMinY(rect), NSWidth(rect), NSHeight(rect),
[[(NSCachedImageRep *)rep window] gState], aPoint.x, y, op);
}