]>
git.saurik.com Git - wxWidgets.git/blob - src/freetype/autohint/mather.py
5 # autohint math table builder
9 # Copyright 1996-2000 by
10 # David Turner, Robert Wilhelm, and Werner Lemberg.
12 # This file is part of the FreeType project, and may only be used, modified,
13 # and distributed under the terms of the FreeType project license,
14 # LICENSE.TXT. By continuing to use, modify, or distribute this file you
15 # indicate that you have read the license and understand and accept it
23 def print_arctan( atan_bits
):
24 atan_base
= 1 << atan_bits
26 print " static AH_Angle ag_arctan[1L << AG_ATAN_BITS] ="
32 for n
in range( atan_base
):
34 if ( n
== atan_base
- 1 ):
37 angle
= math
.atan( n
* 1.0 / atan_base
) / math
.pi
* ag_pi
38 line
= line
+ " " + repr( int( angle
+ 0.5 ) ) + comma
50 # This routine is not used currently.
53 print " static FT_Fixed ah_sines[AG_HALF_PI + 1] ="
59 for n
in range( ag_pi
/ 2 ):
60 sinus
= math
.sin( n
* math
.pi
/ ag_pi
)
61 line
= line
+ " " + repr( int( 65536.0 * sinus
) ) + ","