mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Tidyup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3697 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
51ea21fd54
commit
188050a7b8
2 changed files with 17 additions and 17 deletions
|
@ -273,23 +273,8 @@ NSDivideRect(NSRect aRect,
|
|||
|
||||
/* Returns a rectangle obtained by expanding ARECT minimally
|
||||
* so that all four of its defining components are integers. */
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSIntegralRect(NSRect aRect) GS_GEOM_ATTR;
|
||||
|
||||
GS_GEOM_SCOPE NSRect
|
||||
NSIntegralRect(NSRect aRect)
|
||||
{
|
||||
NSRect rect;
|
||||
|
||||
if (NSIsEmptyRect(aRect))
|
||||
return NSMakeRect(0, 0, 0, 0);
|
||||
|
||||
rect.origin.x = floor(aRect.origin.x);
|
||||
rect.origin.y = floor(aRect.origin.y);
|
||||
rect.size.width = ceil(aRect.size.width);
|
||||
rect.size.height = ceil(aRect.size.height);
|
||||
return rect;
|
||||
}
|
||||
extern NSRect
|
||||
NSIntegralRect(NSRect aRect);
|
||||
|
||||
/** Compute a Third Rectangle from Two Rectangles... **/
|
||||
|
||||
|
|
|
@ -38,6 +38,21 @@
|
|||
/**** Function Implementations ***********************************************/
|
||||
/* Most of these are implemented in the header file as inline functkions */
|
||||
|
||||
NSRect
|
||||
NSIntegralRect(NSRect aRect)
|
||||
{
|
||||
NSRect rect;
|
||||
|
||||
if (NSIsEmptyRect(aRect))
|
||||
return NSMakeRect(0, 0, 0, 0);
|
||||
|
||||
rect.origin.x = floor(aRect.origin.x);
|
||||
rect.origin.y = floor(aRect.origin.y);
|
||||
rect.size.width = ceil(aRect.size.width);
|
||||
rect.size.height = ceil(aRect.size.height);
|
||||
return rect;
|
||||
}
|
||||
|
||||
void
|
||||
NSDivideRect(NSRect aRect,
|
||||
NSRect *slice,
|
||||
|
|
Loading…
Reference in a new issue