mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 14:00:54 +00:00
2005-02-03 10:54 Alexander Malmberg <alexander@malmberg.org>
* Source/NSImage.m (min, max): Rename to ... (gs_min, gs_max): ... this. Update callers. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20650 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3a5b17c682
commit
5a9c710034
2 changed files with 19 additions and 14 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-02-03 10:54 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSImage.m (min, max): Rename to ...
|
||||
(gs_min, gs_max): ... this. Update callers.
|
||||
|
||||
2005-01-28 21:58 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSColorWell.m: [NSColorWell mouseDown:] prevent use
|
||||
|
|
|
@ -54,14 +54,14 @@
|
|||
|
||||
/* Helpers. Would be nicer to use the C99 fmin/fmax functions, but that
|
||||
isn't currently possible. */
|
||||
static double min(double x, double y)
|
||||
static double gs_min(double x, double y)
|
||||
{
|
||||
if (x > y)
|
||||
return y;
|
||||
else
|
||||
return x;
|
||||
}
|
||||
static double max(double x, double y)
|
||||
static double gs_max(double x, double y)
|
||||
{
|
||||
if (x < y)
|
||||
return y;
|
||||
|
@ -985,22 +985,22 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
y0 = y1 = p.y;
|
||||
|
||||
p = [transform transformPoint: NSMakePoint(s.width, 0)];
|
||||
x0 = min(x0, p.x);
|
||||
y0 = min(y0, p.y);
|
||||
x1 = max(x1, p.x);
|
||||
y1 = max(y1, p.y);
|
||||
x0 = gs_min(x0, p.x);
|
||||
y0 = gs_min(y0, p.y);
|
||||
x1 = gs_max(x1, p.x);
|
||||
y1 = gs_max(y1, p.y);
|
||||
|
||||
p = [transform transformPoint: NSMakePoint(s.width, s.height)];
|
||||
x0 = min(x0, p.x);
|
||||
y0 = min(y0, p.y);
|
||||
x1 = max(x1, p.x);
|
||||
y1 = max(y1, p.y);
|
||||
x0 = gs_min(x0, p.x);
|
||||
y0 = gs_min(y0, p.y);
|
||||
x1 = gs_max(x1, p.x);
|
||||
y1 = gs_max(y1, p.y);
|
||||
|
||||
p = [transform transformPoint: NSMakePoint(0, 0)];
|
||||
x0 = min(x0, p.x);
|
||||
y0 = min(y0, p.y);
|
||||
x1 = max(x1, p.x);
|
||||
y1 = max(y1, p.y);
|
||||
x0 = gs_min(x0, p.x);
|
||||
y0 = gs_min(y0, p.y);
|
||||
x1 = gs_max(x1, p.x);
|
||||
y1 = gs_max(y1, p.y);
|
||||
|
||||
x0 = floor(x0);
|
||||
y0 = floor(y0);
|
||||
|
|
Loading…
Reference in a new issue