1 /*
2  Project: Graphos
3  GRFunctions.m
4 
5  Utility functions.
6 
7  Copyright (C) 2000-2013 GNUstep Application Project
8 
9  Author: Enrico Sersale (original GDraw implementation)
10  Author: Ing. Riccardo Mottola
11 
12  This application is free software; you can redistribute it and/or
13  modify it under the terms of the GNU General Public
14  License as published by the Free Software Foundation; either
15  version 2 of the License, or (at your option) any later version.
16 
17  This application is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  Library General Public License for more details.
21 
22  You should have received a copy of the GNU General Public
23  License along with this library; if not, write to the Free
24  Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
25  */
26 
27 #import <Foundation/NSGeometry.h>
28 
29 
30 NSPoint pointApplyingCostrainerToPoint(NSPoint p, NSPoint sp);
31 
32 /** returns if the point is inside the boundaries of the given rect */
33 BOOL pointInRect(NSRect rect, NSPoint p);
34 
35 /** generates bounds from the coordinates and dimensions */
36 NSRect GRMakeBounds(float x, float y, float width, float height);
37 
38 /** Removes Zoom from a Point by reverse applying it */
39 NSPoint GRpointDeZoom(NSPoint p, float zf);
40 
41 /** Applies Zoom to a Point */
42 NSPoint GRpointZoom(NSPoint p, float zf);
43 
44 /** retuns the minimum of a and b */
45 double grmin(double a, double b);
46 
47 /** returns the maximum of a and b */
48 double grmax(double a, double b);
49