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

@ -1,3 +1,8 @@
2002-01-28 Willem Rein Oudshoorn <woudshoo@xs4all.nl>
* gui/Source/NSImage.m ([NSImage -initWithSize:]): round the size down
([NSImage -setSize:]): round the size down
Tue Jan 29 10:59:04 2002 Nicola Pero <nicola@brainstorm.co.uk>
* GNUmakefile.postamble (configure): Rule removed. It was causing

View file

@ -1,23 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.5//EN" "http://www.gnustep.org/gsdoc-0_6_5.xml">
<gsdoc base="NSAttributedStrngAdds" prev="NSApplication.html" next="NSBezierPath.html" up="Gui.html">
<head>
<title>NSAttributedStrngAdds</title>
<author name="Richard Frith-Macdonald">
<email address="rfm@gnu.org"/>
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
</author>
<version>$Revision$</version>
<date>$Date$</date>
</head>
<body>
<chapter>
<heading>NSAttributedStrngAdds</heading>
<class name="NSAttributedStrngAdds">
<declared>Gui/NSApplication.h</declared>
<desc>
</desc>
</class>
</chapter>
</body>
</gsdoc>

View file

@ -1,30 +0,0 @@
<html><head>
<title>NSAttributedStrngAdds</title>
</head>
<body>
<a href ="NSApplication.html">[Previous] </a>
<a href ="Gui.html">[Up] </a>
<a href ="NSBezierPath.html">[Next] </a>
<h1>NSAttributedStrngAdds</h1>
<h3>Authors </h3>
<dl>
<dt><a href ="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a>
<dd>
</dl>
<p>Version: $Revision$</p>
<p>Date: $Date$</p>
<h2><a name ="cont-0">NSAttributedStrngAdds</a></h2>
<h2><a name ="NSAttributedStrngAdds">NSAttributedStrngAdds</a></h2>
<p><b>Declared in: </b> Gui/NSApplication.h</p>
<hr>
<h2>Instance Variables </h2>
<ul>
</ul>
<h2>Methods </h2>
<ul>
</ul>
</body>
</html>

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);
}