ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ahangles.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /***************************************************************************/
23 /* */
24 /* ahangles.h */
25 /* */
26 /* A routine used to compute vector angles with limited accuracy */
27 /* and very high speed (specification). */
28 /* */
29 /* Copyright 2000-2001, 2002 Catharon Productions Inc. */
30 /* Author: David Turner */
31 /* */
32 /* This file is part of the Catharon Typography Project and shall only */
33 /* be used, modified, and distributed under the terms of the Catharon */
34 /* Open Source License that should come with this file under the name */
35 /* `CatharonLicense.txt'. By continuing to use, modify, or distribute */
36 /* this file you indicate that you have read the license and */
37 /* understand and accept it fully. */
38 /* */
39 /* Note that this license is compatible with the FreeType license. */
40 /* */
41 /***************************************************************************/
42 
43 
44 #ifndef AGS_LIB_FREETYPE_AHANGLES_H
45 #define AGS_LIB_FREETYPE_AHANGLES_H
46 
47 
48 #include <ft2build.h>
49 #include "ags/lib/freetype-2.1.3/autohint/ahtypes.h"
50 
51 namespace AGS3 {
52 namespace FreeType213 {
53 
54 
55 /* PI expressed in ah_angles -- we don't really need an important */
56 /* precision, so 256 should be enough */
57 #define AH_PI 256
58 #define AH_2PI (AH_PI * 2)
59 #define AH_HALF_PI (AH_PI / 2)
60 #define AH_2PIMASK (AH_2PI - 1)
61 
62 /* the number of bits used to express an arc tangent; */
63 /* see the structure of the lookup table */
64 #define AH_ATAN_BITS 8
65 
66 extern const AH_Angle ah_arctan[1L << AH_ATAN_BITS];
67 
68 AH_Angle ah_angle(FT_Vector *v);
69 AH_Angle ah_angle_diff(AH_Angle angle1, AH_Angle angle2);
70 
71 
72 } // End of namespace FreeType213
73 } // End of namespace AGS3
74 
75 #endif /* AGS_LIB_FREETYPE_AHANGLES_H */
Definition: ags.h:40