OLD | NEW |
1 | 1 |
2 //---------------------------------------------------------------------------- | 2 //---------------------------------------------------------------------------- |
3 // XYQ: 2006-01-22 Copied from AGG project. | 3 // XYQ: 2006-01-22 Copied from AGG project. |
4 // TODO: This file uses intensive floating point operations, so it's NOT suitabl
e | 4 // TODO: This file uses intensive floating point operations, so it's NOT suitabl
e |
5 // for platforms like Symbian OS. We need to change to FIX format. | 5 // for platforms like Symbian OS. We need to change to FIX format. |
6 //---------------------------------------------------------------------------- | 6 //---------------------------------------------------------------------------- |
7 //---------------------------------------------------------------------------- | 7 //---------------------------------------------------------------------------- |
8 // Anti-Grain Geometry - Version 2.3 | 8 // Anti-Grain Geometry - Version 2.3 |
9 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) | 9 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) |
10 // | 10 // |
11 // Permission to copy, use, modify, sell and distribute this software | 11 // Permission to copy, use, modify, sell and distribute this software |
12 // is granted provided this copyright notice appears in all copies. | 12 // is granted provided this copyright notice appears in all copies. |
13 // This software is provided "as is" without express or implied | 13 // This software is provided "as is" without express or implied |
14 // warranty, and with no claim as to its suitability for any purpose. | 14 // warranty, and with no claim as to its suitability for any purpose. |
15 // | 15 // |
16 //---------------------------------------------------------------------------- | 16 //---------------------------------------------------------------------------- |
17 // Contact: mcseem@antigrain.com | 17 // Contact: mcseem@antigrain.com |
18 // mcseemagg@yahoo.com | 18 // mcseemagg@yahoo.com |
19 // http://www.antigrain.com | 19 // http://www.antigrain.com |
20 //---------------------------------------------------------------------------- | 20 //---------------------------------------------------------------------------- |
21 | 21 |
22 #include "agg_curves.h" | 22 #include "agg_curves.h" |
23 #include "agg_math.h" | 23 #include "agg_math.h" |
24 #include "core/fxcrt/include/fx_basic.h" | 24 #include "core/fxcrt/fx_basic.h" |
25 | 25 |
26 namespace agg | 26 namespace agg |
27 { | 27 { |
28 const FX_FLOAT curve_collinearity_epsilon = 1e-30f; | 28 const FX_FLOAT curve_collinearity_epsilon = 1e-30f; |
29 enum curve_recursion_limit_e { curve_recursion_limit = 16 }; | 29 enum curve_recursion_limit_e { curve_recursion_limit = 16 }; |
30 void curve4_div::init(FX_FLOAT x1, FX_FLOAT y1, | 30 void curve4_div::init(FX_FLOAT x1, FX_FLOAT y1, |
31 FX_FLOAT x2, FX_FLOAT y2, | 31 FX_FLOAT x2, FX_FLOAT y2, |
32 FX_FLOAT x3, FX_FLOAT y3, | 32 FX_FLOAT x3, FX_FLOAT y3, |
33 FX_FLOAT x4, FX_FLOAT y4) | 33 FX_FLOAT x4, FX_FLOAT y4) |
34 { | 34 { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void curve4_div::bezier(FX_FLOAT x1, FX_FLOAT y1, | 102 void curve4_div::bezier(FX_FLOAT x1, FX_FLOAT y1, |
103 FX_FLOAT x2, FX_FLOAT y2, | 103 FX_FLOAT x2, FX_FLOAT y2, |
104 FX_FLOAT x3, FX_FLOAT y3, | 104 FX_FLOAT x3, FX_FLOAT y3, |
105 FX_FLOAT x4, FX_FLOAT y4) | 105 FX_FLOAT x4, FX_FLOAT y4) |
106 { | 106 { |
107 m_points.add(point_type(x1, y1)); | 107 m_points.add(point_type(x1, y1)); |
108 recursive_bezier(x1, y1, x2, y2, x3, y3, x4, y4, 0); | 108 recursive_bezier(x1, y1, x2, y2, x3, y3, x4, y4, 0); |
109 m_points.add(point_type(x4, y4)); | 109 m_points.add(point_type(x4, y4)); |
110 } | 110 } |
111 } | 111 } |
OLD | NEW |