| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* ftcalc.h */ | 3 /* ftcalc.h */ |
| 4 /* */ | 4 /* */ |
| 5 /* Arithmetic computations (specification). */ | 5 /* Arithmetic computations (specification). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 1996-2006, 2008, 2009, 2012-2014 by */ | 7 /* Copyright 1996-2015 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
| 11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 * A variant of FT_Vector_Transform. See comments for | 293 * A variant of FT_Vector_Transform. See comments for |
| 294 * FT_Matrix_Multiply_Scaled. | 294 * FT_Matrix_Multiply_Scaled. |
| 295 */ | 295 */ |
| 296 FT_BASE( void ) | 296 FT_BASE( void ) |
| 297 FT_Vector_Transform_Scaled( FT_Vector* vector, | 297 FT_Vector_Transform_Scaled( FT_Vector* vector, |
| 298 const FT_Matrix* matrix, | 298 const FT_Matrix* matrix, |
| 299 FT_Long scaling ); | 299 FT_Long scaling ); |
| 300 | 300 |
| 301 | 301 |
| 302 /* | 302 /* |
| 303 * This function normalizes a vector and returns its original length. |
| 304 * The normalized vector is a 16.16 fixed-point unit vector with length |
| 305 * close to 0x10000. The accuracy of the returned length is limited to |
| 306 * 16 bits also. The function utilizes quick inverse square root |
| 307 * approximation without divisions and square roots relying on Newton's |
| 308 * iterations instead. |
| 309 */ |
| 310 FT_BASE( FT_UInt32 ) |
| 311 FT_Vector_NormLen( FT_Vector* vector ); |
| 312 |
| 313 |
| 314 /* |
| 303 * Return -1, 0, or +1, depending on the orientation of a given corner. | 315 * Return -1, 0, or +1, depending on the orientation of a given corner. |
| 304 * We use the Cartesian coordinate system, with positive vertical values | 316 * We use the Cartesian coordinate system, with positive vertical values |
| 305 * going upwards. The function returns +1 if the corner turns to the | 317 * going upwards. The function returns +1 if the corner turns to the |
| 306 * left, -1 to the right, and 0 for undecidable cases. | 318 * left, -1 to the right, and 0 for undecidable cases. |
| 307 */ | 319 */ |
| 308 FT_BASE( FT_Int ) | 320 FT_BASE( FT_Int ) |
| 309 ft_corner_orientation( FT_Pos in_x, | 321 ft_corner_orientation( FT_Pos in_x, |
| 310 FT_Pos in_y, | 322 FT_Pos in_y, |
| 311 FT_Pos out_x, | 323 FT_Pos out_x, |
| 312 FT_Pos out_y ); | 324 FT_Pos out_y ); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 #define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \ | 409 #define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \ |
| 398 : ( -( ( 32 - (x) ) & -64 ) ) ) | 410 : ( -( ( 32 - (x) ) & -64 ) ) ) |
| 399 | 411 |
| 400 | 412 |
| 401 FT_END_HEADER | 413 FT_END_HEADER |
| 402 | 414 |
| 403 #endif /* __FTCALC_H__ */ | 415 #endif /* __FTCALC_H__ */ |
| 404 | 416 |
| 405 | 417 |
| 406 /* END */ | 418 /* END */ |
| OLD | NEW |