fonttools 4.59.1__cp314-cp314t-win_amd64.whl → 4.59.2__cp314-cp314t-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fonttools might be problematic. Click here for more details.
- fontTools/__init__.py +1 -1
- fontTools/cu2qu/cu2qu.c +730 -637
- fontTools/cu2qu/cu2qu.cp314t-win_amd64.pyd +0 -0
- fontTools/cu2qu/cu2qu.py +17 -2
- fontTools/feaLib/builder.py +9 -3
- fontTools/feaLib/lexer.cp314t-win_amd64.pyd +0 -0
- fontTools/feaLib/parser.py +11 -1
- fontTools/feaLib/variableScalar.py +6 -1
- fontTools/misc/bezierTools.cp314t-win_amd64.pyd +0 -0
- fontTools/misc/textTools.py +4 -2
- fontTools/pens/momentsPen.cp314t-win_amd64.pyd +0 -0
- fontTools/qu2cu/qu2cu.cp314t-win_amd64.pyd +0 -0
- fontTools/subset/__init__.py +1 -0
- fontTools/ttLib/tables/_a_v_a_r.py +4 -2
- fontTools/ttLib/tables/_n_a_m_e.py +11 -6
- fontTools/varLib/__init__.py +80 -1
- fontTools/varLib/instancer/__init__.py +56 -18
- fontTools/varLib/iup.cp314t-win_amd64.pyd +0 -0
- {fonttools-4.59.1.dist-info → fonttools-4.59.2.dist-info}/METADATA +15 -1
- {fonttools-4.59.1.dist-info → fonttools-4.59.2.dist-info}/RECORD +26 -26
- {fonttools-4.59.1.data → fonttools-4.59.2.data}/data/share/man/man1/ttx.1 +0 -0
- {fonttools-4.59.1.dist-info → fonttools-4.59.2.dist-info}/WHEEL +0 -0
- {fonttools-4.59.1.dist-info → fonttools-4.59.2.dist-info}/entry_points.txt +0 -0
- {fonttools-4.59.1.dist-info → fonttools-4.59.2.dist-info}/licenses/LICENSE +0 -0
- {fonttools-4.59.1.dist-info → fonttools-4.59.2.dist-info}/licenses/LICENSE.external +0 -0
- {fonttools-4.59.1.dist-info → fonttools-4.59.2.dist-info}/top_level.txt +0 -0
fontTools/cu2qu/cu2qu.c
CHANGED
|
@@ -1546,7 +1546,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do
|
|
|
1546
1546
|
/*--- Type declarations ---*/
|
|
1547
1547
|
struct __pyx_obj_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen;
|
|
1548
1548
|
|
|
1549
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
1549
|
+
/* "fontTools/cu2qu/cu2qu.py":133
|
|
1550
1550
|
*
|
|
1551
1551
|
*
|
|
1552
1552
|
* @cython.locals( # <<<<<<<<<<<<<<
|
|
@@ -1719,6 +1719,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, P
|
|
|
1719
1719
|
/* GetBuiltinName.proto */
|
|
1720
1720
|
static PyObject *__Pyx_GetBuiltinName(PyObject *name);
|
|
1721
1721
|
|
|
1722
|
+
/* IncludeStdlibH.proto */
|
|
1723
|
+
#include <stdlib.h>
|
|
1724
|
+
|
|
1722
1725
|
/* PyLongCompare.proto */
|
|
1723
1726
|
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
|
|
1724
1727
|
|
|
@@ -2867,7 +2870,7 @@ static const char __pyx_k_curves_to_quadratic[] = "curves_to_quadratic";
|
|
|
2867
2870
|
static const char __pyx_k_fontTools_cu2qu_cu2qu[] = "fontTools.cu2qu.cu2qu";
|
|
2868
2871
|
static const char __pyx_k_split_cubic_into_n_gen[] = "_split_cubic_into_n_gen";
|
|
2869
2872
|
static const char __pyx_k_Lib_fontTools_cu2qu_cu2qu_py[] = "Lib/fontTools/cu2qu/cu2qu.py";
|
|
2870
|
-
static const char
|
|
2873
|
+
static const char __pyx_k_curves_to_quadratic_line_486[] = "curves_to_quadratic (line 486)";
|
|
2871
2874
|
static const char __pyx_k_AWBc_U_U_3fBa_AWCy_7_2QgQgT_a_Q[] = "\200\001\360\006\000()\360*\000\005\r\210A\210W\220B\220c\230\024\230U\240!\340\004\010\210\005\210U\220!\2203\220f\230B\230a\330\010\021\320\021$\240A\240W\250C\250y\270\001\330\010\013\2107\220'\230\021\340\014\023\2202\220Q\220g\230Q\230g\240T\250\025\250a\340\004\n\320\n\035\230Q\230a";
|
|
2872
2875
|
static const char __pyx_k_J_Qawb_4uG4y_3a_3c_1A_avRq_T_AV[] = "\200\001\340,-\360J\001\000\005\016\210Q\210a\210w\220b\230\003\2304\230u\240G\2504\250y\270\001\330\004\013\2103\210a\210|\2303\230c\240\021\240!\340\004\010\210\003\2101\210A\330\004\016\210a\210v\220R\220q\330\004\r\210T\220\021\330\004\010\210\001\330\004\005\330\010\021\320\021$\240A\240V\2501\250D\260\003\260:\270Q\270d\300!\330\010\013\2107\220#\220Q\330\014\017\210r\220\023\220A\330\020\021\330\014\021\220\021\330\014\025\220Q\330\014\r\330\010\017\210q\220\005\220Q\330\010\r\210R\210r\220\023\220B\220a\330\010\013\2102\210S\220\001\340\014\023\2201\220B\220a\220w\230a\230w\240d\250%\250x\260t\270:\300Q\340\004\n\320\n\035\230Q\230a";
|
|
2873
2876
|
static const char __pyx_k_Return_quadratic_Bezier_splines[] = "Return quadratic Bezier splines approximating the input cubic Beziers.\n\n Args:\n curves: A sequence of *n* curves, each curve being a sequence of four\n 2D tuples.\n max_errors: A sequence of *n* floats representing the maximum permissible\n deviation from each of the cubic Bezier curves.\n all_quadratic (bool): If True (default) returned values are a\n quadratic spline. If False, they are either a single quadratic\n curve or a single cubic curve.\n\n Example::\n\n >>> curves_to_quadratic( [\n ... [ (50,50), (100,100), (150,100), (200,50) ],\n ... [ (75,50), (120,100), (150,75), (200,60) ]\n ... ], [1,1] )\n [[(50.0, 50.0), (75.0, 75.0), (125.0, 91.66666666666666), (175.0, 75.0), (200.0, 50.0)], [(75.0, 50.0), (97.5, 75.0), (135.41666666666666, 82.08333333333333), (175.0, 67.5), (200.0, 60.0)]]\n\n The returned splines have \"implied oncurve points\" suitable for use in\n TrueType ``glif`` outlines - i.e. in the first spline returned above,\n the first quadratic segment runs from (50,50) to\n ( (75 + 125)/2 , (120 + 91.666..)/2 ) = (100, 83.333...).\n\n Returns:\n If all_quadratic is True, a list of splines, each spline being a list\n of 2D tuples.\n\n If all_quadratic is False, a list of curves, each curve being a quadratic\n (length 3), or cubic (length 4).\n\n Raises:\n fontTools.cu2qu.Errors.ApproxNotFoundError: if no suitable approximation\n can be found for all curves with the given parameters.\n ";
|
|
@@ -3002,7 +3005,7 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati
|
|
|
3002
3005
|
#define __pyx_n_u_curve_to_quadratic __pyx_string_tab[27]
|
|
3003
3006
|
#define __pyx_n_u_curves __pyx_string_tab[28]
|
|
3004
3007
|
#define __pyx_n_u_curves_to_quadratic __pyx_string_tab[29]
|
|
3005
|
-
#define
|
|
3008
|
+
#define __pyx_kp_u_curves_to_quadratic_line_486 __pyx_string_tab[30]
|
|
3006
3009
|
#define __pyx_n_u_d __pyx_string_tab[31]
|
|
3007
3010
|
#define __pyx_n_u_d1 __pyx_string_tab[32]
|
|
3008
3011
|
#define __pyx_n_u_delta_2 __pyx_string_tab[33]
|
|
@@ -3125,16 +3128,58 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void
|
|
|
3125
3128
|
*/
|
|
3126
3129
|
|
|
3127
3130
|
static CYTHON_INLINE double __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_t_double_complex __pyx_v_v1, __pyx_t_double_complex __pyx_v_v2) {
|
|
3131
|
+
double __pyx_v_result;
|
|
3128
3132
|
double __pyx_r;
|
|
3133
|
+
double __pyx_t_1;
|
|
3134
|
+
int __pyx_t_2;
|
|
3129
3135
|
|
|
3130
3136
|
/* "fontTools/cu2qu/cu2qu.py":51
|
|
3131
3137
|
* double: Dot product.
|
|
3132
3138
|
* """
|
|
3133
|
-
*
|
|
3139
|
+
* result = (v1 * v2.conjugate()).real # <<<<<<<<<<<<<<
|
|
3140
|
+
* # When vectors are perpendicular (i.e. dot product is 0), the above expression may
|
|
3141
|
+
* # yield slightly different results when running in pure Python vs C/Cython,
|
|
3142
|
+
*/
|
|
3143
|
+
__pyx_t_1 = __Pyx_CREAL(__Pyx_c_prod_double(__pyx_v_v1, __Pyx_c_conj_double(__pyx_v_v2)));
|
|
3144
|
+
__pyx_v_result = __pyx_t_1;
|
|
3145
|
+
|
|
3146
|
+
/* "fontTools/cu2qu/cu2qu.py":58
|
|
3147
|
+
* # implementation. Because we are using the result in a denominator and catching
|
|
3148
|
+
* # ZeroDivisionError (see `calc_intersect`), it's best to normalize the result here.
|
|
3149
|
+
* if abs(result) < 1e-15: # <<<<<<<<<<<<<<
|
|
3150
|
+
* result = 0.0
|
|
3151
|
+
* return result
|
|
3152
|
+
*/
|
|
3153
|
+
__pyx_t_1 = fabs(__pyx_v_result);
|
|
3154
|
+
__pyx_t_2 = (__pyx_t_1 < 1e-15);
|
|
3155
|
+
if (__pyx_t_2) {
|
|
3156
|
+
|
|
3157
|
+
/* "fontTools/cu2qu/cu2qu.py":59
|
|
3158
|
+
* # ZeroDivisionError (see `calc_intersect`), it's best to normalize the result here.
|
|
3159
|
+
* if abs(result) < 1e-15:
|
|
3160
|
+
* result = 0.0 # <<<<<<<<<<<<<<
|
|
3161
|
+
* return result
|
|
3162
|
+
*
|
|
3163
|
+
*/
|
|
3164
|
+
__pyx_v_result = 0.0;
|
|
3165
|
+
|
|
3166
|
+
/* "fontTools/cu2qu/cu2qu.py":58
|
|
3167
|
+
* # implementation. Because we are using the result in a denominator and catching
|
|
3168
|
+
* # ZeroDivisionError (see `calc_intersect`), it's best to normalize the result here.
|
|
3169
|
+
* if abs(result) < 1e-15: # <<<<<<<<<<<<<<
|
|
3170
|
+
* result = 0.0
|
|
3171
|
+
* return result
|
|
3172
|
+
*/
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
/* "fontTools/cu2qu/cu2qu.py":60
|
|
3176
|
+
* if abs(result) < 1e-15:
|
|
3177
|
+
* result = 0.0
|
|
3178
|
+
* return result # <<<<<<<<<<<<<<
|
|
3134
3179
|
*
|
|
3135
3180
|
*
|
|
3136
3181
|
*/
|
|
3137
|
-
__pyx_r =
|
|
3182
|
+
__pyx_r = __pyx_v_result;
|
|
3138
3183
|
goto __pyx_L0;
|
|
3139
3184
|
|
|
3140
3185
|
/* "fontTools/cu2qu/cu2qu.py":37
|
|
@@ -3150,7 +3195,7 @@ static CYTHON_INLINE double __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_t_double_
|
|
|
3150
3195
|
return __pyx_r;
|
|
3151
3196
|
}
|
|
3152
3197
|
|
|
3153
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3198
|
+
/* "fontTools/cu2qu/cu2qu.py":63
|
|
3154
3199
|
*
|
|
3155
3200
|
*
|
|
3156
3201
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3177,7 +3222,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3177
3222
|
int __pyx_clineno = 0;
|
|
3178
3223
|
__Pyx_RefNannySetupContext("calc_cubic_points", 0);
|
|
3179
3224
|
|
|
3180
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3225
|
+
/* "fontTools/cu2qu/cu2qu.py":70
|
|
3181
3226
|
* )
|
|
3182
3227
|
* def calc_cubic_points(a, b, c, d):
|
|
3183
3228
|
* _1 = d # <<<<<<<<<<<<<<
|
|
@@ -3186,7 +3231,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3186
3231
|
*/
|
|
3187
3232
|
__pyx_v__1 = __pyx_v_d;
|
|
3188
3233
|
|
|
3189
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3234
|
+
/* "fontTools/cu2qu/cu2qu.py":71
|
|
3190
3235
|
* def calc_cubic_points(a, b, c, d):
|
|
3191
3236
|
* _1 = d
|
|
3192
3237
|
* _2 = (c / 3.0) + d # <<<<<<<<<<<<<<
|
|
@@ -3196,11 +3241,11 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3196
3241
|
__pyx_t_1 = __pyx_t_double_complex_from_parts(3.0, 0);
|
|
3197
3242
|
if (unlikely(__Pyx_c_is_zero_double(__pyx_t_1))) {
|
|
3198
3243
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
3199
|
-
__PYX_ERR(0,
|
|
3244
|
+
__PYX_ERR(0, 71, __pyx_L1_error)
|
|
3200
3245
|
}
|
|
3201
3246
|
__pyx_v__2 = __Pyx_c_sum_double(__Pyx_c_quot_double(__pyx_v_c, __pyx_t_1), __pyx_v_d);
|
|
3202
3247
|
|
|
3203
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3248
|
+
/* "fontTools/cu2qu/cu2qu.py":72
|
|
3204
3249
|
* _1 = d
|
|
3205
3250
|
* _2 = (c / 3.0) + d
|
|
3206
3251
|
* _3 = (b + c) / 3.0 + _2 # <<<<<<<<<<<<<<
|
|
@@ -3211,11 +3256,11 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3211
3256
|
__pyx_t_2 = __pyx_t_double_complex_from_parts(3.0, 0);
|
|
3212
3257
|
if (unlikely(__Pyx_c_is_zero_double(__pyx_t_2))) {
|
|
3213
3258
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
3214
|
-
__PYX_ERR(0,
|
|
3259
|
+
__PYX_ERR(0, 72, __pyx_L1_error)
|
|
3215
3260
|
}
|
|
3216
3261
|
__pyx_v__3 = __Pyx_c_sum_double(__Pyx_c_quot_double(__pyx_t_1, __pyx_t_2), __pyx_v__2);
|
|
3217
3262
|
|
|
3218
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3263
|
+
/* "fontTools/cu2qu/cu2qu.py":73
|
|
3219
3264
|
* _2 = (c / 3.0) + d
|
|
3220
3265
|
* _3 = (b + c) / 3.0 + _2
|
|
3221
3266
|
* _4 = a + d + c + b # <<<<<<<<<<<<<<
|
|
@@ -3224,7 +3269,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3224
3269
|
*/
|
|
3225
3270
|
__pyx_v__4 = __Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_a, __pyx_v_d), __pyx_v_c), __pyx_v_b);
|
|
3226
3271
|
|
|
3227
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3272
|
+
/* "fontTools/cu2qu/cu2qu.py":74
|
|
3228
3273
|
* _3 = (b + c) / 3.0 + _2
|
|
3229
3274
|
* _4 = a + d + c + b
|
|
3230
3275
|
* return _1, _2, _3, _4 # <<<<<<<<<<<<<<
|
|
@@ -3232,24 +3277,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3232
3277
|
*
|
|
3233
3278
|
*/
|
|
3234
3279
|
__Pyx_XDECREF(__pyx_r);
|
|
3235
|
-
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v__1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3280
|
+
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v__1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 74, __pyx_L1_error)
|
|
3236
3281
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3237
|
-
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_v__2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3282
|
+
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_v__2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
|
|
3238
3283
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3239
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v__3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
3284
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v__3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error)
|
|
3240
3285
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3241
|
-
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_v__4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
3286
|
+
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_v__4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 74, __pyx_L1_error)
|
|
3242
3287
|
__Pyx_GOTREF(__pyx_t_6);
|
|
3243
|
-
__pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
3288
|
+
__pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 74, __pyx_L1_error)
|
|
3244
3289
|
__Pyx_GOTREF(__pyx_t_7);
|
|
3245
3290
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
3246
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3) != (0)) __PYX_ERR(0,
|
|
3291
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 74, __pyx_L1_error);
|
|
3247
3292
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
3248
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0,
|
|
3293
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 74, __pyx_L1_error);
|
|
3249
3294
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
3250
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
3295
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 74, __pyx_L1_error);
|
|
3251
3296
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
3252
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
3297
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_6) != (0)) __PYX_ERR(0, 74, __pyx_L1_error);
|
|
3253
3298
|
__pyx_t_3 = 0;
|
|
3254
3299
|
__pyx_t_4 = 0;
|
|
3255
3300
|
__pyx_t_5 = 0;
|
|
@@ -3258,7 +3303,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3258
3303
|
__pyx_t_7 = 0;
|
|
3259
3304
|
goto __pyx_L0;
|
|
3260
3305
|
|
|
3261
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3306
|
+
/* "fontTools/cu2qu/cu2qu.py":63
|
|
3262
3307
|
*
|
|
3263
3308
|
*
|
|
3264
3309
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3281,7 +3326,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3281
3326
|
return __pyx_r;
|
|
3282
3327
|
}
|
|
3283
3328
|
|
|
3284
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3329
|
+
/* "fontTools/cu2qu/cu2qu.py":77
|
|
3285
3330
|
*
|
|
3286
3331
|
*
|
|
3287
3332
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3306,7 +3351,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3306
3351
|
int __pyx_clineno = 0;
|
|
3307
3352
|
__Pyx_RefNannySetupContext("calc_cubic_parameters", 0);
|
|
3308
3353
|
|
|
3309
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3354
|
+
/* "fontTools/cu2qu/cu2qu.py":84
|
|
3310
3355
|
* @cython.locals(a=cython.complex, b=cython.complex, c=cython.complex, d=cython.complex)
|
|
3311
3356
|
* def calc_cubic_parameters(p0, p1, p2, p3):
|
|
3312
3357
|
* c = (p1 - p0) * 3.0 # <<<<<<<<<<<<<<
|
|
@@ -3315,7 +3360,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3315
3360
|
*/
|
|
3316
3361
|
__pyx_v_c = __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_p1, __pyx_v_p0), __pyx_t_double_complex_from_parts(3.0, 0));
|
|
3317
3362
|
|
|
3318
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3363
|
+
/* "fontTools/cu2qu/cu2qu.py":85
|
|
3319
3364
|
* def calc_cubic_parameters(p0, p1, p2, p3):
|
|
3320
3365
|
* c = (p1 - p0) * 3.0
|
|
3321
3366
|
* b = (p2 - p1) * 3.0 - c # <<<<<<<<<<<<<<
|
|
@@ -3324,7 +3369,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3324
3369
|
*/
|
|
3325
3370
|
__pyx_v_b = __Pyx_c_diff_double(__Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_p2, __pyx_v_p1), __pyx_t_double_complex_from_parts(3.0, 0)), __pyx_v_c);
|
|
3326
3371
|
|
|
3327
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3372
|
+
/* "fontTools/cu2qu/cu2qu.py":86
|
|
3328
3373
|
* c = (p1 - p0) * 3.0
|
|
3329
3374
|
* b = (p2 - p1) * 3.0 - c
|
|
3330
3375
|
* d = p0 # <<<<<<<<<<<<<<
|
|
@@ -3333,7 +3378,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3333
3378
|
*/
|
|
3334
3379
|
__pyx_v_d = __pyx_v_p0;
|
|
3335
3380
|
|
|
3336
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3381
|
+
/* "fontTools/cu2qu/cu2qu.py":87
|
|
3337
3382
|
* b = (p2 - p1) * 3.0 - c
|
|
3338
3383
|
* d = p0
|
|
3339
3384
|
* a = p3 - d - c - b # <<<<<<<<<<<<<<
|
|
@@ -3342,7 +3387,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3342
3387
|
*/
|
|
3343
3388
|
__pyx_v_a = __Pyx_c_diff_double(__Pyx_c_diff_double(__Pyx_c_diff_double(__pyx_v_p3, __pyx_v_d), __pyx_v_c), __pyx_v_b);
|
|
3344
3389
|
|
|
3345
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3390
|
+
/* "fontTools/cu2qu/cu2qu.py":88
|
|
3346
3391
|
* d = p0
|
|
3347
3392
|
* a = p3 - d - c - b
|
|
3348
3393
|
* return a, b, c, d # <<<<<<<<<<<<<<
|
|
@@ -3350,24 +3395,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3350
3395
|
*
|
|
3351
3396
|
*/
|
|
3352
3397
|
__Pyx_XDECREF(__pyx_r);
|
|
3353
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
3398
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
3354
3399
|
__Pyx_GOTREF(__pyx_t_1);
|
|
3355
|
-
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3400
|
+
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
3356
3401
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3357
|
-
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3402
|
+
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
3358
3403
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3359
|
-
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3404
|
+
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
3360
3405
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3361
|
-
__pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
3406
|
+
__pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
3362
3407
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3363
3408
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
3364
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
3409
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
|
|
3365
3410
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
3366
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(0,
|
|
3411
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
|
|
3367
3412
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
3368
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(0,
|
|
3413
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
|
|
3369
3414
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
3370
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(0,
|
|
3415
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 88, __pyx_L1_error);
|
|
3371
3416
|
__pyx_t_1 = 0;
|
|
3372
3417
|
__pyx_t_2 = 0;
|
|
3373
3418
|
__pyx_t_3 = 0;
|
|
@@ -3376,7 +3421,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3376
3421
|
__pyx_t_5 = 0;
|
|
3377
3422
|
goto __pyx_L0;
|
|
3378
3423
|
|
|
3379
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3424
|
+
/* "fontTools/cu2qu/cu2qu.py":77
|
|
3380
3425
|
*
|
|
3381
3426
|
*
|
|
3382
3427
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3399,7 +3444,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3399
3444
|
return __pyx_r;
|
|
3400
3445
|
}
|
|
3401
3446
|
|
|
3402
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3447
|
+
/* "fontTools/cu2qu/cu2qu.py":91
|
|
3403
3448
|
*
|
|
3404
3449
|
*
|
|
3405
3450
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3431,17 +3476,17 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3431
3476
|
int __pyx_clineno = 0;
|
|
3432
3477
|
__Pyx_RefNannySetupContext("split_cubic_into_n_iter", 0);
|
|
3433
3478
|
|
|
3434
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3479
|
+
/* "fontTools/cu2qu/cu2qu.py":113
|
|
3435
3480
|
* """
|
|
3436
3481
|
* # Hand-coded special-cases
|
|
3437
3482
|
* if n == 2: # <<<<<<<<<<<<<<
|
|
3438
3483
|
* return iter(split_cubic_into_two(p0, p1, p2, p3))
|
|
3439
3484
|
* if n == 3:
|
|
3440
3485
|
*/
|
|
3441
|
-
__pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_2, 2, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
3486
|
+
__pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_2, 2, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 113, __pyx_L1_error)
|
|
3442
3487
|
if (__pyx_t_1) {
|
|
3443
3488
|
|
|
3444
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3489
|
+
/* "fontTools/cu2qu/cu2qu.py":114
|
|
3445
3490
|
* # Hand-coded special-cases
|
|
3446
3491
|
* if n == 2:
|
|
3447
3492
|
* return iter(split_cubic_into_two(p0, p1, p2, p3)) # <<<<<<<<<<<<<<
|
|
@@ -3449,16 +3494,16 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3449
3494
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3450
3495
|
*/
|
|
3451
3496
|
__Pyx_XDECREF(__pyx_r);
|
|
3452
|
-
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3497
|
+
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
|
|
3453
3498
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3454
|
-
__pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3499
|
+
__pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
|
|
3455
3500
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3456
3501
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3457
3502
|
__pyx_r = __pyx_t_3;
|
|
3458
3503
|
__pyx_t_3 = 0;
|
|
3459
3504
|
goto __pyx_L0;
|
|
3460
3505
|
|
|
3461
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3506
|
+
/* "fontTools/cu2qu/cu2qu.py":113
|
|
3462
3507
|
* """
|
|
3463
3508
|
* # Hand-coded special-cases
|
|
3464
3509
|
* if n == 2: # <<<<<<<<<<<<<<
|
|
@@ -3467,17 +3512,17 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3467
3512
|
*/
|
|
3468
3513
|
}
|
|
3469
3514
|
|
|
3470
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3515
|
+
/* "fontTools/cu2qu/cu2qu.py":115
|
|
3471
3516
|
* if n == 2:
|
|
3472
3517
|
* return iter(split_cubic_into_two(p0, p1, p2, p3))
|
|
3473
3518
|
* if n == 3: # <<<<<<<<<<<<<<
|
|
3474
3519
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3475
3520
|
* if n == 4:
|
|
3476
3521
|
*/
|
|
3477
|
-
__pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_3, 3, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
3522
|
+
__pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_3, 3, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 115, __pyx_L1_error)
|
|
3478
3523
|
if (__pyx_t_1) {
|
|
3479
3524
|
|
|
3480
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3525
|
+
/* "fontTools/cu2qu/cu2qu.py":116
|
|
3481
3526
|
* return iter(split_cubic_into_two(p0, p1, p2, p3))
|
|
3482
3527
|
* if n == 3:
|
|
3483
3528
|
* return iter(split_cubic_into_three(p0, p1, p2, p3)) # <<<<<<<<<<<<<<
|
|
@@ -3485,16 +3530,16 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3485
3530
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3486
3531
|
*/
|
|
3487
3532
|
__Pyx_XDECREF(__pyx_r);
|
|
3488
|
-
__pyx_t_3 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3533
|
+
__pyx_t_3 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error)
|
|
3489
3534
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3490
|
-
__pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3535
|
+
__pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
|
|
3491
3536
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3492
3537
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3493
3538
|
__pyx_r = __pyx_t_2;
|
|
3494
3539
|
__pyx_t_2 = 0;
|
|
3495
3540
|
goto __pyx_L0;
|
|
3496
3541
|
|
|
3497
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3542
|
+
/* "fontTools/cu2qu/cu2qu.py":115
|
|
3498
3543
|
* if n == 2:
|
|
3499
3544
|
* return iter(split_cubic_into_two(p0, p1, p2, p3))
|
|
3500
3545
|
* if n == 3: # <<<<<<<<<<<<<<
|
|
@@ -3503,24 +3548,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3503
3548
|
*/
|
|
3504
3549
|
}
|
|
3505
3550
|
|
|
3506
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3551
|
+
/* "fontTools/cu2qu/cu2qu.py":117
|
|
3507
3552
|
* if n == 3:
|
|
3508
3553
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3509
3554
|
* if n == 4: # <<<<<<<<<<<<<<
|
|
3510
3555
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3511
3556
|
* return iter(
|
|
3512
3557
|
*/
|
|
3513
|
-
__pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_4, 4, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
3558
|
+
__pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_4, 4, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 117, __pyx_L1_error)
|
|
3514
3559
|
if (__pyx_t_1) {
|
|
3515
3560
|
|
|
3516
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3561
|
+
/* "fontTools/cu2qu/cu2qu.py":118
|
|
3517
3562
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3518
3563
|
* if n == 4:
|
|
3519
3564
|
* a, b = split_cubic_into_two(p0, p1, p2, p3) # <<<<<<<<<<<<<<
|
|
3520
3565
|
* return iter(
|
|
3521
3566
|
* split_cubic_into_two(a[0], a[1], a[2], a[3])
|
|
3522
3567
|
*/
|
|
3523
|
-
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3568
|
+
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3524
3569
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3525
3570
|
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
|
|
3526
3571
|
PyObject* sequence = __pyx_t_2;
|
|
@@ -3528,7 +3573,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3528
3573
|
if (unlikely(size != 2)) {
|
|
3529
3574
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
|
3530
3575
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
3531
|
-
__PYX_ERR(0,
|
|
3576
|
+
__PYX_ERR(0, 118, __pyx_L1_error)
|
|
3532
3577
|
}
|
|
3533
3578
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
3534
3579
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
@@ -3538,22 +3583,22 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3538
3583
|
__Pyx_INCREF(__pyx_t_4);
|
|
3539
3584
|
} else {
|
|
3540
3585
|
__pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0);
|
|
3541
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3586
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3542
3587
|
__Pyx_XGOTREF(__pyx_t_3);
|
|
3543
3588
|
__pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 1);
|
|
3544
|
-
if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3589
|
+
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3545
3590
|
__Pyx_XGOTREF(__pyx_t_4);
|
|
3546
3591
|
}
|
|
3547
3592
|
#else
|
|
3548
|
-
__pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3593
|
+
__pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3549
3594
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3550
|
-
__pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3595
|
+
__pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3551
3596
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3552
3597
|
#endif
|
|
3553
3598
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3554
3599
|
} else {
|
|
3555
3600
|
Py_ssize_t index = -1;
|
|
3556
|
-
__pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
3601
|
+
__pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3557
3602
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3558
3603
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3559
3604
|
__pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
|
|
@@ -3561,7 +3606,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3561
3606
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3562
3607
|
index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
|
|
3563
3608
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3564
|
-
if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0,
|
|
3609
|
+
if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
|
|
3565
3610
|
__pyx_t_6 = NULL;
|
|
3566
3611
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
3567
3612
|
goto __pyx_L7_unpacking_done;
|
|
@@ -3569,7 +3614,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3569
3614
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
3570
3615
|
__pyx_t_6 = NULL;
|
|
3571
3616
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
3572
|
-
__PYX_ERR(0,
|
|
3617
|
+
__PYX_ERR(0, 118, __pyx_L1_error)
|
|
3573
3618
|
__pyx_L7_unpacking_done:;
|
|
3574
3619
|
}
|
|
3575
3620
|
__pyx_v_a = __pyx_t_3;
|
|
@@ -3577,7 +3622,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3577
3622
|
__pyx_v_b = __pyx_t_4;
|
|
3578
3623
|
__pyx_t_4 = 0;
|
|
3579
3624
|
|
|
3580
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3625
|
+
/* "fontTools/cu2qu/cu2qu.py":119
|
|
3581
3626
|
* if n == 4:
|
|
3582
3627
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3583
3628
|
* return iter( # <<<<<<<<<<<<<<
|
|
@@ -3586,77 +3631,77 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3586
3631
|
*/
|
|
3587
3632
|
__Pyx_XDECREF(__pyx_r);
|
|
3588
3633
|
|
|
3589
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3634
|
+
/* "fontTools/cu2qu/cu2qu.py":120
|
|
3590
3635
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3591
3636
|
* return iter(
|
|
3592
3637
|
* split_cubic_into_two(a[0], a[1], a[2], a[3]) # <<<<<<<<<<<<<<
|
|
3593
3638
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3])
|
|
3594
3639
|
* )
|
|
3595
3640
|
*/
|
|
3596
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3641
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
|
|
3597
3642
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3598
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3643
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error)
|
|
3599
3644
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3600
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3645
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
|
|
3601
3646
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3602
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3647
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error)
|
|
3603
3648
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3604
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3649
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
|
|
3605
3650
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3606
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3651
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error)
|
|
3607
3652
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3608
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3653
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
|
|
3609
3654
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3610
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3655
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error)
|
|
3611
3656
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3612
|
-
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3657
|
+
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
|
|
3613
3658
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3614
3659
|
|
|
3615
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3660
|
+
/* "fontTools/cu2qu/cu2qu.py":121
|
|
3616
3661
|
* return iter(
|
|
3617
3662
|
* split_cubic_into_two(a[0], a[1], a[2], a[3])
|
|
3618
3663
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3]) # <<<<<<<<<<<<<<
|
|
3619
3664
|
* )
|
|
3620
3665
|
* if n == 6:
|
|
3621
3666
|
*/
|
|
3622
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3667
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3623
3668
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3624
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3669
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3625
3670
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3626
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3671
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3627
3672
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3628
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3673
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3629
3674
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3630
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3675
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3631
3676
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3632
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3677
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3633
3678
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3634
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3679
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3635
3680
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3636
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3681
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3637
3682
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3638
|
-
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3683
|
+
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3639
3684
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3640
|
-
__pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3685
|
+
__pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
|
|
3641
3686
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3642
3687
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3643
3688
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3644
3689
|
|
|
3645
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3690
|
+
/* "fontTools/cu2qu/cu2qu.py":119
|
|
3646
3691
|
* if n == 4:
|
|
3647
3692
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3648
3693
|
* return iter( # <<<<<<<<<<<<<<
|
|
3649
3694
|
* split_cubic_into_two(a[0], a[1], a[2], a[3])
|
|
3650
3695
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3])
|
|
3651
3696
|
*/
|
|
3652
|
-
__pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3697
|
+
__pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error)
|
|
3653
3698
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3654
3699
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3655
3700
|
__pyx_r = __pyx_t_4;
|
|
3656
3701
|
__pyx_t_4 = 0;
|
|
3657
3702
|
goto __pyx_L0;
|
|
3658
3703
|
|
|
3659
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3704
|
+
/* "fontTools/cu2qu/cu2qu.py":117
|
|
3660
3705
|
* if n == 3:
|
|
3661
3706
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3662
3707
|
* if n == 4: # <<<<<<<<<<<<<<
|
|
@@ -3665,24 +3710,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3665
3710
|
*/
|
|
3666
3711
|
}
|
|
3667
3712
|
|
|
3668
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3713
|
+
/* "fontTools/cu2qu/cu2qu.py":123
|
|
3669
3714
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3])
|
|
3670
3715
|
* )
|
|
3671
3716
|
* if n == 6: # <<<<<<<<<<<<<<
|
|
3672
3717
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3673
3718
|
* return iter(
|
|
3674
3719
|
*/
|
|
3675
|
-
__pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_6, 6, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0,
|
|
3720
|
+
__pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_6, 6, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 123, __pyx_L1_error)
|
|
3676
3721
|
if (__pyx_t_1) {
|
|
3677
3722
|
|
|
3678
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3723
|
+
/* "fontTools/cu2qu/cu2qu.py":124
|
|
3679
3724
|
* )
|
|
3680
3725
|
* if n == 6:
|
|
3681
3726
|
* a, b = split_cubic_into_two(p0, p1, p2, p3) # <<<<<<<<<<<<<<
|
|
3682
3727
|
* return iter(
|
|
3683
3728
|
* split_cubic_into_three(a[0], a[1], a[2], a[3])
|
|
3684
3729
|
*/
|
|
3685
|
-
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3730
|
+
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_two(__pyx_v_p0, __pyx_v_p1, __pyx_v_p2, __pyx_v_p3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error)
|
|
3686
3731
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3687
3732
|
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
|
|
3688
3733
|
PyObject* sequence = __pyx_t_4;
|
|
@@ -3690,7 +3735,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3690
3735
|
if (unlikely(size != 2)) {
|
|
3691
3736
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
|
3692
3737
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
3693
|
-
__PYX_ERR(0,
|
|
3738
|
+
__PYX_ERR(0, 124, __pyx_L1_error)
|
|
3694
3739
|
}
|
|
3695
3740
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
3696
3741
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
@@ -3700,22 +3745,22 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3700
3745
|
__Pyx_INCREF(__pyx_t_2);
|
|
3701
3746
|
} else {
|
|
3702
3747
|
__pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0);
|
|
3703
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3748
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
|
|
3704
3749
|
__Pyx_XGOTREF(__pyx_t_3);
|
|
3705
3750
|
__pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1);
|
|
3706
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3751
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
|
|
3707
3752
|
__Pyx_XGOTREF(__pyx_t_2);
|
|
3708
3753
|
}
|
|
3709
3754
|
#else
|
|
3710
|
-
__pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3755
|
+
__pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
|
|
3711
3756
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3712
|
-
__pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3757
|
+
__pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error)
|
|
3713
3758
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3714
3759
|
#endif
|
|
3715
3760
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3716
3761
|
} else {
|
|
3717
3762
|
Py_ssize_t index = -1;
|
|
3718
|
-
__pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
3763
|
+
__pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error)
|
|
3719
3764
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3720
3765
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3721
3766
|
__pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
|
|
@@ -3723,7 +3768,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3723
3768
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3724
3769
|
index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L9_unpacking_failed;
|
|
3725
3770
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3726
|
-
if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0,
|
|
3771
|
+
if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 124, __pyx_L1_error)
|
|
3727
3772
|
__pyx_t_6 = NULL;
|
|
3728
3773
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
3729
3774
|
goto __pyx_L10_unpacking_done;
|
|
@@ -3731,7 +3776,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3731
3776
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
3732
3777
|
__pyx_t_6 = NULL;
|
|
3733
3778
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
3734
|
-
__PYX_ERR(0,
|
|
3779
|
+
__PYX_ERR(0, 124, __pyx_L1_error)
|
|
3735
3780
|
__pyx_L10_unpacking_done:;
|
|
3736
3781
|
}
|
|
3737
3782
|
__pyx_v_a = __pyx_t_3;
|
|
@@ -3739,7 +3784,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3739
3784
|
__pyx_v_b = __pyx_t_2;
|
|
3740
3785
|
__pyx_t_2 = 0;
|
|
3741
3786
|
|
|
3742
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3787
|
+
/* "fontTools/cu2qu/cu2qu.py":125
|
|
3743
3788
|
* if n == 6:
|
|
3744
3789
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3745
3790
|
* return iter( # <<<<<<<<<<<<<<
|
|
@@ -3748,77 +3793,77 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3748
3793
|
*/
|
|
3749
3794
|
__Pyx_XDECREF(__pyx_r);
|
|
3750
3795
|
|
|
3751
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3796
|
+
/* "fontTools/cu2qu/cu2qu.py":126
|
|
3752
3797
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3753
3798
|
* return iter(
|
|
3754
3799
|
* split_cubic_into_three(a[0], a[1], a[2], a[3]) # <<<<<<<<<<<<<<
|
|
3755
3800
|
* + split_cubic_into_three(b[0], b[1], b[2], b[3])
|
|
3756
3801
|
* )
|
|
3757
3802
|
*/
|
|
3758
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3803
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
3759
3804
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3760
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3805
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
3761
3806
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3762
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3807
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
3763
3808
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3764
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3809
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
3765
3810
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3766
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3811
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
3767
3812
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3768
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3813
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
3769
3814
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3770
|
-
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3815
|
+
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
3771
3816
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3772
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3817
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
3773
3818
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3774
|
-
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3819
|
+
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
|
|
3775
3820
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3776
3821
|
|
|
3777
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3822
|
+
/* "fontTools/cu2qu/cu2qu.py":127
|
|
3778
3823
|
* return iter(
|
|
3779
3824
|
* split_cubic_into_three(a[0], a[1], a[2], a[3])
|
|
3780
3825
|
* + split_cubic_into_three(b[0], b[1], b[2], b[3]) # <<<<<<<<<<<<<<
|
|
3781
3826
|
* )
|
|
3782
3827
|
*
|
|
3783
3828
|
*/
|
|
3784
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3829
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3785
3830
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3786
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3831
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3787
3832
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3788
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3833
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3789
3834
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3790
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3835
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3791
3836
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3792
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3837
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3793
3838
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3794
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3839
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3795
3840
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3796
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3841
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_b, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3797
3842
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3798
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3843
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3799
3844
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3800
|
-
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3845
|
+
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_three(__pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3801
3846
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3802
|
-
__pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3847
|
+
__pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
|
|
3803
3848
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3804
3849
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3805
3850
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3806
3851
|
|
|
3807
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3852
|
+
/* "fontTools/cu2qu/cu2qu.py":125
|
|
3808
3853
|
* if n == 6:
|
|
3809
3854
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3810
3855
|
* return iter( # <<<<<<<<<<<<<<
|
|
3811
3856
|
* split_cubic_into_three(a[0], a[1], a[2], a[3])
|
|
3812
3857
|
* + split_cubic_into_three(b[0], b[1], b[2], b[3])
|
|
3813
3858
|
*/
|
|
3814
|
-
__pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3859
|
+
__pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
|
|
3815
3860
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3816
3861
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3817
3862
|
__pyx_r = __pyx_t_2;
|
|
3818
3863
|
__pyx_t_2 = 0;
|
|
3819
3864
|
goto __pyx_L0;
|
|
3820
3865
|
|
|
3821
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3866
|
+
/* "fontTools/cu2qu/cu2qu.py":123
|
|
3822
3867
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3])
|
|
3823
3868
|
* )
|
|
3824
3869
|
* if n == 6: # <<<<<<<<<<<<<<
|
|
@@ -3827,7 +3872,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3827
3872
|
*/
|
|
3828
3873
|
}
|
|
3829
3874
|
|
|
3830
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3875
|
+
/* "fontTools/cu2qu/cu2qu.py":130
|
|
3831
3876
|
* )
|
|
3832
3877
|
*
|
|
3833
3878
|
* return _split_cubic_into_n_gen(p0, p1, p2, p3, n) # <<<<<<<<<<<<<<
|
|
@@ -3836,15 +3881,15 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3836
3881
|
*/
|
|
3837
3882
|
__Pyx_XDECREF(__pyx_r);
|
|
3838
3883
|
__pyx_t_3 = NULL;
|
|
3839
|
-
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3884
|
+
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
|
|
3840
3885
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3841
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
3886
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
|
|
3842
3887
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3843
|
-
__pyx_t_11 = __pyx_PyComplex_FromComplex(__pyx_v_p1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0,
|
|
3888
|
+
__pyx_t_11 = __pyx_PyComplex_FromComplex(__pyx_v_p1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 130, __pyx_L1_error)
|
|
3844
3889
|
__Pyx_GOTREF(__pyx_t_11);
|
|
3845
|
-
__pyx_t_12 = __pyx_PyComplex_FromComplex(__pyx_v_p2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0,
|
|
3890
|
+
__pyx_t_12 = __pyx_PyComplex_FromComplex(__pyx_v_p2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 130, __pyx_L1_error)
|
|
3846
3891
|
__Pyx_GOTREF(__pyx_t_12);
|
|
3847
|
-
__pyx_t_13 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0,
|
|
3892
|
+
__pyx_t_13 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 130, __pyx_L1_error)
|
|
3848
3893
|
__Pyx_GOTREF(__pyx_t_13);
|
|
3849
3894
|
__pyx_t_14 = 1;
|
|
3850
3895
|
#if CYTHON_UNPACK_METHODS
|
|
@@ -3867,14 +3912,14 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3867
3912
|
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
3868
3913
|
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
|
|
3869
3914
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3870
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3915
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
|
|
3871
3916
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3872
3917
|
}
|
|
3873
3918
|
__pyx_r = __pyx_t_2;
|
|
3874
3919
|
__pyx_t_2 = 0;
|
|
3875
3920
|
goto __pyx_L0;
|
|
3876
3921
|
|
|
3877
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3922
|
+
/* "fontTools/cu2qu/cu2qu.py":91
|
|
3878
3923
|
*
|
|
3879
3924
|
*
|
|
3880
3925
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3902,7 +3947,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3902
3947
|
}
|
|
3903
3948
|
static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
|
|
3904
3949
|
|
|
3905
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3950
|
+
/* "fontTools/cu2qu/cu2qu.py":133
|
|
3906
3951
|
*
|
|
3907
3952
|
*
|
|
3908
3953
|
* @cython.locals( # <<<<<<<<<<<<<<
|
|
@@ -3954,60 +3999,60 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
3954
3999
|
{
|
|
3955
4000
|
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_p0,&__pyx_mstate_global->__pyx_n_u_p1,&__pyx_mstate_global->__pyx_n_u_p2,&__pyx_mstate_global->__pyx_n_u_p3,&__pyx_mstate_global->__pyx_n_u_n,0};
|
|
3956
4001
|
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
|
|
3957
|
-
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0,
|
|
4002
|
+
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3958
4003
|
if (__pyx_kwds_len > 0) {
|
|
3959
4004
|
switch (__pyx_nargs) {
|
|
3960
4005
|
case 5:
|
|
3961
4006
|
values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
|
|
3962
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0,
|
|
4007
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3963
4008
|
CYTHON_FALLTHROUGH;
|
|
3964
4009
|
case 4:
|
|
3965
4010
|
values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
|
|
3966
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0,
|
|
4011
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3967
4012
|
CYTHON_FALLTHROUGH;
|
|
3968
4013
|
case 3:
|
|
3969
4014
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
3970
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
4015
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3971
4016
|
CYTHON_FALLTHROUGH;
|
|
3972
4017
|
case 2:
|
|
3973
4018
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
3974
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
4019
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3975
4020
|
CYTHON_FALLTHROUGH;
|
|
3976
4021
|
case 1:
|
|
3977
4022
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
3978
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
4023
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3979
4024
|
CYTHON_FALLTHROUGH;
|
|
3980
4025
|
case 0: break;
|
|
3981
4026
|
default: goto __pyx_L5_argtuple_error;
|
|
3982
4027
|
}
|
|
3983
4028
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
3984
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_split_cubic_into_n_gen", 0) < 0) __PYX_ERR(0,
|
|
4029
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_split_cubic_into_n_gen", 0) < 0) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3985
4030
|
for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
|
|
3986
|
-
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, i); __PYX_ERR(0,
|
|
4031
|
+
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, i); __PYX_ERR(0, 133, __pyx_L3_error) }
|
|
3987
4032
|
}
|
|
3988
4033
|
} else if (unlikely(__pyx_nargs != 5)) {
|
|
3989
4034
|
goto __pyx_L5_argtuple_error;
|
|
3990
4035
|
} else {
|
|
3991
4036
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
3992
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
4037
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3993
4038
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
3994
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
4039
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3995
4040
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
3996
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
4041
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3997
4042
|
values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
|
|
3998
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0,
|
|
4043
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
3999
4044
|
values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
|
|
4000
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0,
|
|
4045
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 133, __pyx_L3_error)
|
|
4001
4046
|
}
|
|
4002
|
-
__pyx_v_p0 = __Pyx_PyComplex_As___pyx_t_double_complex(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4003
|
-
__pyx_v_p1 = __Pyx_PyComplex_As___pyx_t_double_complex(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4004
|
-
__pyx_v_p2 = __Pyx_PyComplex_As___pyx_t_double_complex(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4005
|
-
__pyx_v_p3 = __Pyx_PyComplex_As___pyx_t_double_complex(values[3]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4006
|
-
__pyx_v_n = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
4047
|
+
__pyx_v_p0 = __Pyx_PyComplex_As___pyx_t_double_complex(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
|
|
4048
|
+
__pyx_v_p1 = __Pyx_PyComplex_As___pyx_t_double_complex(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
|
|
4049
|
+
__pyx_v_p2 = __Pyx_PyComplex_As___pyx_t_double_complex(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
|
|
4050
|
+
__pyx_v_p3 = __Pyx_PyComplex_As___pyx_t_double_complex(values[3]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
|
|
4051
|
+
__pyx_v_n = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
|
|
4007
4052
|
}
|
|
4008
4053
|
goto __pyx_L6_skip;
|
|
4009
4054
|
__pyx_L5_argtuple_error:;
|
|
4010
|
-
__Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, __pyx_nargs); __PYX_ERR(0,
|
|
4055
|
+
__Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 133, __pyx_L3_error)
|
|
4011
4056
|
__pyx_L6_skip:;
|
|
4012
4057
|
goto __pyx_L4_argument_unpacking_done;
|
|
4013
4058
|
__pyx_L3_error:;
|
|
@@ -4040,7 +4085,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu__split_cubic_into_n_gen(CYTHO
|
|
|
4040
4085
|
if (unlikely(!__pyx_cur_scope)) {
|
|
4041
4086
|
__pyx_cur_scope = ((struct __pyx_obj_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen *)Py_None);
|
|
4042
4087
|
__Pyx_INCREF(Py_None);
|
|
4043
|
-
__PYX_ERR(0,
|
|
4088
|
+
__PYX_ERR(0, 133, __pyx_L1_error)
|
|
4044
4089
|
} else {
|
|
4045
4090
|
__Pyx_GOTREF((PyObject *)__pyx_cur_scope);
|
|
4046
4091
|
}
|
|
@@ -4050,7 +4095,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu__split_cubic_into_n_gen(CYTHO
|
|
|
4050
4095
|
__pyx_cur_scope->__pyx_v_p3 = __pyx_v_p3;
|
|
4051
4096
|
__pyx_cur_scope->__pyx_v_n = __pyx_v_n;
|
|
4052
4097
|
{
|
|
4053
|
-
__pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu); if (unlikely(!gen)) __PYX_ERR(0,
|
|
4098
|
+
__pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu); if (unlikely(!gen)) __PYX_ERR(0, 133, __pyx_L1_error)
|
|
4054
4099
|
__Pyx_DECREF(__pyx_cur_scope);
|
|
4055
4100
|
__Pyx_RefNannyFinishContext();
|
|
4056
4101
|
return (PyObject *) gen;
|
|
@@ -4099,17 +4144,17 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4099
4144
|
__pyx_L3_first_run:;
|
|
4100
4145
|
if (unlikely(__pyx_sent_value != Py_None)) {
|
|
4101
4146
|
if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
|
|
4102
|
-
__PYX_ERR(0,
|
|
4147
|
+
__PYX_ERR(0, 133, __pyx_L1_error)
|
|
4103
4148
|
}
|
|
4104
4149
|
|
|
4105
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4150
|
+
/* "fontTools/cu2qu/cu2qu.py":148
|
|
4106
4151
|
* )
|
|
4107
4152
|
* def _split_cubic_into_n_gen(p0, p1, p2, p3, n):
|
|
4108
4153
|
* a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3) # <<<<<<<<<<<<<<
|
|
4109
4154
|
* dt = 1 / n
|
|
4110
4155
|
* delta_2 = dt * dt
|
|
4111
4156
|
*/
|
|
4112
|
-
__pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_parameters(__pyx_cur_scope->__pyx_v_p0, __pyx_cur_scope->__pyx_v_p1, __pyx_cur_scope->__pyx_v_p2, __pyx_cur_scope->__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4157
|
+
__pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_parameters(__pyx_cur_scope->__pyx_v_p0, __pyx_cur_scope->__pyx_v_p1, __pyx_cur_scope->__pyx_v_p2, __pyx_cur_scope->__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4113
4158
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4114
4159
|
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
|
|
4115
4160
|
PyObject* sequence = __pyx_t_1;
|
|
@@ -4117,7 +4162,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4117
4162
|
if (unlikely(size != 4)) {
|
|
4118
4163
|
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
|
|
4119
4164
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
4120
|
-
__PYX_ERR(0,
|
|
4165
|
+
__PYX_ERR(0, 148, __pyx_L1_error)
|
|
4121
4166
|
}
|
|
4122
4167
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
4123
4168
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
@@ -4131,16 +4176,16 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4131
4176
|
__Pyx_INCREF(__pyx_t_5);
|
|
4132
4177
|
} else {
|
|
4133
4178
|
__pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 0);
|
|
4134
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4179
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4135
4180
|
__Pyx_XGOTREF(__pyx_t_2);
|
|
4136
4181
|
__pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 1);
|
|
4137
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4182
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4138
4183
|
__Pyx_XGOTREF(__pyx_t_3);
|
|
4139
4184
|
__pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 2);
|
|
4140
|
-
if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
4185
|
+
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4141
4186
|
__Pyx_XGOTREF(__pyx_t_4);
|
|
4142
4187
|
__pyx_t_5 = __Pyx_PyList_GetItemRef(sequence, 3);
|
|
4143
|
-
if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4188
|
+
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4144
4189
|
__Pyx_XGOTREF(__pyx_t_5);
|
|
4145
4190
|
}
|
|
4146
4191
|
#else
|
|
@@ -4148,7 +4193,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4148
4193
|
Py_ssize_t i;
|
|
4149
4194
|
PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5};
|
|
4150
4195
|
for (i=0; i < 4; i++) {
|
|
4151
|
-
PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0,
|
|
4196
|
+
PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4152
4197
|
__Pyx_GOTREF(item);
|
|
4153
4198
|
*(temps[i]) = item;
|
|
4154
4199
|
}
|
|
@@ -4158,7 +4203,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4158
4203
|
} else {
|
|
4159
4204
|
Py_ssize_t index = -1;
|
|
4160
4205
|
PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5};
|
|
4161
|
-
__pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4206
|
+
__pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4162
4207
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4163
4208
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
4164
4209
|
__pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
|
|
@@ -4167,7 +4212,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4167
4212
|
__Pyx_GOTREF(item);
|
|
4168
4213
|
*(temps[index]) = item;
|
|
4169
4214
|
}
|
|
4170
|
-
if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) __PYX_ERR(0,
|
|
4215
|
+
if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4171
4216
|
__pyx_t_7 = NULL;
|
|
4172
4217
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4173
4218
|
goto __pyx_L5_unpacking_done;
|
|
@@ -4175,23 +4220,23 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4175
4220
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4176
4221
|
__pyx_t_7 = NULL;
|
|
4177
4222
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
4178
|
-
__PYX_ERR(0,
|
|
4223
|
+
__PYX_ERR(0, 148, __pyx_L1_error)
|
|
4179
4224
|
__pyx_L5_unpacking_done:;
|
|
4180
4225
|
}
|
|
4181
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4226
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4182
4227
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4183
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4228
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4184
4229
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4185
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4230
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4186
4231
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4187
|
-
__pyx_t_11 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4232
|
+
__pyx_t_11 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L1_error)
|
|
4188
4233
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
4189
4234
|
__pyx_cur_scope->__pyx_v_a = __pyx_t_8;
|
|
4190
4235
|
__pyx_cur_scope->__pyx_v_b = __pyx_t_9;
|
|
4191
4236
|
__pyx_cur_scope->__pyx_v_c = __pyx_t_10;
|
|
4192
4237
|
__pyx_cur_scope->__pyx_v_d = __pyx_t_11;
|
|
4193
4238
|
|
|
4194
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4239
|
+
/* "fontTools/cu2qu/cu2qu.py":149
|
|
4195
4240
|
* def _split_cubic_into_n_gen(p0, p1, p2, p3, n):
|
|
4196
4241
|
* a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3)
|
|
4197
4242
|
* dt = 1 / n # <<<<<<<<<<<<<<
|
|
@@ -4200,11 +4245,11 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4200
4245
|
*/
|
|
4201
4246
|
if (unlikely(__pyx_cur_scope->__pyx_v_n == 0)) {
|
|
4202
4247
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
4203
|
-
__PYX_ERR(0,
|
|
4248
|
+
__PYX_ERR(0, 149, __pyx_L1_error)
|
|
4204
4249
|
}
|
|
4205
4250
|
__pyx_cur_scope->__pyx_v_dt = (1.0 / ((double)__pyx_cur_scope->__pyx_v_n));
|
|
4206
4251
|
|
|
4207
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4252
|
+
/* "fontTools/cu2qu/cu2qu.py":150
|
|
4208
4253
|
* a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3)
|
|
4209
4254
|
* dt = 1 / n
|
|
4210
4255
|
* delta_2 = dt * dt # <<<<<<<<<<<<<<
|
|
@@ -4213,7 +4258,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4213
4258
|
*/
|
|
4214
4259
|
__pyx_cur_scope->__pyx_v_delta_2 = (__pyx_cur_scope->__pyx_v_dt * __pyx_cur_scope->__pyx_v_dt);
|
|
4215
4260
|
|
|
4216
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4261
|
+
/* "fontTools/cu2qu/cu2qu.py":151
|
|
4217
4262
|
* dt = 1 / n
|
|
4218
4263
|
* delta_2 = dt * dt
|
|
4219
4264
|
* delta_3 = dt * delta_2 # <<<<<<<<<<<<<<
|
|
@@ -4222,7 +4267,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4222
4267
|
*/
|
|
4223
4268
|
__pyx_cur_scope->__pyx_v_delta_3 = (__pyx_cur_scope->__pyx_v_dt * __pyx_cur_scope->__pyx_v_delta_2);
|
|
4224
4269
|
|
|
4225
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4270
|
+
/* "fontTools/cu2qu/cu2qu.py":152
|
|
4226
4271
|
* delta_2 = dt * dt
|
|
4227
4272
|
* delta_3 = dt * delta_2
|
|
4228
4273
|
* for i in range(n): # <<<<<<<<<<<<<<
|
|
@@ -4234,7 +4279,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4234
4279
|
for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
|
|
4235
4280
|
__pyx_cur_scope->__pyx_v_i = __pyx_t_14;
|
|
4236
4281
|
|
|
4237
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4282
|
+
/* "fontTools/cu2qu/cu2qu.py":153
|
|
4238
4283
|
* delta_3 = dt * delta_2
|
|
4239
4284
|
* for i in range(n):
|
|
4240
4285
|
* t1 = i * dt # <<<<<<<<<<<<<<
|
|
@@ -4243,7 +4288,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4243
4288
|
*/
|
|
4244
4289
|
__pyx_cur_scope->__pyx_v_t1 = (__pyx_cur_scope->__pyx_v_i * __pyx_cur_scope->__pyx_v_dt);
|
|
4245
4290
|
|
|
4246
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4291
|
+
/* "fontTools/cu2qu/cu2qu.py":154
|
|
4247
4292
|
* for i in range(n):
|
|
4248
4293
|
* t1 = i * dt
|
|
4249
4294
|
* t1_2 = t1 * t1 # <<<<<<<<<<<<<<
|
|
@@ -4252,7 +4297,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4252
4297
|
*/
|
|
4253
4298
|
__pyx_cur_scope->__pyx_v_t1_2 = (__pyx_cur_scope->__pyx_v_t1 * __pyx_cur_scope->__pyx_v_t1);
|
|
4254
4299
|
|
|
4255
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4300
|
+
/* "fontTools/cu2qu/cu2qu.py":156
|
|
4256
4301
|
* t1_2 = t1 * t1
|
|
4257
4302
|
* # calc new a, b, c and d
|
|
4258
4303
|
* a1 = a * delta_3 # <<<<<<<<<<<<<<
|
|
@@ -4261,7 +4306,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4261
4306
|
*/
|
|
4262
4307
|
__pyx_cur_scope->__pyx_v_a1 = __Pyx_c_prod_double(__pyx_cur_scope->__pyx_v_a, __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_delta_3, 0));
|
|
4263
4308
|
|
|
4264
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4309
|
+
/* "fontTools/cu2qu/cu2qu.py":157
|
|
4265
4310
|
* # calc new a, b, c and d
|
|
4266
4311
|
* a1 = a * delta_3
|
|
4267
4312
|
* b1 = (3 * a * t1 + b) * delta_2 # <<<<<<<<<<<<<<
|
|
@@ -4270,7 +4315,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4270
4315
|
*/
|
|
4271
4316
|
__pyx_cur_scope->__pyx_v_b1 = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_cur_scope->__pyx_v_a), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1, 0)), __pyx_cur_scope->__pyx_v_b), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_delta_2, 0));
|
|
4272
4317
|
|
|
4273
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4318
|
+
/* "fontTools/cu2qu/cu2qu.py":158
|
|
4274
4319
|
* a1 = a * delta_3
|
|
4275
4320
|
* b1 = (3 * a * t1 + b) * delta_2
|
|
4276
4321
|
* c1 = (2 * b * t1 + c + 3 * a * t1_2) * dt # <<<<<<<<<<<<<<
|
|
@@ -4279,7 +4324,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4279
4324
|
*/
|
|
4280
4325
|
__pyx_cur_scope->__pyx_v_c1 = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_cur_scope->__pyx_v_b), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1, 0)), __pyx_cur_scope->__pyx_v_c), __Pyx_c_prod_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_cur_scope->__pyx_v_a), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1_2, 0))), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_dt, 0));
|
|
4281
4326
|
|
|
4282
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4327
|
+
/* "fontTools/cu2qu/cu2qu.py":159
|
|
4283
4328
|
* b1 = (3 * a * t1 + b) * delta_2
|
|
4284
4329
|
* c1 = (2 * b * t1 + c + 3 * a * t1_2) * dt
|
|
4285
4330
|
* d1 = a * t1 * t1_2 + b * t1_2 + c * t1 + d # <<<<<<<<<<<<<<
|
|
@@ -4288,14 +4333,14 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4288
4333
|
*/
|
|
4289
4334
|
__pyx_cur_scope->__pyx_v_d1 = __Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__Pyx_c_prod_double(__pyx_cur_scope->__pyx_v_a, __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1, 0)), __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1_2, 0)), __Pyx_c_prod_double(__pyx_cur_scope->__pyx_v_b, __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1_2, 0))), __Pyx_c_prod_double(__pyx_cur_scope->__pyx_v_c, __pyx_t_double_complex_from_parts(__pyx_cur_scope->__pyx_v_t1, 0))), __pyx_cur_scope->__pyx_v_d);
|
|
4290
4335
|
|
|
4291
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4336
|
+
/* "fontTools/cu2qu/cu2qu.py":160
|
|
4292
4337
|
* c1 = (2 * b * t1 + c + 3 * a * t1_2) * dt
|
|
4293
4338
|
* d1 = a * t1 * t1_2 + b * t1_2 + c * t1 + d
|
|
4294
4339
|
* yield calc_cubic_points(a1, b1, c1, d1) # <<<<<<<<<<<<<<
|
|
4295
4340
|
*
|
|
4296
4341
|
*
|
|
4297
4342
|
*/
|
|
4298
|
-
__pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_points(__pyx_cur_scope->__pyx_v_a1, __pyx_cur_scope->__pyx_v_b1, __pyx_cur_scope->__pyx_v_c1, __pyx_cur_scope->__pyx_v_d1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4343
|
+
__pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_points(__pyx_cur_scope->__pyx_v_a1, __pyx_cur_scope->__pyx_v_b1, __pyx_cur_scope->__pyx_v_c1, __pyx_cur_scope->__pyx_v_d1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
|
|
4299
4344
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4300
4345
|
__pyx_r = __pyx_t_1;
|
|
4301
4346
|
__pyx_t_1 = 0;
|
|
@@ -4312,11 +4357,11 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4312
4357
|
__pyx_t_12 = __pyx_cur_scope->__pyx_t_0;
|
|
4313
4358
|
__pyx_t_13 = __pyx_cur_scope->__pyx_t_1;
|
|
4314
4359
|
__pyx_t_14 = __pyx_cur_scope->__pyx_t_2;
|
|
4315
|
-
if (unlikely(!__pyx_sent_value)) __PYX_ERR(0,
|
|
4360
|
+
if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 160, __pyx_L1_error)
|
|
4316
4361
|
}
|
|
4317
4362
|
CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
|
|
4318
4363
|
|
|
4319
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4364
|
+
/* "fontTools/cu2qu/cu2qu.py":133
|
|
4320
4365
|
*
|
|
4321
4366
|
*
|
|
4322
4367
|
* @cython.locals( # <<<<<<<<<<<<<<
|
|
@@ -4349,7 +4394,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4349
4394
|
return __pyx_r;
|
|
4350
4395
|
}
|
|
4351
4396
|
|
|
4352
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4397
|
+
/* "fontTools/cu2qu/cu2qu.py":163
|
|
4353
4398
|
*
|
|
4354
4399
|
*
|
|
4355
4400
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4374,7 +4419,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4374
4419
|
int __pyx_clineno = 0;
|
|
4375
4420
|
__Pyx_RefNannySetupContext("split_cubic_into_two", 0);
|
|
4376
4421
|
|
|
4377
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4422
|
+
/* "fontTools/cu2qu/cu2qu.py":184
|
|
4378
4423
|
* values).
|
|
4379
4424
|
* """
|
|
4380
4425
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125 # <<<<<<<<<<<<<<
|
|
@@ -4383,7 +4428,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4383
4428
|
*/
|
|
4384
4429
|
__pyx_v_mid = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_p0, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __Pyx_c_sum_double(__pyx_v_p1, __pyx_v_p2))), __pyx_v_p3), __pyx_t_double_complex_from_parts(0.125, 0));
|
|
4385
4430
|
|
|
4386
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4431
|
+
/* "fontTools/cu2qu/cu2qu.py":185
|
|
4387
4432
|
* """
|
|
4388
4433
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
4389
4434
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125 # <<<<<<<<<<<<<<
|
|
@@ -4392,7 +4437,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4392
4437
|
*/
|
|
4393
4438
|
__pyx_v_deriv3 = __Pyx_c_prod_double(__Pyx_c_diff_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_p3, __pyx_v_p2), __pyx_v_p1), __pyx_v_p0), __pyx_t_double_complex_from_parts(0.125, 0));
|
|
4394
4439
|
|
|
4395
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4440
|
+
/* "fontTools/cu2qu/cu2qu.py":186
|
|
4396
4441
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
4397
4442
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125
|
|
4398
4443
|
* return ( # <<<<<<<<<<<<<<
|
|
@@ -4401,90 +4446,90 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4401
4446
|
*/
|
|
4402
4447
|
__Pyx_XDECREF(__pyx_r);
|
|
4403
4448
|
|
|
4404
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4449
|
+
/* "fontTools/cu2qu/cu2qu.py":187
|
|
4405
4450
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125
|
|
4406
4451
|
* return (
|
|
4407
4452
|
* (p0, (p0 + p1) * 0.5, mid - deriv3, mid), # <<<<<<<<<<<<<<
|
|
4408
4453
|
* (mid, mid + deriv3, (p2 + p3) * 0.5, p3),
|
|
4409
4454
|
* )
|
|
4410
4455
|
*/
|
|
4411
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4456
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
|
|
4412
4457
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4413
4458
|
__pyx_t_2 = __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p0, __pyx_v_p1), __pyx_t_double_complex_from_parts(0.5, 0));
|
|
4414
|
-
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4459
|
+
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
|
|
4415
4460
|
__Pyx_GOTREF(__pyx_t_3);
|
|
4416
4461
|
__pyx_t_2 = __Pyx_c_diff_double(__pyx_v_mid, __pyx_v_deriv3);
|
|
4417
|
-
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
4462
|
+
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error)
|
|
4418
4463
|
__Pyx_GOTREF(__pyx_t_4);
|
|
4419
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4464
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __pyx_L1_error)
|
|
4420
4465
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4421
|
-
__pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4466
|
+
__pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error)
|
|
4422
4467
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4423
4468
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4424
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4469
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
|
|
4425
4470
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
4426
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0,
|
|
4471
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
|
|
4427
4472
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
4428
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(0,
|
|
4473
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
|
|
4429
4474
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4430
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4475
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
|
|
4431
4476
|
__pyx_t_1 = 0;
|
|
4432
4477
|
__pyx_t_3 = 0;
|
|
4433
4478
|
__pyx_t_4 = 0;
|
|
4434
4479
|
__pyx_t_5 = 0;
|
|
4435
4480
|
|
|
4436
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4481
|
+
/* "fontTools/cu2qu/cu2qu.py":188
|
|
4437
4482
|
* return (
|
|
4438
4483
|
* (p0, (p0 + p1) * 0.5, mid - deriv3, mid),
|
|
4439
4484
|
* (mid, mid + deriv3, (p2 + p3) * 0.5, p3), # <<<<<<<<<<<<<<
|
|
4440
4485
|
* )
|
|
4441
4486
|
*
|
|
4442
4487
|
*/
|
|
4443
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4488
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 188, __pyx_L1_error)
|
|
4444
4489
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4445
4490
|
__pyx_t_2 = __Pyx_c_sum_double(__pyx_v_mid, __pyx_v_deriv3);
|
|
4446
|
-
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
4491
|
+
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error)
|
|
4447
4492
|
__Pyx_GOTREF(__pyx_t_4);
|
|
4448
4493
|
__pyx_t_2 = __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p2, __pyx_v_p3), __pyx_t_double_complex_from_parts(0.5, 0));
|
|
4449
|
-
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4494
|
+
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error)
|
|
4450
4495
|
__Pyx_GOTREF(__pyx_t_3);
|
|
4451
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4496
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
|
|
4452
4497
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4453
|
-
__pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4498
|
+
__pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 188, __pyx_L1_error)
|
|
4454
4499
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4455
4500
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4456
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4501
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 188, __pyx_L1_error);
|
|
4457
4502
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
4458
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0,
|
|
4503
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 188, __pyx_L1_error);
|
|
4459
4504
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
4460
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0,
|
|
4505
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 188, __pyx_L1_error);
|
|
4461
4506
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4462
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4507
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_1) != (0)) __PYX_ERR(0, 188, __pyx_L1_error);
|
|
4463
4508
|
__pyx_t_5 = 0;
|
|
4464
4509
|
__pyx_t_4 = 0;
|
|
4465
4510
|
__pyx_t_3 = 0;
|
|
4466
4511
|
__pyx_t_1 = 0;
|
|
4467
4512
|
|
|
4468
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4513
|
+
/* "fontTools/cu2qu/cu2qu.py":187
|
|
4469
4514
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125
|
|
4470
4515
|
* return (
|
|
4471
4516
|
* (p0, (p0 + p1) * 0.5, mid - deriv3, mid), # <<<<<<<<<<<<<<
|
|
4472
4517
|
* (mid, mid + deriv3, (p2 + p3) * 0.5, p3),
|
|
4473
4518
|
* )
|
|
4474
4519
|
*/
|
|
4475
|
-
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4520
|
+
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
|
|
4476
4521
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4477
4522
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
4478
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
4523
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
|
|
4479
4524
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
4480
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7) != (0)) __PYX_ERR(0,
|
|
4525
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 187, __pyx_L1_error);
|
|
4481
4526
|
__pyx_t_6 = 0;
|
|
4482
4527
|
__pyx_t_7 = 0;
|
|
4483
4528
|
__pyx_r = __pyx_t_1;
|
|
4484
4529
|
__pyx_t_1 = 0;
|
|
4485
4530
|
goto __pyx_L0;
|
|
4486
4531
|
|
|
4487
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4532
|
+
/* "fontTools/cu2qu/cu2qu.py":163
|
|
4488
4533
|
*
|
|
4489
4534
|
*
|
|
4490
4535
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4508,7 +4553,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4508
4553
|
return __pyx_r;
|
|
4509
4554
|
}
|
|
4510
4555
|
|
|
4511
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4556
|
+
/* "fontTools/cu2qu/cu2qu.py":192
|
|
4512
4557
|
*
|
|
4513
4558
|
*
|
|
4514
4559
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4538,7 +4583,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4538
4583
|
int __pyx_clineno = 0;
|
|
4539
4584
|
__Pyx_RefNannySetupContext("split_cubic_into_three", 0);
|
|
4540
4585
|
|
|
4541
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4586
|
+
/* "fontTools/cu2qu/cu2qu.py":221
|
|
4542
4587
|
* values).
|
|
4543
4588
|
* """
|
|
4544
4589
|
* mid1 = (8 * p0 + 12 * p1 + 6 * p2 + p3) * (1 / 27) # <<<<<<<<<<<<<<
|
|
@@ -4547,7 +4592,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4547
4592
|
*/
|
|
4548
4593
|
__pyx_v_mid1 = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(8, 0), __pyx_v_p0), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(12, 0), __pyx_v_p1)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(6, 0), __pyx_v_p2)), __pyx_v_p3), __pyx_t_double_complex_from_parts((1.0 / 27.0), 0));
|
|
4549
4594
|
|
|
4550
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4595
|
+
/* "fontTools/cu2qu/cu2qu.py":222
|
|
4551
4596
|
* """
|
|
4552
4597
|
* mid1 = (8 * p0 + 12 * p1 + 6 * p2 + p3) * (1 / 27)
|
|
4553
4598
|
* deriv1 = (p3 + 3 * p2 - 4 * p0) * (1 / 27) # <<<<<<<<<<<<<<
|
|
@@ -4556,7 +4601,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4556
4601
|
*/
|
|
4557
4602
|
__pyx_v_deriv1 = __Pyx_c_prod_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_p3, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_p2)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(4, 0), __pyx_v_p0)), __pyx_t_double_complex_from_parts((1.0 / 27.0), 0));
|
|
4558
4603
|
|
|
4559
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4604
|
+
/* "fontTools/cu2qu/cu2qu.py":223
|
|
4560
4605
|
* mid1 = (8 * p0 + 12 * p1 + 6 * p2 + p3) * (1 / 27)
|
|
4561
4606
|
* deriv1 = (p3 + 3 * p2 - 4 * p0) * (1 / 27)
|
|
4562
4607
|
* mid2 = (p0 + 6 * p1 + 12 * p2 + 8 * p3) * (1 / 27) # <<<<<<<<<<<<<<
|
|
@@ -4565,7 +4610,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4565
4610
|
*/
|
|
4566
4611
|
__pyx_v_mid2 = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_p0, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(6, 0), __pyx_v_p1)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(12, 0), __pyx_v_p2)), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(8, 0), __pyx_v_p3)), __pyx_t_double_complex_from_parts((1.0 / 27.0), 0));
|
|
4567
4612
|
|
|
4568
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4613
|
+
/* "fontTools/cu2qu/cu2qu.py":224
|
|
4569
4614
|
* deriv1 = (p3 + 3 * p2 - 4 * p0) * (1 / 27)
|
|
4570
4615
|
* mid2 = (p0 + 6 * p1 + 12 * p2 + 8 * p3) * (1 / 27)
|
|
4571
4616
|
* deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27) # <<<<<<<<<<<<<<
|
|
@@ -4574,7 +4619,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4574
4619
|
*/
|
|
4575
4620
|
__pyx_v_deriv2 = __Pyx_c_prod_double(__Pyx_c_diff_double(__Pyx_c_diff_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(4, 0), __pyx_v_p3), __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __pyx_v_p1)), __pyx_v_p0), __pyx_t_double_complex_from_parts((1.0 / 27.0), 0));
|
|
4576
4621
|
|
|
4577
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4622
|
+
/* "fontTools/cu2qu/cu2qu.py":225
|
|
4578
4623
|
* mid2 = (p0 + 6 * p1 + 12 * p2 + 8 * p3) * (1 / 27)
|
|
4579
4624
|
* deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27)
|
|
4580
4625
|
* return ( # <<<<<<<<<<<<<<
|
|
@@ -4583,129 +4628,129 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4583
4628
|
*/
|
|
4584
4629
|
__Pyx_XDECREF(__pyx_r);
|
|
4585
4630
|
|
|
4586
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4631
|
+
/* "fontTools/cu2qu/cu2qu.py":226
|
|
4587
4632
|
* deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27)
|
|
4588
4633
|
* return (
|
|
4589
4634
|
* (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1), # <<<<<<<<<<<<<<
|
|
4590
4635
|
* (mid1, mid1 + deriv1, mid2 - deriv2, mid2),
|
|
4591
4636
|
* (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3),
|
|
4592
4637
|
*/
|
|
4593
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4638
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
|
|
4594
4639
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4595
4640
|
__pyx_t_2 = __Pyx_c_sum_double(__Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_v_p0), __pyx_v_p1);
|
|
4596
4641
|
__pyx_t_3 = __pyx_t_double_complex_from_parts(3.0, 0);
|
|
4597
4642
|
if (unlikely(__Pyx_c_is_zero_double(__pyx_t_3))) {
|
|
4598
4643
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
4599
|
-
__PYX_ERR(0,
|
|
4644
|
+
__PYX_ERR(0, 226, __pyx_L1_error)
|
|
4600
4645
|
}
|
|
4601
4646
|
__pyx_t_4 = __Pyx_c_quot_double(__pyx_t_2, __pyx_t_3);
|
|
4602
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4647
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __pyx_L1_error)
|
|
4603
4648
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4604
4649
|
__pyx_t_4 = __Pyx_c_diff_double(__pyx_v_mid1, __pyx_v_deriv1);
|
|
4605
|
-
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4650
|
+
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error)
|
|
4606
4651
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4607
|
-
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4652
|
+
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 226, __pyx_L1_error)
|
|
4608
4653
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4609
|
-
__pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
4654
|
+
__pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error)
|
|
4610
4655
|
__Pyx_GOTREF(__pyx_t_8);
|
|
4611
4656
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4612
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4657
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 226, __pyx_L1_error);
|
|
4613
4658
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4614
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4659
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 226, __pyx_L1_error);
|
|
4615
4660
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
4616
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
4661
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 226, __pyx_L1_error);
|
|
4617
4662
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
4618
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_7) != (0)) __PYX_ERR(0,
|
|
4663
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_7) != (0)) __PYX_ERR(0, 226, __pyx_L1_error);
|
|
4619
4664
|
__pyx_t_1 = 0;
|
|
4620
4665
|
__pyx_t_5 = 0;
|
|
4621
4666
|
__pyx_t_6 = 0;
|
|
4622
4667
|
__pyx_t_7 = 0;
|
|
4623
4668
|
|
|
4624
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4669
|
+
/* "fontTools/cu2qu/cu2qu.py":227
|
|
4625
4670
|
* return (
|
|
4626
4671
|
* (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1),
|
|
4627
4672
|
* (mid1, mid1 + deriv1, mid2 - deriv2, mid2), # <<<<<<<<<<<<<<
|
|
4628
4673
|
* (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3),
|
|
4629
4674
|
* )
|
|
4630
4675
|
*/
|
|
4631
|
-
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4676
|
+
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 227, __pyx_L1_error)
|
|
4632
4677
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4633
4678
|
__pyx_t_4 = __Pyx_c_sum_double(__pyx_v_mid1, __pyx_v_deriv1);
|
|
4634
|
-
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4679
|
+
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error)
|
|
4635
4680
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4636
4681
|
__pyx_t_4 = __Pyx_c_diff_double(__pyx_v_mid2, __pyx_v_deriv2);
|
|
4637
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4682
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error)
|
|
4638
4683
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4639
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4684
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
|
|
4640
4685
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4641
|
-
__pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
4686
|
+
__pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 227, __pyx_L1_error)
|
|
4642
4687
|
__Pyx_GOTREF(__pyx_t_9);
|
|
4643
4688
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
4644
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7) != (0)) __PYX_ERR(0,
|
|
4689
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7) != (0)) __PYX_ERR(0, 227, __pyx_L1_error);
|
|
4645
4690
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
4646
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
4691
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 227, __pyx_L1_error);
|
|
4647
4692
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4648
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4693
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 227, __pyx_L1_error);
|
|
4649
4694
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4650
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4695
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_1) != (0)) __PYX_ERR(0, 227, __pyx_L1_error);
|
|
4651
4696
|
__pyx_t_7 = 0;
|
|
4652
4697
|
__pyx_t_6 = 0;
|
|
4653
4698
|
__pyx_t_5 = 0;
|
|
4654
4699
|
__pyx_t_1 = 0;
|
|
4655
4700
|
|
|
4656
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4701
|
+
/* "fontTools/cu2qu/cu2qu.py":228
|
|
4657
4702
|
* (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1),
|
|
4658
4703
|
* (mid1, mid1 + deriv1, mid2 - deriv2, mid2),
|
|
4659
4704
|
* (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3), # <<<<<<<<<<<<<<
|
|
4660
4705
|
* )
|
|
4661
4706
|
*
|
|
4662
4707
|
*/
|
|
4663
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4708
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
4664
4709
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4665
4710
|
__pyx_t_4 = __Pyx_c_sum_double(__pyx_v_mid2, __pyx_v_deriv2);
|
|
4666
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4711
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
4667
4712
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4668
4713
|
__pyx_t_4 = __Pyx_c_sum_double(__pyx_v_p2, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(2, 0), __pyx_v_p3));
|
|
4669
4714
|
__pyx_t_3 = __pyx_t_double_complex_from_parts(3.0, 0);
|
|
4670
4715
|
if (unlikely(__Pyx_c_is_zero_double(__pyx_t_3))) {
|
|
4671
4716
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
4672
|
-
__PYX_ERR(0,
|
|
4717
|
+
__PYX_ERR(0, 228, __pyx_L1_error)
|
|
4673
4718
|
}
|
|
4674
4719
|
__pyx_t_2 = __Pyx_c_quot_double(__pyx_t_4, __pyx_t_3);
|
|
4675
|
-
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4720
|
+
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
4676
4721
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4677
|
-
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4722
|
+
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
4678
4723
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4679
|
-
__pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
4724
|
+
__pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 228, __pyx_L1_error)
|
|
4680
4725
|
__Pyx_GOTREF(__pyx_t_10);
|
|
4681
4726
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4682
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4727
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 228, __pyx_L1_error);
|
|
4683
4728
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4684
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4729
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 228, __pyx_L1_error);
|
|
4685
4730
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
4686
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
4731
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 228, __pyx_L1_error);
|
|
4687
4732
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
4688
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7) != (0)) __PYX_ERR(0,
|
|
4733
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7) != (0)) __PYX_ERR(0, 228, __pyx_L1_error);
|
|
4689
4734
|
__pyx_t_1 = 0;
|
|
4690
4735
|
__pyx_t_5 = 0;
|
|
4691
4736
|
__pyx_t_6 = 0;
|
|
4692
4737
|
__pyx_t_7 = 0;
|
|
4693
4738
|
|
|
4694
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4739
|
+
/* "fontTools/cu2qu/cu2qu.py":226
|
|
4695
4740
|
* deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27)
|
|
4696
4741
|
* return (
|
|
4697
4742
|
* (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1), # <<<<<<<<<<<<<<
|
|
4698
4743
|
* (mid1, mid1 + deriv1, mid2 - deriv2, mid2),
|
|
4699
4744
|
* (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3),
|
|
4700
4745
|
*/
|
|
4701
|
-
__pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4746
|
+
__pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 226, __pyx_L1_error)
|
|
4702
4747
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4703
4748
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
4704
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8) != (0)) __PYX_ERR(0,
|
|
4749
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 226, __pyx_L1_error);
|
|
4705
4750
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
4706
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0,
|
|
4751
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 226, __pyx_L1_error);
|
|
4707
4752
|
__Pyx_GIVEREF(__pyx_t_10);
|
|
4708
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_10) != (0)) __PYX_ERR(0,
|
|
4753
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_10) != (0)) __PYX_ERR(0, 226, __pyx_L1_error);
|
|
4709
4754
|
__pyx_t_8 = 0;
|
|
4710
4755
|
__pyx_t_9 = 0;
|
|
4711
4756
|
__pyx_t_10 = 0;
|
|
@@ -4713,7 +4758,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4713
4758
|
__pyx_t_7 = 0;
|
|
4714
4759
|
goto __pyx_L0;
|
|
4715
4760
|
|
|
4716
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4761
|
+
/* "fontTools/cu2qu/cu2qu.py":192
|
|
4717
4762
|
*
|
|
4718
4763
|
*
|
|
4719
4764
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4738,7 +4783,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4738
4783
|
return __pyx_r;
|
|
4739
4784
|
}
|
|
4740
4785
|
|
|
4741
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4786
|
+
/* "fontTools/cu2qu/cu2qu.py":232
|
|
4742
4787
|
*
|
|
4743
4788
|
*
|
|
4744
4789
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4751,7 +4796,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4751
4796
|
__pyx_t_double_complex __pyx_v__p2;
|
|
4752
4797
|
__pyx_t_double_complex __pyx_r;
|
|
4753
4798
|
|
|
4754
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4799
|
+
/* "fontTools/cu2qu/cu2qu.py":256
|
|
4755
4800
|
* complex: Location of candidate control point on quadratic curve.
|
|
4756
4801
|
* """
|
|
4757
4802
|
* _p1 = p0 + (p1 - p0) * 1.5 # <<<<<<<<<<<<<<
|
|
@@ -4760,7 +4805,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4760
4805
|
*/
|
|
4761
4806
|
__pyx_v__p1 = __Pyx_c_sum_double(__pyx_v_p0, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_p1, __pyx_v_p0), __pyx_t_double_complex_from_parts(1.5, 0)));
|
|
4762
4807
|
|
|
4763
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4808
|
+
/* "fontTools/cu2qu/cu2qu.py":257
|
|
4764
4809
|
* """
|
|
4765
4810
|
* _p1 = p0 + (p1 - p0) * 1.5
|
|
4766
4811
|
* _p2 = p3 + (p2 - p3) * 1.5 # <<<<<<<<<<<<<<
|
|
@@ -4769,7 +4814,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4769
4814
|
*/
|
|
4770
4815
|
__pyx_v__p2 = __Pyx_c_sum_double(__pyx_v_p3, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_p2, __pyx_v_p3), __pyx_t_double_complex_from_parts(1.5, 0)));
|
|
4771
4816
|
|
|
4772
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4817
|
+
/* "fontTools/cu2qu/cu2qu.py":258
|
|
4773
4818
|
* _p1 = p0 + (p1 - p0) * 1.5
|
|
4774
4819
|
* _p2 = p3 + (p2 - p3) * 1.5
|
|
4775
4820
|
* return _p1 + (_p2 - _p1) * t # <<<<<<<<<<<<<<
|
|
@@ -4779,7 +4824,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4779
4824
|
__pyx_r = __Pyx_c_sum_double(__pyx_v__p1, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v__p2, __pyx_v__p1), __pyx_t_double_complex_from_parts(__pyx_v_t, 0)));
|
|
4780
4825
|
goto __pyx_L0;
|
|
4781
4826
|
|
|
4782
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4827
|
+
/* "fontTools/cu2qu/cu2qu.py":232
|
|
4783
4828
|
*
|
|
4784
4829
|
*
|
|
4785
4830
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4792,7 +4837,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4792
4837
|
return __pyx_r;
|
|
4793
4838
|
}
|
|
4794
4839
|
|
|
4795
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4840
|
+
/* "fontTools/cu2qu/cu2qu.py":261
|
|
4796
4841
|
*
|
|
4797
4842
|
*
|
|
4798
4843
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4816,19 +4861,21 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4816
4861
|
PyObject *__pyx_t_7 = NULL;
|
|
4817
4862
|
PyObject *__pyx_t_8 = NULL;
|
|
4818
4863
|
PyObject *__pyx_t_9 = NULL;
|
|
4819
|
-
|
|
4820
|
-
|
|
4864
|
+
int __pyx_t_10;
|
|
4865
|
+
int __pyx_t_11;
|
|
4821
4866
|
PyObject *__pyx_t_12 = NULL;
|
|
4822
4867
|
PyObject *__pyx_t_13 = NULL;
|
|
4823
4868
|
PyObject *__pyx_t_14 = NULL;
|
|
4824
|
-
|
|
4825
|
-
|
|
4869
|
+
PyObject *__pyx_t_15 = NULL;
|
|
4870
|
+
PyObject *__pyx_t_16 = NULL;
|
|
4871
|
+
size_t __pyx_t_17;
|
|
4872
|
+
__pyx_t_double_complex __pyx_t_18;
|
|
4826
4873
|
int __pyx_lineno = 0;
|
|
4827
4874
|
const char *__pyx_filename = NULL;
|
|
4828
4875
|
int __pyx_clineno = 0;
|
|
4829
4876
|
__Pyx_RefNannySetupContext("calc_intersect", 0);
|
|
4830
4877
|
|
|
4831
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4878
|
+
/* "fontTools/cu2qu/cu2qu.py":279
|
|
4832
4879
|
* if no intersection was found.
|
|
4833
4880
|
* """
|
|
4834
4881
|
* ab = b - a # <<<<<<<<<<<<<<
|
|
@@ -4837,7 +4884,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4837
4884
|
*/
|
|
4838
4885
|
__pyx_v_ab = __Pyx_c_diff_double(__pyx_v_b, __pyx_v_a);
|
|
4839
4886
|
|
|
4840
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4887
|
+
/* "fontTools/cu2qu/cu2qu.py":280
|
|
4841
4888
|
* """
|
|
4842
4889
|
* ab = b - a
|
|
4843
4890
|
* cd = d - c # <<<<<<<<<<<<<<
|
|
@@ -4846,7 +4893,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4846
4893
|
*/
|
|
4847
4894
|
__pyx_v_cd = __Pyx_c_diff_double(__pyx_v_d, __pyx_v_c);
|
|
4848
4895
|
|
|
4849
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4896
|
+
/* "fontTools/cu2qu/cu2qu.py":281
|
|
4850
4897
|
* ab = b - a
|
|
4851
4898
|
* cd = d - c
|
|
4852
4899
|
* p = ab * 1j # <<<<<<<<<<<<<<
|
|
@@ -4855,7 +4902,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4855
4902
|
*/
|
|
4856
4903
|
__pyx_v_p = __Pyx_c_prod_double(__pyx_v_ab, __pyx_t_double_complex_from_parts(0, 1.0));
|
|
4857
4904
|
|
|
4858
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4905
|
+
/* "fontTools/cu2qu/cu2qu.py":282
|
|
4859
4906
|
* cd = d - c
|
|
4860
4907
|
* p = ab * 1j
|
|
4861
4908
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -4871,22 +4918,22 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4871
4918
|
__Pyx_XGOTREF(__pyx_t_3);
|
|
4872
4919
|
/*try:*/ {
|
|
4873
4920
|
|
|
4874
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4921
|
+
/* "fontTools/cu2qu/cu2qu.py":283
|
|
4875
4922
|
* p = ab * 1j
|
|
4876
4923
|
* try:
|
|
4877
4924
|
* h = dot(p, a - c) / dot(p, cd) # <<<<<<<<<<<<<<
|
|
4878
4925
|
* except ZeroDivisionError:
|
|
4879
|
-
*
|
|
4926
|
+
* # if 3 or 4 points are equal, we do have an intersection despite the zero-div:
|
|
4880
4927
|
*/
|
|
4881
|
-
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_v_p, __Pyx_c_diff_double(__pyx_v_a, __pyx_v_c)); if (unlikely(__pyx_t_4 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
4882
|
-
__pyx_t_5 = __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_v_p, __pyx_v_cd); if (unlikely(__pyx_t_5 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
4928
|
+
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_v_p, __Pyx_c_diff_double(__pyx_v_a, __pyx_v_c)); if (unlikely(__pyx_t_4 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L3_error)
|
|
4929
|
+
__pyx_t_5 = __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_v_p, __pyx_v_cd); if (unlikely(__pyx_t_5 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L3_error)
|
|
4883
4930
|
if (unlikely(__pyx_t_5 == 0)) {
|
|
4884
4931
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
4885
|
-
__PYX_ERR(0,
|
|
4932
|
+
__PYX_ERR(0, 283, __pyx_L3_error)
|
|
4886
4933
|
}
|
|
4887
4934
|
__pyx_v_h = (__pyx_t_4 / __pyx_t_5);
|
|
4888
4935
|
|
|
4889
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4936
|
+
/* "fontTools/cu2qu/cu2qu.py":282
|
|
4890
4937
|
* cd = d - c
|
|
4891
4938
|
* p = ab * 1j
|
|
4892
4939
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -4900,49 +4947,95 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4900
4947
|
goto __pyx_L8_try_end;
|
|
4901
4948
|
__pyx_L3_error:;
|
|
4902
4949
|
|
|
4903
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4950
|
+
/* "fontTools/cu2qu/cu2qu.py":284
|
|
4904
4951
|
* try:
|
|
4905
4952
|
* h = dot(p, a - c) / dot(p, cd)
|
|
4906
4953
|
* except ZeroDivisionError: # <<<<<<<<<<<<<<
|
|
4907
|
-
*
|
|
4908
|
-
*
|
|
4954
|
+
* # if 3 or 4 points are equal, we do have an intersection despite the zero-div:
|
|
4955
|
+
* # return one of the off-curves so that the algorithm can attempt a one-curve
|
|
4909
4956
|
*/
|
|
4910
4957
|
__pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ZeroDivisionError);
|
|
4911
4958
|
if (__pyx_t_6) {
|
|
4912
4959
|
__Pyx_AddTraceback("fontTools.cu2qu.cu2qu.calc_intersect", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
4913
|
-
if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0,
|
|
4960
|
+
if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 284, __pyx_L5_except_error)
|
|
4914
4961
|
__Pyx_XGOTREF(__pyx_t_7);
|
|
4915
4962
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
4916
4963
|
__Pyx_XGOTREF(__pyx_t_9);
|
|
4917
4964
|
|
|
4918
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4919
|
-
*
|
|
4920
|
-
*
|
|
4965
|
+
/* "fontTools/cu2qu/cu2qu.py":289
|
|
4966
|
+
* # solution if it's within tolerance:
|
|
4967
|
+
* # https://github.com/linebender/kurbo/pull/484
|
|
4968
|
+
* if b == c and (a == b or c == d): # <<<<<<<<<<<<<<
|
|
4969
|
+
* return b
|
|
4970
|
+
* return complex(NAN, NAN)
|
|
4971
|
+
*/
|
|
4972
|
+
__pyx_t_11 = (__Pyx_c_eq_double(__pyx_v_b, __pyx_v_c));
|
|
4973
|
+
if (__pyx_t_11) {
|
|
4974
|
+
} else {
|
|
4975
|
+
__pyx_t_10 = __pyx_t_11;
|
|
4976
|
+
goto __pyx_L12_bool_binop_done;
|
|
4977
|
+
}
|
|
4978
|
+
__pyx_t_11 = (__Pyx_c_eq_double(__pyx_v_a, __pyx_v_b));
|
|
4979
|
+
if (!__pyx_t_11) {
|
|
4980
|
+
} else {
|
|
4981
|
+
__pyx_t_10 = __pyx_t_11;
|
|
4982
|
+
goto __pyx_L12_bool_binop_done;
|
|
4983
|
+
}
|
|
4984
|
+
__pyx_t_11 = (__Pyx_c_eq_double(__pyx_v_c, __pyx_v_d));
|
|
4985
|
+
__pyx_t_10 = __pyx_t_11;
|
|
4986
|
+
__pyx_L12_bool_binop_done:;
|
|
4987
|
+
if (__pyx_t_10) {
|
|
4988
|
+
|
|
4989
|
+
/* "fontTools/cu2qu/cu2qu.py":290
|
|
4990
|
+
* # https://github.com/linebender/kurbo/pull/484
|
|
4991
|
+
* if b == c and (a == b or c == d):
|
|
4992
|
+
* return b # <<<<<<<<<<<<<<
|
|
4993
|
+
* return complex(NAN, NAN)
|
|
4994
|
+
* return c + cd * h
|
|
4995
|
+
*/
|
|
4996
|
+
__pyx_r = __pyx_v_b;
|
|
4997
|
+
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
4998
|
+
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
4999
|
+
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
5000
|
+
goto __pyx_L6_except_return;
|
|
5001
|
+
|
|
5002
|
+
/* "fontTools/cu2qu/cu2qu.py":289
|
|
5003
|
+
* # solution if it's within tolerance:
|
|
5004
|
+
* # https://github.com/linebender/kurbo/pull/484
|
|
5005
|
+
* if b == c and (a == b or c == d): # <<<<<<<<<<<<<<
|
|
5006
|
+
* return b
|
|
5007
|
+
* return complex(NAN, NAN)
|
|
5008
|
+
*/
|
|
5009
|
+
}
|
|
5010
|
+
|
|
5011
|
+
/* "fontTools/cu2qu/cu2qu.py":291
|
|
5012
|
+
* if b == c and (a == b or c == d):
|
|
5013
|
+
* return b
|
|
4921
5014
|
* return complex(NAN, NAN) # <<<<<<<<<<<<<<
|
|
4922
5015
|
* return c + cd * h
|
|
4923
5016
|
*
|
|
4924
5017
|
*/
|
|
4925
|
-
|
|
5018
|
+
__pyx_t_13 = NULL;
|
|
4926
5019
|
__Pyx_INCREF((PyObject *)(&PyComplex_Type));
|
|
4927
|
-
|
|
4928
|
-
__Pyx_GetModuleGlobalName(
|
|
4929
|
-
__Pyx_GOTREF(
|
|
4930
|
-
__Pyx_GetModuleGlobalName(
|
|
4931
|
-
__Pyx_GOTREF(
|
|
4932
|
-
|
|
5020
|
+
__pyx_t_14 = ((PyObject *)(&PyComplex_Type));
|
|
5021
|
+
__Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_NAN); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 291, __pyx_L5_except_error)
|
|
5022
|
+
__Pyx_GOTREF(__pyx_t_15);
|
|
5023
|
+
__Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_NAN); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 291, __pyx_L5_except_error)
|
|
5024
|
+
__Pyx_GOTREF(__pyx_t_16);
|
|
5025
|
+
__pyx_t_17 = 1;
|
|
4933
5026
|
{
|
|
4934
|
-
PyObject *__pyx_callargs[3] = {
|
|
4935
|
-
|
|
4936
|
-
__Pyx_XDECREF(
|
|
4937
|
-
__Pyx_DECREF(
|
|
5027
|
+
PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_t_15, __pyx_t_16};
|
|
5028
|
+
__pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+__pyx_t_17, (3-__pyx_t_17) | (__pyx_t_17*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
5029
|
+
__Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
|
|
5030
|
+
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
5031
|
+
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
|
|
4938
5032
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
__Pyx_GOTREF(__pyx_t_10);
|
|
5033
|
+
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 291, __pyx_L5_except_error)
|
|
5034
|
+
__Pyx_GOTREF(__pyx_t_12);
|
|
4942
5035
|
}
|
|
4943
|
-
|
|
4944
|
-
__Pyx_DECREF(
|
|
4945
|
-
__pyx_r =
|
|
5036
|
+
__pyx_t_18 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_12); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 291, __pyx_L5_except_error)
|
|
5037
|
+
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
5038
|
+
__pyx_r = __pyx_t_18;
|
|
4946
5039
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
4947
5040
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
4948
5041
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
@@ -4950,7 +5043,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4950
5043
|
}
|
|
4951
5044
|
goto __pyx_L5_except_error;
|
|
4952
5045
|
|
|
4953
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5046
|
+
/* "fontTools/cu2qu/cu2qu.py":282
|
|
4954
5047
|
* cd = d - c
|
|
4955
5048
|
* p = ab * 1j
|
|
4956
5049
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -4972,8 +5065,8 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4972
5065
|
__pyx_L8_try_end:;
|
|
4973
5066
|
}
|
|
4974
5067
|
|
|
4975
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4976
|
-
*
|
|
5068
|
+
/* "fontTools/cu2qu/cu2qu.py":292
|
|
5069
|
+
* return b
|
|
4977
5070
|
* return complex(NAN, NAN)
|
|
4978
5071
|
* return c + cd * h # <<<<<<<<<<<<<<
|
|
4979
5072
|
*
|
|
@@ -4982,7 +5075,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4982
5075
|
__pyx_r = __Pyx_c_sum_double(__pyx_v_c, __Pyx_c_prod_double(__pyx_v_cd, __pyx_t_double_complex_from_parts(__pyx_v_h, 0)));
|
|
4983
5076
|
goto __pyx_L0;
|
|
4984
5077
|
|
|
4985
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5078
|
+
/* "fontTools/cu2qu/cu2qu.py":261
|
|
4986
5079
|
*
|
|
4987
5080
|
*
|
|
4988
5081
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4995,11 +5088,11 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4995
5088
|
__Pyx_XDECREF(__pyx_t_7);
|
|
4996
5089
|
__Pyx_XDECREF(__pyx_t_8);
|
|
4997
5090
|
__Pyx_XDECREF(__pyx_t_9);
|
|
4998
|
-
__Pyx_XDECREF(__pyx_t_10);
|
|
4999
|
-
__Pyx_XDECREF(__pyx_t_11);
|
|
5000
5091
|
__Pyx_XDECREF(__pyx_t_12);
|
|
5001
5092
|
__Pyx_XDECREF(__pyx_t_13);
|
|
5002
5093
|
__Pyx_XDECREF(__pyx_t_14);
|
|
5094
|
+
__Pyx_XDECREF(__pyx_t_15);
|
|
5095
|
+
__Pyx_XDECREF(__pyx_t_16);
|
|
5003
5096
|
__Pyx_AddTraceback("fontTools.cu2qu.cu2qu.calc_intersect", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
5004
5097
|
__pyx_r = __pyx_t_double_complex_from_parts(0, 0);
|
|
5005
5098
|
__pyx_L0:;
|
|
@@ -5007,7 +5100,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
5007
5100
|
return __pyx_r;
|
|
5008
5101
|
}
|
|
5009
5102
|
|
|
5010
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5103
|
+
/* "fontTools/cu2qu/cu2qu.py":295
|
|
5011
5104
|
*
|
|
5012
5105
|
*
|
|
5013
5106
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5027,7 +5120,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5027
5120
|
const char *__pyx_filename = NULL;
|
|
5028
5121
|
int __pyx_clineno = 0;
|
|
5029
5122
|
|
|
5030
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5123
|
+
/* "fontTools/cu2qu/cu2qu.py":324
|
|
5031
5124
|
* """
|
|
5032
5125
|
* # First check p2 then p1, as p2 has higher error early on.
|
|
5033
5126
|
* if abs(p2) <= tolerance and abs(p1) <= tolerance: # <<<<<<<<<<<<<<
|
|
@@ -5045,7 +5138,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5045
5138
|
__pyx_L4_bool_binop_done:;
|
|
5046
5139
|
if (__pyx_t_1) {
|
|
5047
5140
|
|
|
5048
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5141
|
+
/* "fontTools/cu2qu/cu2qu.py":325
|
|
5049
5142
|
* # First check p2 then p1, as p2 has higher error early on.
|
|
5050
5143
|
* if abs(p2) <= tolerance and abs(p1) <= tolerance:
|
|
5051
5144
|
* return True # <<<<<<<<<<<<<<
|
|
@@ -5055,7 +5148,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5055
5148
|
__pyx_r = 1;
|
|
5056
5149
|
goto __pyx_L0;
|
|
5057
5150
|
|
|
5058
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5151
|
+
/* "fontTools/cu2qu/cu2qu.py":324
|
|
5059
5152
|
* """
|
|
5060
5153
|
* # First check p2 then p1, as p2 has higher error early on.
|
|
5061
5154
|
* if abs(p2) <= tolerance and abs(p1) <= tolerance: # <<<<<<<<<<<<<<
|
|
@@ -5064,7 +5157,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5064
5157
|
*/
|
|
5065
5158
|
}
|
|
5066
5159
|
|
|
5067
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5160
|
+
/* "fontTools/cu2qu/cu2qu.py":328
|
|
5068
5161
|
*
|
|
5069
5162
|
* # Split.
|
|
5070
5163
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125 # <<<<<<<<<<<<<<
|
|
@@ -5073,7 +5166,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5073
5166
|
*/
|
|
5074
5167
|
__pyx_v_mid = __Pyx_c_prod_double(__Pyx_c_sum_double(__Pyx_c_sum_double(__pyx_v_p0, __Pyx_c_prod_double(__pyx_t_double_complex_from_parts(3, 0), __Pyx_c_sum_double(__pyx_v_p1, __pyx_v_p2))), __pyx_v_p3), __pyx_t_double_complex_from_parts(0.125, 0));
|
|
5075
5168
|
|
|
5076
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5169
|
+
/* "fontTools/cu2qu/cu2qu.py":329
|
|
5077
5170
|
* # Split.
|
|
5078
5171
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
5079
5172
|
* if abs(mid) > tolerance: # <<<<<<<<<<<<<<
|
|
@@ -5083,7 +5176,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5083
5176
|
__pyx_t_1 = (__Pyx_c_abs_double(__pyx_v_mid) > __pyx_v_tolerance);
|
|
5084
5177
|
if (__pyx_t_1) {
|
|
5085
5178
|
|
|
5086
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5179
|
+
/* "fontTools/cu2qu/cu2qu.py":330
|
|
5087
5180
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
5088
5181
|
* if abs(mid) > tolerance:
|
|
5089
5182
|
* return False # <<<<<<<<<<<<<<
|
|
@@ -5093,7 +5186,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5093
5186
|
__pyx_r = 0;
|
|
5094
5187
|
goto __pyx_L0;
|
|
5095
5188
|
|
|
5096
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5189
|
+
/* "fontTools/cu2qu/cu2qu.py":329
|
|
5097
5190
|
* # Split.
|
|
5098
5191
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
5099
5192
|
* if abs(mid) > tolerance: # <<<<<<<<<<<<<<
|
|
@@ -5102,7 +5195,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5102
5195
|
*/
|
|
5103
5196
|
}
|
|
5104
5197
|
|
|
5105
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5198
|
+
/* "fontTools/cu2qu/cu2qu.py":331
|
|
5106
5199
|
* if abs(mid) > tolerance:
|
|
5107
5200
|
* return False
|
|
5108
5201
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125 # <<<<<<<<<<<<<<
|
|
@@ -5111,34 +5204,34 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5111
5204
|
*/
|
|
5112
5205
|
__pyx_v_deriv3 = __Pyx_c_prod_double(__Pyx_c_diff_double(__Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_p3, __pyx_v_p2), __pyx_v_p1), __pyx_v_p0), __pyx_t_double_complex_from_parts(0.125, 0));
|
|
5113
5206
|
|
|
5114
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5207
|
+
/* "fontTools/cu2qu/cu2qu.py":332
|
|
5115
5208
|
* return False
|
|
5116
5209
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125
|
|
5117
5210
|
* return cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
|
|
5118
5211
|
* p0, (p0 + p1) * 0.5, mid - deriv3, mid, tolerance
|
|
5119
5212
|
* ) and cubic_farthest_fit_inside(mid, mid + deriv3, (p2 + p3) * 0.5, p3, tolerance)
|
|
5120
5213
|
*/
|
|
5121
|
-
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_p0, __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p0, __pyx_v_p1), __pyx_t_double_complex_from_parts(0.5, 0)), __Pyx_c_diff_double(__pyx_v_mid, __pyx_v_deriv3), __pyx_v_mid, __pyx_v_tolerance); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
5214
|
+
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_p0, __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p0, __pyx_v_p1), __pyx_t_double_complex_from_parts(0.5, 0)), __Pyx_c_diff_double(__pyx_v_mid, __pyx_v_deriv3), __pyx_v_mid, __pyx_v_tolerance); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 332, __pyx_L1_error)
|
|
5122
5215
|
if (__pyx_t_4) {
|
|
5123
5216
|
} else {
|
|
5124
5217
|
__pyx_t_3 = __pyx_t_4;
|
|
5125
5218
|
goto __pyx_L7_bool_binop_done;
|
|
5126
5219
|
}
|
|
5127
5220
|
|
|
5128
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5221
|
+
/* "fontTools/cu2qu/cu2qu.py":334
|
|
5129
5222
|
* return cubic_farthest_fit_inside(
|
|
5130
5223
|
* p0, (p0 + p1) * 0.5, mid - deriv3, mid, tolerance
|
|
5131
5224
|
* ) and cubic_farthest_fit_inside(mid, mid + deriv3, (p2 + p3) * 0.5, p3, tolerance) # <<<<<<<<<<<<<<
|
|
5132
5225
|
*
|
|
5133
5226
|
*
|
|
5134
5227
|
*/
|
|
5135
|
-
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_mid, __Pyx_c_sum_double(__pyx_v_mid, __pyx_v_deriv3), __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p2, __pyx_v_p3), __pyx_t_double_complex_from_parts(0.5, 0)), __pyx_v_p3, __pyx_v_tolerance); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
5228
|
+
__pyx_t_4 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_mid, __Pyx_c_sum_double(__pyx_v_mid, __pyx_v_deriv3), __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_p2, __pyx_v_p3), __pyx_t_double_complex_from_parts(0.5, 0)), __pyx_v_p3, __pyx_v_tolerance); if (unlikely(__pyx_t_4 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error)
|
|
5136
5229
|
__pyx_t_3 = __pyx_t_4;
|
|
5137
5230
|
__pyx_L7_bool_binop_done:;
|
|
5138
5231
|
__pyx_r = __pyx_t_3;
|
|
5139
5232
|
goto __pyx_L0;
|
|
5140
5233
|
|
|
5141
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5234
|
+
/* "fontTools/cu2qu/cu2qu.py":295
|
|
5142
5235
|
*
|
|
5143
5236
|
*
|
|
5144
5237
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5154,7 +5247,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5154
5247
|
return __pyx_r;
|
|
5155
5248
|
}
|
|
5156
5249
|
|
|
5157
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5250
|
+
/* "fontTools/cu2qu/cu2qu.py":337
|
|
5158
5251
|
*
|
|
5159
5252
|
*
|
|
5160
5253
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5187,33 +5280,33 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5187
5280
|
int __pyx_clineno = 0;
|
|
5188
5281
|
__Pyx_RefNannySetupContext("cubic_approx_quadratic", 0);
|
|
5189
5282
|
|
|
5190
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5283
|
+
/* "fontTools/cu2qu/cu2qu.py":361
|
|
5191
5284
|
* """
|
|
5192
5285
|
*
|
|
5193
5286
|
* q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3]) # <<<<<<<<<<<<<<
|
|
5194
5287
|
* if math.isnan(q1.imag):
|
|
5195
5288
|
* return None
|
|
5196
5289
|
*/
|
|
5197
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5290
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
|
|
5198
5291
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5199
|
-
__pyx_t_2 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5292
|
+
__pyx_t_2 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
|
|
5200
5293
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5201
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5294
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
|
|
5202
5295
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5203
|
-
__pyx_t_3 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5296
|
+
__pyx_t_3 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
|
|
5204
5297
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5205
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5298
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
|
|
5206
5299
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5207
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5300
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
|
|
5208
5301
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5209
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5302
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
|
|
5210
5303
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5211
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5304
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
|
|
5212
5305
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5213
|
-
__pyx_t_6 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_intersect(__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5306
|
+
__pyx_t_6 = __pyx_f_9fontTools_5cu2qu_5cu2qu_calc_intersect(__pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 361, __pyx_L1_error)
|
|
5214
5307
|
__pyx_v_q1 = __pyx_t_6;
|
|
5215
5308
|
|
|
5216
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5309
|
+
/* "fontTools/cu2qu/cu2qu.py":362
|
|
5217
5310
|
*
|
|
5218
5311
|
* q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3])
|
|
5219
5312
|
* if math.isnan(q1.imag): # <<<<<<<<<<<<<<
|
|
@@ -5221,12 +5314,12 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5221
5314
|
* c0 = cubic[0]
|
|
5222
5315
|
*/
|
|
5223
5316
|
__pyx_t_7 = NULL;
|
|
5224
|
-
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5317
|
+
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 362, __pyx_L1_error)
|
|
5225
5318
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5226
|
-
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_isnan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
5319
|
+
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_isnan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 362, __pyx_L1_error)
|
|
5227
5320
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5228
5321
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5229
|
-
__pyx_t_8 = PyFloat_FromDouble(__Pyx_CIMAG(__pyx_v_q1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5322
|
+
__pyx_t_8 = PyFloat_FromDouble(__Pyx_CIMAG(__pyx_v_q1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 362, __pyx_L1_error)
|
|
5230
5323
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5231
5324
|
__pyx_t_10 = 1;
|
|
5232
5325
|
#if CYTHON_UNPACK_METHODS
|
|
@@ -5246,14 +5339,14 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5246
5339
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
5247
5340
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5248
5341
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
5249
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5342
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error)
|
|
5250
5343
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5251
5344
|
}
|
|
5252
|
-
__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0,
|
|
5345
|
+
__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 362, __pyx_L1_error)
|
|
5253
5346
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5254
5347
|
if (__pyx_t_11) {
|
|
5255
5348
|
|
|
5256
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5349
|
+
/* "fontTools/cu2qu/cu2qu.py":363
|
|
5257
5350
|
* q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3])
|
|
5258
5351
|
* if math.isnan(q1.imag):
|
|
5259
5352
|
* return None # <<<<<<<<<<<<<<
|
|
@@ -5264,7 +5357,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5264
5357
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
5265
5358
|
goto __pyx_L0;
|
|
5266
5359
|
|
|
5267
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5360
|
+
/* "fontTools/cu2qu/cu2qu.py":362
|
|
5268
5361
|
*
|
|
5269
5362
|
* q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3])
|
|
5270
5363
|
* if math.isnan(q1.imag): # <<<<<<<<<<<<<<
|
|
@@ -5273,33 +5366,33 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5273
5366
|
*/
|
|
5274
5367
|
}
|
|
5275
5368
|
|
|
5276
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5369
|
+
/* "fontTools/cu2qu/cu2qu.py":364
|
|
5277
5370
|
* if math.isnan(q1.imag):
|
|
5278
5371
|
* return None
|
|
5279
5372
|
* c0 = cubic[0] # <<<<<<<<<<<<<<
|
|
5280
5373
|
* c3 = cubic[3]
|
|
5281
5374
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5282
5375
|
*/
|
|
5283
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5376
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
|
|
5284
5377
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5285
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5378
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 364, __pyx_L1_error)
|
|
5286
5379
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5287
5380
|
__pyx_v_c0 = __pyx_t_6;
|
|
5288
5381
|
|
|
5289
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5382
|
+
/* "fontTools/cu2qu/cu2qu.py":365
|
|
5290
5383
|
* return None
|
|
5291
5384
|
* c0 = cubic[0]
|
|
5292
5385
|
* c3 = cubic[3] # <<<<<<<<<<<<<<
|
|
5293
5386
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5294
5387
|
* c2 = c3 + (q1 - c3) * (2 / 3)
|
|
5295
5388
|
*/
|
|
5296
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5389
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
|
|
5297
5390
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5298
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5391
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 365, __pyx_L1_error)
|
|
5299
5392
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5300
5393
|
__pyx_v_c3 = __pyx_t_6;
|
|
5301
5394
|
|
|
5302
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5395
|
+
/* "fontTools/cu2qu/cu2qu.py":366
|
|
5303
5396
|
* c0 = cubic[0]
|
|
5304
5397
|
* c3 = cubic[3]
|
|
5305
5398
|
* c1 = c0 + (q1 - c0) * (2 / 3) # <<<<<<<<<<<<<<
|
|
@@ -5308,7 +5401,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5308
5401
|
*/
|
|
5309
5402
|
__pyx_v_c1 = __Pyx_c_sum_double(__pyx_v_c0, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_c0), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0)));
|
|
5310
5403
|
|
|
5311
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5404
|
+
/* "fontTools/cu2qu/cu2qu.py":367
|
|
5312
5405
|
* c3 = cubic[3]
|
|
5313
5406
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5314
5407
|
* c2 = c3 + (q1 - c3) * (2 / 3) # <<<<<<<<<<<<<<
|
|
@@ -5317,38 +5410,38 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5317
5410
|
*/
|
|
5318
5411
|
__pyx_v_c2 = __Pyx_c_sum_double(__pyx_v_c3, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_c3), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0)));
|
|
5319
5412
|
|
|
5320
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5413
|
+
/* "fontTools/cu2qu/cu2qu.py":368
|
|
5321
5414
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5322
5415
|
* c2 = c3 + (q1 - c3) * (2 / 3)
|
|
5323
5416
|
* if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance): # <<<<<<<<<<<<<<
|
|
5324
5417
|
* return None
|
|
5325
5418
|
* return c0, q1, c3
|
|
5326
5419
|
*/
|
|
5327
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5420
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
|
|
5328
5421
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5329
|
-
__pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
5422
|
+
__pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 368, __pyx_L1_error)
|
|
5330
5423
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5331
|
-
__pyx_t_8 = PyNumber_Subtract(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5424
|
+
__pyx_t_8 = PyNumber_Subtract(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 368, __pyx_L1_error)
|
|
5332
5425
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5333
5426
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5334
5427
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
5335
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5428
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L1_error)
|
|
5336
5429
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5337
|
-
__pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5430
|
+
__pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 368, __pyx_L1_error)
|
|
5338
5431
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5339
|
-
__pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
5432
|
+
__pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 368, __pyx_L1_error)
|
|
5340
5433
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5341
|
-
__pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5434
|
+
__pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
|
|
5342
5435
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5343
5436
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5344
5437
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
5345
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5438
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L1_error)
|
|
5346
5439
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5347
|
-
__pyx_t_12 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_double_complex_from_parts(0, 0), __pyx_t_6, __pyx_t_5, __pyx_t_double_complex_from_parts(0, 0), __pyx_v_tolerance); if (unlikely(__pyx_t_12 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
5440
|
+
__pyx_t_12 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_double_complex_from_parts(0, 0), __pyx_t_6, __pyx_t_5, __pyx_t_double_complex_from_parts(0, 0), __pyx_v_tolerance); if (unlikely(__pyx_t_12 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L1_error)
|
|
5348
5441
|
__pyx_t_11 = (!(__pyx_t_12 != 0));
|
|
5349
5442
|
if (__pyx_t_11) {
|
|
5350
5443
|
|
|
5351
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5444
|
+
/* "fontTools/cu2qu/cu2qu.py":369
|
|
5352
5445
|
* c2 = c3 + (q1 - c3) * (2 / 3)
|
|
5353
5446
|
* if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance):
|
|
5354
5447
|
* return None # <<<<<<<<<<<<<<
|
|
@@ -5359,7 +5452,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5359
5452
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
5360
5453
|
goto __pyx_L0;
|
|
5361
5454
|
|
|
5362
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5455
|
+
/* "fontTools/cu2qu/cu2qu.py":368
|
|
5363
5456
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5364
5457
|
* c2 = c3 + (q1 - c3) * (2 / 3)
|
|
5365
5458
|
* if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance): # <<<<<<<<<<<<<<
|
|
@@ -5368,7 +5461,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5368
5461
|
*/
|
|
5369
5462
|
}
|
|
5370
5463
|
|
|
5371
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5464
|
+
/* "fontTools/cu2qu/cu2qu.py":370
|
|
5372
5465
|
* if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance):
|
|
5373
5466
|
* return None
|
|
5374
5467
|
* return c0, q1, c3 # <<<<<<<<<<<<<<
|
|
@@ -5376,20 +5469,20 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5376
5469
|
*
|
|
5377
5470
|
*/
|
|
5378
5471
|
__Pyx_XDECREF(__pyx_r);
|
|
5379
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5472
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error)
|
|
5380
5473
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5381
|
-
__pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_q1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
5474
|
+
__pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_q1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 370, __pyx_L1_error)
|
|
5382
5475
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5383
|
-
__pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5476
|
+
__pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 370, __pyx_L1_error)
|
|
5384
5477
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5385
|
-
__pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
5478
|
+
__pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 370, __pyx_L1_error)
|
|
5386
5479
|
__Pyx_GOTREF(__pyx_t_7);
|
|
5387
5480
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
5388
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
5481
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 370, __pyx_L1_error);
|
|
5389
5482
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
5390
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0,
|
|
5483
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 370, __pyx_L1_error);
|
|
5391
5484
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
5392
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_8) != (0)) __PYX_ERR(0,
|
|
5485
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_8) != (0)) __PYX_ERR(0, 370, __pyx_L1_error);
|
|
5393
5486
|
__pyx_t_1 = 0;
|
|
5394
5487
|
__pyx_t_9 = 0;
|
|
5395
5488
|
__pyx_t_8 = 0;
|
|
@@ -5397,7 +5490,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5397
5490
|
__pyx_t_7 = 0;
|
|
5398
5491
|
goto __pyx_L0;
|
|
5399
5492
|
|
|
5400
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5493
|
+
/* "fontTools/cu2qu/cu2qu.py":337
|
|
5401
5494
|
*
|
|
5402
5495
|
*
|
|
5403
5496
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5419,7 +5512,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5419
5512
|
return __pyx_r;
|
|
5420
5513
|
}
|
|
5421
5514
|
|
|
5422
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5515
|
+
/* "fontTools/cu2qu/cu2qu.py":373
|
|
5423
5516
|
*
|
|
5424
5517
|
*
|
|
5425
5518
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5468,7 +5561,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5468
5561
|
int __pyx_clineno = 0;
|
|
5469
5562
|
__Pyx_RefNannySetupContext("cubic_approx_spline", 0);
|
|
5470
5563
|
|
|
5471
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5564
|
+
/* "fontTools/cu2qu/cu2qu.py":402
|
|
5472
5565
|
* """
|
|
5473
5566
|
*
|
|
5474
5567
|
* if n == 1: # <<<<<<<<<<<<<<
|
|
@@ -5478,7 +5571,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5478
5571
|
__pyx_t_1 = (__pyx_v_n == 1);
|
|
5479
5572
|
if (__pyx_t_1) {
|
|
5480
5573
|
|
|
5481
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5574
|
+
/* "fontTools/cu2qu/cu2qu.py":403
|
|
5482
5575
|
*
|
|
5483
5576
|
* if n == 1:
|
|
5484
5577
|
* return cubic_approx_quadratic(cubic, tolerance) # <<<<<<<<<<<<<<
|
|
@@ -5486,13 +5579,13 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5486
5579
|
* return cubic
|
|
5487
5580
|
*/
|
|
5488
5581
|
__Pyx_XDECREF(__pyx_r);
|
|
5489
|
-
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_quadratic(__pyx_v_cubic, __pyx_v_tolerance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5582
|
+
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_quadratic(__pyx_v_cubic, __pyx_v_tolerance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
|
|
5490
5583
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5491
5584
|
__pyx_r = __pyx_t_2;
|
|
5492
5585
|
__pyx_t_2 = 0;
|
|
5493
5586
|
goto __pyx_L0;
|
|
5494
5587
|
|
|
5495
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5588
|
+
/* "fontTools/cu2qu/cu2qu.py":402
|
|
5496
5589
|
* """
|
|
5497
5590
|
*
|
|
5498
5591
|
* if n == 1: # <<<<<<<<<<<<<<
|
|
@@ -5501,7 +5594,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5501
5594
|
*/
|
|
5502
5595
|
}
|
|
5503
5596
|
|
|
5504
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5597
|
+
/* "fontTools/cu2qu/cu2qu.py":404
|
|
5505
5598
|
* if n == 1:
|
|
5506
5599
|
* return cubic_approx_quadratic(cubic, tolerance)
|
|
5507
5600
|
* if n == 2 and all_quadratic == False: # <<<<<<<<<<<<<<
|
|
@@ -5519,7 +5612,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5519
5612
|
__pyx_L5_bool_binop_done:;
|
|
5520
5613
|
if (__pyx_t_1) {
|
|
5521
5614
|
|
|
5522
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5615
|
+
/* "fontTools/cu2qu/cu2qu.py":405
|
|
5523
5616
|
* return cubic_approx_quadratic(cubic, tolerance)
|
|
5524
5617
|
* if n == 2 and all_quadratic == False:
|
|
5525
5618
|
* return cubic # <<<<<<<<<<<<<<
|
|
@@ -5531,7 +5624,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5531
5624
|
__pyx_r = __pyx_v_cubic;
|
|
5532
5625
|
goto __pyx_L0;
|
|
5533
5626
|
|
|
5534
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5627
|
+
/* "fontTools/cu2qu/cu2qu.py":404
|
|
5535
5628
|
* if n == 1:
|
|
5536
5629
|
* return cubic_approx_quadratic(cubic, tolerance)
|
|
5537
5630
|
* if n == 2 and all_quadratic == False: # <<<<<<<<<<<<<<
|
|
@@ -5540,97 +5633,97 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5540
5633
|
*/
|
|
5541
5634
|
}
|
|
5542
5635
|
|
|
5543
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5636
|
+
/* "fontTools/cu2qu/cu2qu.py":407
|
|
5544
5637
|
* return cubic
|
|
5545
5638
|
*
|
|
5546
5639
|
* cubics = split_cubic_into_n_iter(cubic[0], cubic[1], cubic[2], cubic[3], n) # <<<<<<<<<<<<<<
|
|
5547
5640
|
*
|
|
5548
5641
|
* # calculate the spline of quadratics and check errors at the same time.
|
|
5549
5642
|
*/
|
|
5550
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5643
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5551
5644
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5552
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5645
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5553
5646
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5554
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5647
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5555
5648
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5556
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5649
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5557
5650
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5558
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5651
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5559
5652
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5560
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5653
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5561
5654
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5562
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5655
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5563
5656
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5564
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5657
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5565
5658
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5566
|
-
__pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5659
|
+
__pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5567
5660
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5568
|
-
__pyx_t_8 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_n_iter(__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5661
|
+
__pyx_t_8 = __pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_n_iter(__pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 407, __pyx_L1_error)
|
|
5569
5662
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5570
5663
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5571
5664
|
__pyx_v_cubics = __pyx_t_8;
|
|
5572
5665
|
__pyx_t_8 = 0;
|
|
5573
5666
|
|
|
5574
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5667
|
+
/* "fontTools/cu2qu/cu2qu.py":410
|
|
5575
5668
|
*
|
|
5576
5669
|
* # calculate the spline of quadratics and check errors at the same time.
|
|
5577
5670
|
* next_cubic = next(cubics) # <<<<<<<<<<<<<<
|
|
5578
5671
|
* next_q1 = cubic_approx_control(
|
|
5579
5672
|
* 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5580
5673
|
*/
|
|
5581
|
-
__pyx_t_8 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5674
|
+
__pyx_t_8 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 410, __pyx_L1_error)
|
|
5582
5675
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5583
5676
|
__pyx_v_next_cubic = __pyx_t_8;
|
|
5584
5677
|
__pyx_t_8 = 0;
|
|
5585
5678
|
|
|
5586
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5679
|
+
/* "fontTools/cu2qu/cu2qu.py":412
|
|
5587
5680
|
* next_cubic = next(cubics)
|
|
5588
5681
|
* next_q1 = cubic_approx_control(
|
|
5589
5682
|
* 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3] # <<<<<<<<<<<<<<
|
|
5590
5683
|
* )
|
|
5591
5684
|
* q2 = cubic[0]
|
|
5592
5685
|
*/
|
|
5593
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5686
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5594
5687
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5595
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5688
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5596
5689
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5597
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5690
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5598
5691
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5599
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5692
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5600
5693
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5601
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5694
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5602
5695
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5603
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5696
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5604
5697
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5605
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5698
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5606
5699
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5607
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5700
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L1_error)
|
|
5608
5701
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5609
5702
|
|
|
5610
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5703
|
+
/* "fontTools/cu2qu/cu2qu.py":411
|
|
5611
5704
|
* # calculate the spline of quadratics and check errors at the same time.
|
|
5612
5705
|
* next_cubic = next(cubics)
|
|
5613
5706
|
* next_q1 = cubic_approx_control( # <<<<<<<<<<<<<<
|
|
5614
5707
|
* 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5615
5708
|
* )
|
|
5616
5709
|
*/
|
|
5617
|
-
__pyx_t_9 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_control(0.0, __pyx_t_7, __pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5710
|
+
__pyx_t_9 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_control(0.0, __pyx_t_7, __pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 411, __pyx_L1_error)
|
|
5618
5711
|
__pyx_v_next_q1 = __pyx_t_9;
|
|
5619
5712
|
|
|
5620
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5713
|
+
/* "fontTools/cu2qu/cu2qu.py":414
|
|
5621
5714
|
* 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5622
5715
|
* )
|
|
5623
5716
|
* q2 = cubic[0] # <<<<<<<<<<<<<<
|
|
5624
5717
|
* d1 = 0j
|
|
5625
5718
|
* spline = [cubic[0], next_q1]
|
|
5626
5719
|
*/
|
|
5627
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5720
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 414, __pyx_L1_error)
|
|
5628
5721
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5629
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5722
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 414, __pyx_L1_error)
|
|
5630
5723
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5631
5724
|
__pyx_v_q2 = __pyx_t_9;
|
|
5632
5725
|
|
|
5633
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5726
|
+
/* "fontTools/cu2qu/cu2qu.py":415
|
|
5634
5727
|
* )
|
|
5635
5728
|
* q2 = cubic[0]
|
|
5636
5729
|
* d1 = 0j # <<<<<<<<<<<<<<
|
|
@@ -5639,29 +5732,29 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5639
5732
|
*/
|
|
5640
5733
|
__pyx_v_d1 = __pyx_t_double_complex_from_parts(0, 0.0);
|
|
5641
5734
|
|
|
5642
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5735
|
+
/* "fontTools/cu2qu/cu2qu.py":416
|
|
5643
5736
|
* q2 = cubic[0]
|
|
5644
5737
|
* d1 = 0j
|
|
5645
5738
|
* spline = [cubic[0], next_q1] # <<<<<<<<<<<<<<
|
|
5646
5739
|
* for i in range(1, n + 1):
|
|
5647
5740
|
* # Current cubic to convert
|
|
5648
5741
|
*/
|
|
5649
|
-
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5742
|
+
__pyx_t_8 = __Pyx_GetItemInt(__pyx_v_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 416, __pyx_L1_error)
|
|
5650
5743
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5651
|
-
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5744
|
+
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
|
|
5652
5745
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5653
|
-
__pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
5746
|
+
__pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 416, __pyx_L1_error)
|
|
5654
5747
|
__Pyx_GOTREF(__pyx_t_10);
|
|
5655
5748
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
5656
|
-
if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_8) != (0)) __PYX_ERR(0,
|
|
5749
|
+
if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 416, __pyx_L1_error);
|
|
5657
5750
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
5658
|
-
if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_2) != (0)) __PYX_ERR(0,
|
|
5751
|
+
if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 416, __pyx_L1_error);
|
|
5659
5752
|
__pyx_t_8 = 0;
|
|
5660
5753
|
__pyx_t_2 = 0;
|
|
5661
5754
|
__pyx_v_spline = ((PyObject*)__pyx_t_10);
|
|
5662
5755
|
__pyx_t_10 = 0;
|
|
5663
5756
|
|
|
5664
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5757
|
+
/* "fontTools/cu2qu/cu2qu.py":417
|
|
5665
5758
|
* d1 = 0j
|
|
5666
5759
|
* spline = [cubic[0], next_q1]
|
|
5667
5760
|
* for i in range(1, n + 1): # <<<<<<<<<<<<<<
|
|
@@ -5673,7 +5766,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5673
5766
|
for (__pyx_t_13 = 1; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
|
|
5674
5767
|
__pyx_v_i = __pyx_t_13;
|
|
5675
5768
|
|
|
5676
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5769
|
+
/* "fontTools/cu2qu/cu2qu.py":419
|
|
5677
5770
|
* for i in range(1, n + 1):
|
|
5678
5771
|
* # Current cubic to convert
|
|
5679
5772
|
* c0, c1, c2, c3 = next_cubic # <<<<<<<<<<<<<<
|
|
@@ -5686,7 +5779,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5686
5779
|
if (unlikely(size != 4)) {
|
|
5687
5780
|
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
|
|
5688
5781
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
5689
|
-
__PYX_ERR(0,
|
|
5782
|
+
__PYX_ERR(0, 419, __pyx_L1_error)
|
|
5690
5783
|
}
|
|
5691
5784
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
5692
5785
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
@@ -5700,16 +5793,16 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5700
5793
|
__Pyx_INCREF(__pyx_t_14);
|
|
5701
5794
|
} else {
|
|
5702
5795
|
__pyx_t_10 = __Pyx_PyList_GetItemRef(sequence, 0);
|
|
5703
|
-
if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
5796
|
+
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5704
5797
|
__Pyx_XGOTREF(__pyx_t_10);
|
|
5705
5798
|
__pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1);
|
|
5706
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5799
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5707
5800
|
__Pyx_XGOTREF(__pyx_t_2);
|
|
5708
5801
|
__pyx_t_8 = __Pyx_PyList_GetItemRef(sequence, 2);
|
|
5709
|
-
if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5802
|
+
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5710
5803
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
5711
5804
|
__pyx_t_14 = __Pyx_PyList_GetItemRef(sequence, 3);
|
|
5712
|
-
if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
5805
|
+
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5713
5806
|
__Pyx_XGOTREF(__pyx_t_14);
|
|
5714
5807
|
}
|
|
5715
5808
|
#else
|
|
@@ -5717,7 +5810,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5717
5810
|
Py_ssize_t i;
|
|
5718
5811
|
PyObject** temps[4] = {&__pyx_t_10,&__pyx_t_2,&__pyx_t_8,&__pyx_t_14};
|
|
5719
5812
|
for (i=0; i < 4; i++) {
|
|
5720
|
-
PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0,
|
|
5813
|
+
PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5721
5814
|
__Pyx_GOTREF(item);
|
|
5722
5815
|
*(temps[i]) = item;
|
|
5723
5816
|
}
|
|
@@ -5726,7 +5819,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5726
5819
|
} else {
|
|
5727
5820
|
Py_ssize_t index = -1;
|
|
5728
5821
|
PyObject** temps[4] = {&__pyx_t_10,&__pyx_t_2,&__pyx_t_8,&__pyx_t_14};
|
|
5729
|
-
__pyx_t_15 = PyObject_GetIter(__pyx_v_next_cubic); if (unlikely(!__pyx_t_15)) __PYX_ERR(0,
|
|
5822
|
+
__pyx_t_15 = PyObject_GetIter(__pyx_v_next_cubic); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5730
5823
|
__Pyx_GOTREF(__pyx_t_15);
|
|
5731
5824
|
__pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_15);
|
|
5732
5825
|
for (index=0; index < 4; index++) {
|
|
@@ -5734,7 +5827,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5734
5827
|
__Pyx_GOTREF(item);
|
|
5735
5828
|
*(temps[index]) = item;
|
|
5736
5829
|
}
|
|
5737
|
-
if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 4) < 0) __PYX_ERR(0,
|
|
5830
|
+
if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 4) < 0) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5738
5831
|
__pyx_t_16 = NULL;
|
|
5739
5832
|
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
5740
5833
|
goto __pyx_L10_unpacking_done;
|
|
@@ -5742,23 +5835,23 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5742
5835
|
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
5743
5836
|
__pyx_t_16 = NULL;
|
|
5744
5837
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
5745
|
-
__PYX_ERR(0,
|
|
5838
|
+
__PYX_ERR(0, 419, __pyx_L1_error)
|
|
5746
5839
|
__pyx_L10_unpacking_done:;
|
|
5747
5840
|
}
|
|
5748
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5841
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5749
5842
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
5750
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5843
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5751
5844
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5752
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5845
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5753
5846
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5754
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5847
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error)
|
|
5755
5848
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5756
5849
|
__pyx_v_c0 = __pyx_t_9;
|
|
5757
5850
|
__pyx_v_c1 = __pyx_t_4;
|
|
5758
5851
|
__pyx_v_c2 = __pyx_t_5;
|
|
5759
5852
|
__pyx_v_c3 = __pyx_t_6;
|
|
5760
5853
|
|
|
5761
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5854
|
+
/* "fontTools/cu2qu/cu2qu.py":422
|
|
5762
5855
|
*
|
|
5763
5856
|
* # Current quadratic approximation of current cubic
|
|
5764
5857
|
* q0 = q2 # <<<<<<<<<<<<<<
|
|
@@ -5767,7 +5860,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5767
5860
|
*/
|
|
5768
5861
|
__pyx_v_q0 = __pyx_v_q2;
|
|
5769
5862
|
|
|
5770
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5863
|
+
/* "fontTools/cu2qu/cu2qu.py":423
|
|
5771
5864
|
* # Current quadratic approximation of current cubic
|
|
5772
5865
|
* q0 = q2
|
|
5773
5866
|
* q1 = next_q1 # <<<<<<<<<<<<<<
|
|
@@ -5776,7 +5869,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5776
5869
|
*/
|
|
5777
5870
|
__pyx_v_q1 = __pyx_v_next_q1;
|
|
5778
5871
|
|
|
5779
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5872
|
+
/* "fontTools/cu2qu/cu2qu.py":424
|
|
5780
5873
|
* q0 = q2
|
|
5781
5874
|
* q1 = next_q1
|
|
5782
5875
|
* if i < n: # <<<<<<<<<<<<<<
|
|
@@ -5786,19 +5879,19 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5786
5879
|
__pyx_t_1 = (__pyx_v_i < __pyx_v_n);
|
|
5787
5880
|
if (__pyx_t_1) {
|
|
5788
5881
|
|
|
5789
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5882
|
+
/* "fontTools/cu2qu/cu2qu.py":425
|
|
5790
5883
|
* q1 = next_q1
|
|
5791
5884
|
* if i < n:
|
|
5792
5885
|
* next_cubic = next(cubics) # <<<<<<<<<<<<<<
|
|
5793
5886
|
* next_q1 = cubic_approx_control(
|
|
5794
5887
|
* i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5795
5888
|
*/
|
|
5796
|
-
__pyx_t_14 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
5889
|
+
__pyx_t_14 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 425, __pyx_L1_error)
|
|
5797
5890
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5798
5891
|
__Pyx_DECREF_SET(__pyx_v_next_cubic, __pyx_t_14);
|
|
5799
5892
|
__pyx_t_14 = 0;
|
|
5800
5893
|
|
|
5801
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5894
|
+
/* "fontTools/cu2qu/cu2qu.py":427
|
|
5802
5895
|
* next_cubic = next(cubics)
|
|
5803
5896
|
* next_q1 = cubic_approx_control(
|
|
5804
5897
|
* i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3] # <<<<<<<<<<<<<<
|
|
@@ -5808,48 +5901,48 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5808
5901
|
__pyx_t_17 = (__pyx_v_n - 1);
|
|
5809
5902
|
if (unlikely(__pyx_t_17 == 0)) {
|
|
5810
5903
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
5811
|
-
__PYX_ERR(0,
|
|
5904
|
+
__PYX_ERR(0, 427, __pyx_L1_error)
|
|
5812
5905
|
}
|
|
5813
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
5906
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
5814
5907
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5815
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5908
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
5816
5909
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5817
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
5910
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
5818
5911
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5819
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5912
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
5820
5913
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5821
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
5914
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 2, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
5822
5915
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5823
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5916
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
5824
5917
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5825
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
5918
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_next_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
5826
5919
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5827
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5920
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
5828
5921
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5829
5922
|
|
|
5830
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5923
|
+
/* "fontTools/cu2qu/cu2qu.py":426
|
|
5831
5924
|
* if i < n:
|
|
5832
5925
|
* next_cubic = next(cubics)
|
|
5833
5926
|
* next_q1 = cubic_approx_control( # <<<<<<<<<<<<<<
|
|
5834
5927
|
* i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5835
5928
|
* )
|
|
5836
5929
|
*/
|
|
5837
|
-
__pyx_t_7 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_control((((double)__pyx_v_i) / ((double)__pyx_t_17)), __pyx_t_6, __pyx_t_5, __pyx_t_4, __pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5930
|
+
__pyx_t_7 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_control((((double)__pyx_v_i) / ((double)__pyx_t_17)), __pyx_t_6, __pyx_t_5, __pyx_t_4, __pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L1_error)
|
|
5838
5931
|
__pyx_v_next_q1 = __pyx_t_7;
|
|
5839
5932
|
|
|
5840
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5933
|
+
/* "fontTools/cu2qu/cu2qu.py":429
|
|
5841
5934
|
* i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5842
5935
|
* )
|
|
5843
5936
|
* spline.append(next_q1) # <<<<<<<<<<<<<<
|
|
5844
5937
|
* q2 = (q1 + next_q1) * 0.5
|
|
5845
5938
|
* else:
|
|
5846
5939
|
*/
|
|
5847
|
-
__pyx_t_14 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
5940
|
+
__pyx_t_14 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 429, __pyx_L1_error)
|
|
5848
5941
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5849
|
-
__pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0,
|
|
5942
|
+
__pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 429, __pyx_L1_error)
|
|
5850
5943
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5851
5944
|
|
|
5852
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5945
|
+
/* "fontTools/cu2qu/cu2qu.py":430
|
|
5853
5946
|
* )
|
|
5854
5947
|
* spline.append(next_q1)
|
|
5855
5948
|
* q2 = (q1 + next_q1) * 0.5 # <<<<<<<<<<<<<<
|
|
@@ -5858,7 +5951,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5858
5951
|
*/
|
|
5859
5952
|
__pyx_v_q2 = __Pyx_c_prod_double(__Pyx_c_sum_double(__pyx_v_q1, __pyx_v_next_q1), __pyx_t_double_complex_from_parts(0.5, 0));
|
|
5860
5953
|
|
|
5861
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5954
|
+
/* "fontTools/cu2qu/cu2qu.py":424
|
|
5862
5955
|
* q0 = q2
|
|
5863
5956
|
* q1 = next_q1
|
|
5864
5957
|
* if i < n: # <<<<<<<<<<<<<<
|
|
@@ -5868,7 +5961,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5868
5961
|
goto __pyx_L11;
|
|
5869
5962
|
}
|
|
5870
5963
|
|
|
5871
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5964
|
+
/* "fontTools/cu2qu/cu2qu.py":432
|
|
5872
5965
|
* q2 = (q1 + next_q1) * 0.5
|
|
5873
5966
|
* else:
|
|
5874
5967
|
* q2 = c3 # <<<<<<<<<<<<<<
|
|
@@ -5880,7 +5973,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5880
5973
|
}
|
|
5881
5974
|
__pyx_L11:;
|
|
5882
5975
|
|
|
5883
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5976
|
+
/* "fontTools/cu2qu/cu2qu.py":435
|
|
5884
5977
|
*
|
|
5885
5978
|
* # End-point deltas
|
|
5886
5979
|
* d0 = d1 # <<<<<<<<<<<<<<
|
|
@@ -5889,7 +5982,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5889
5982
|
*/
|
|
5890
5983
|
__pyx_v_d0 = __pyx_v_d1;
|
|
5891
5984
|
|
|
5892
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5985
|
+
/* "fontTools/cu2qu/cu2qu.py":436
|
|
5893
5986
|
* # End-point deltas
|
|
5894
5987
|
* d0 = d1
|
|
5895
5988
|
* d1 = q2 - c3 # <<<<<<<<<<<<<<
|
|
@@ -5898,7 +5991,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5898
5991
|
*/
|
|
5899
5992
|
__pyx_v_d1 = __Pyx_c_diff_double(__pyx_v_q2, __pyx_v_c3);
|
|
5900
5993
|
|
|
5901
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5994
|
+
/* "fontTools/cu2qu/cu2qu.py":438
|
|
5902
5995
|
* d1 = q2 - c3
|
|
5903
5996
|
*
|
|
5904
5997
|
* if abs(d1) > tolerance or not cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
|
|
@@ -5912,16 +6005,16 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5912
6005
|
goto __pyx_L13_bool_binop_done;
|
|
5913
6006
|
}
|
|
5914
6007
|
|
|
5915
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6008
|
+
/* "fontTools/cu2qu/cu2qu.py":443
|
|
5916
6009
|
* q2 + (q1 - q2) * (2 / 3) - c2,
|
|
5917
6010
|
* d1,
|
|
5918
6011
|
* tolerance, # <<<<<<<<<<<<<<
|
|
5919
6012
|
* ):
|
|
5920
6013
|
* return None
|
|
5921
6014
|
*/
|
|
5922
|
-
__pyx_t_19 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_d0, __Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_q0, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_q0), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0))), __pyx_v_c1), __Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_q2, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_q2), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0))), __pyx_v_c2), __pyx_v_d1, __pyx_v_tolerance); if (unlikely(__pyx_t_19 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6015
|
+
__pyx_t_19 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_v_d0, __Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_q0, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_q0), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0))), __pyx_v_c1), __Pyx_c_diff_double(__Pyx_c_sum_double(__pyx_v_q2, __Pyx_c_prod_double(__Pyx_c_diff_double(__pyx_v_q1, __pyx_v_q2), __pyx_t_double_complex_from_parts((2.0 / 3.0), 0))), __pyx_v_c2), __pyx_v_d1, __pyx_v_tolerance); if (unlikely(__pyx_t_19 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 438, __pyx_L1_error)
|
|
5923
6016
|
|
|
5924
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6017
|
+
/* "fontTools/cu2qu/cu2qu.py":438
|
|
5925
6018
|
* d1 = q2 - c3
|
|
5926
6019
|
*
|
|
5927
6020
|
* if abs(d1) > tolerance or not cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
|
|
@@ -5933,7 +6026,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5933
6026
|
__pyx_L13_bool_binop_done:;
|
|
5934
6027
|
if (__pyx_t_1) {
|
|
5935
6028
|
|
|
5936
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6029
|
+
/* "fontTools/cu2qu/cu2qu.py":445
|
|
5937
6030
|
* tolerance,
|
|
5938
6031
|
* ):
|
|
5939
6032
|
* return None # <<<<<<<<<<<<<<
|
|
@@ -5944,7 +6037,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5944
6037
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
5945
6038
|
goto __pyx_L0;
|
|
5946
6039
|
|
|
5947
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6040
|
+
/* "fontTools/cu2qu/cu2qu.py":438
|
|
5948
6041
|
* d1 = q2 - c3
|
|
5949
6042
|
*
|
|
5950
6043
|
* if abs(d1) > tolerance or not cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
|
|
@@ -5954,19 +6047,19 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5954
6047
|
}
|
|
5955
6048
|
}
|
|
5956
6049
|
|
|
5957
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6050
|
+
/* "fontTools/cu2qu/cu2qu.py":446
|
|
5958
6051
|
* ):
|
|
5959
6052
|
* return None
|
|
5960
6053
|
* spline.append(cubic[3]) # <<<<<<<<<<<<<<
|
|
5961
6054
|
*
|
|
5962
6055
|
* return spline
|
|
5963
6056
|
*/
|
|
5964
|
-
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
6057
|
+
__pyx_t_14 = __Pyx_GetItemInt(__pyx_v_cubic, 3, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 446, __pyx_L1_error)
|
|
5965
6058
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5966
|
-
__pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0,
|
|
6059
|
+
__pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 446, __pyx_L1_error)
|
|
5967
6060
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5968
6061
|
|
|
5969
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6062
|
+
/* "fontTools/cu2qu/cu2qu.py":448
|
|
5970
6063
|
* spline.append(cubic[3])
|
|
5971
6064
|
*
|
|
5972
6065
|
* return spline # <<<<<<<<<<<<<<
|
|
@@ -5978,7 +6071,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5978
6071
|
__pyx_r = __pyx_v_spline;
|
|
5979
6072
|
goto __pyx_L0;
|
|
5980
6073
|
|
|
5981
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6074
|
+
/* "fontTools/cu2qu/cu2qu.py":373
|
|
5982
6075
|
*
|
|
5983
6076
|
*
|
|
5984
6077
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -6004,7 +6097,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
6004
6097
|
return __pyx_r;
|
|
6005
6098
|
}
|
|
6006
6099
|
|
|
6007
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6100
|
+
/* "fontTools/cu2qu/cu2qu.py":451
|
|
6008
6101
|
*
|
|
6009
6102
|
*
|
|
6010
6103
|
* @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
|
|
@@ -6054,51 +6147,51 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6054
6147
|
{
|
|
6055
6148
|
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_curve,&__pyx_mstate_global->__pyx_n_u_max_err,&__pyx_mstate_global->__pyx_n_u_all_quadratic,0};
|
|
6056
6149
|
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
|
|
6057
|
-
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0,
|
|
6150
|
+
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 451, __pyx_L3_error)
|
|
6058
6151
|
if (__pyx_kwds_len > 0) {
|
|
6059
6152
|
switch (__pyx_nargs) {
|
|
6060
6153
|
case 3:
|
|
6061
6154
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
6062
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
6155
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 451, __pyx_L3_error)
|
|
6063
6156
|
CYTHON_FALLTHROUGH;
|
|
6064
6157
|
case 2:
|
|
6065
6158
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
6066
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
6159
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 451, __pyx_L3_error)
|
|
6067
6160
|
CYTHON_FALLTHROUGH;
|
|
6068
6161
|
case 1:
|
|
6069
6162
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
6070
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
6163
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 451, __pyx_L3_error)
|
|
6071
6164
|
CYTHON_FALLTHROUGH;
|
|
6072
6165
|
case 0: break;
|
|
6073
6166
|
default: goto __pyx_L5_argtuple_error;
|
|
6074
6167
|
}
|
|
6075
6168
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
6076
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "curve_to_quadratic", 0) < 0) __PYX_ERR(0,
|
|
6169
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "curve_to_quadratic", 0) < 0) __PYX_ERR(0, 451, __pyx_L3_error)
|
|
6077
6170
|
for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
|
|
6078
|
-
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, i); __PYX_ERR(0,
|
|
6171
|
+
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, i); __PYX_ERR(0, 451, __pyx_L3_error) }
|
|
6079
6172
|
}
|
|
6080
6173
|
} else {
|
|
6081
6174
|
switch (__pyx_nargs) {
|
|
6082
6175
|
case 3:
|
|
6083
6176
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
6084
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
6177
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 451, __pyx_L3_error)
|
|
6085
6178
|
CYTHON_FALLTHROUGH;
|
|
6086
6179
|
case 2:
|
|
6087
6180
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
6088
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
6181
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 451, __pyx_L3_error)
|
|
6089
6182
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
6090
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
6183
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 451, __pyx_L3_error)
|
|
6091
6184
|
break;
|
|
6092
6185
|
default: goto __pyx_L5_argtuple_error;
|
|
6093
6186
|
}
|
|
6094
6187
|
}
|
|
6095
6188
|
__pyx_v_curve = values[0];
|
|
6096
|
-
__pyx_v_max_err = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_max_err == (double)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6189
|
+
__pyx_v_max_err = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_max_err == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 454, __pyx_L3_error)
|
|
6097
6190
|
if (values[2]) {
|
|
6098
|
-
__pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6191
|
+
__pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 454, __pyx_L3_error)
|
|
6099
6192
|
} else {
|
|
6100
6193
|
|
|
6101
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6194
|
+
/* "fontTools/cu2qu/cu2qu.py":454
|
|
6102
6195
|
* @cython.locals(n=cython.int)
|
|
6103
6196
|
* @cython.locals(all_quadratic=cython.int)
|
|
6104
6197
|
* def curve_to_quadratic(curve, max_err, all_quadratic=True): # <<<<<<<<<<<<<<
|
|
@@ -6110,7 +6203,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6110
6203
|
}
|
|
6111
6204
|
goto __pyx_L6_skip;
|
|
6112
6205
|
__pyx_L5_argtuple_error:;
|
|
6113
|
-
__Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0,
|
|
6206
|
+
__Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 451, __pyx_L3_error)
|
|
6114
6207
|
__pyx_L6_skip:;
|
|
6115
6208
|
goto __pyx_L4_argument_unpacking_done;
|
|
6116
6209
|
__pyx_L3_error:;
|
|
@@ -6123,7 +6216,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6123
6216
|
__pyx_L4_argument_unpacking_done:;
|
|
6124
6217
|
__pyx_r = __pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(__pyx_self, __pyx_v_curve, __pyx_v_max_err, __pyx_v_all_quadratic);
|
|
6125
6218
|
|
|
6126
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6219
|
+
/* "fontTools/cu2qu/cu2qu.py":451
|
|
6127
6220
|
*
|
|
6128
6221
|
*
|
|
6129
6222
|
* @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
|
|
@@ -6164,7 +6257,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6164
6257
|
__Pyx_RefNannySetupContext("curve_to_quadratic", 0);
|
|
6165
6258
|
__Pyx_INCREF(__pyx_v_curve);
|
|
6166
6259
|
|
|
6167
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6260
|
+
/* "fontTools/cu2qu/cu2qu.py":475
|
|
6168
6261
|
* """
|
|
6169
6262
|
*
|
|
6170
6263
|
* curve = [complex(*p) for p in curve] # <<<<<<<<<<<<<<
|
|
@@ -6172,16 +6265,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6172
6265
|
* for n in range(1, MAX_N + 1):
|
|
6173
6266
|
*/
|
|
6174
6267
|
{ /* enter inner scope */
|
|
6175
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6268
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6176
6269
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6177
6270
|
if (likely(PyList_CheckExact(__pyx_v_curve)) || PyTuple_CheckExact(__pyx_v_curve)) {
|
|
6178
6271
|
__pyx_t_2 = __pyx_v_curve; __Pyx_INCREF(__pyx_t_2);
|
|
6179
6272
|
__pyx_t_3 = 0;
|
|
6180
6273
|
__pyx_t_4 = NULL;
|
|
6181
6274
|
} else {
|
|
6182
|
-
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curve); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6275
|
+
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curve); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6183
6276
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6184
|
-
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
6277
|
+
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6185
6278
|
}
|
|
6186
6279
|
for (;;) {
|
|
6187
6280
|
if (likely(!__pyx_t_4)) {
|
|
@@ -6189,7 +6282,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6189
6282
|
{
|
|
6190
6283
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
|
|
6191
6284
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6192
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6285
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6193
6286
|
#endif
|
|
6194
6287
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6195
6288
|
}
|
|
@@ -6199,7 +6292,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6199
6292
|
{
|
|
6200
6293
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
|
|
6201
6294
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6202
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6295
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6203
6296
|
#endif
|
|
6204
6297
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6205
6298
|
}
|
|
@@ -6210,13 +6303,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6210
6303
|
#endif
|
|
6211
6304
|
++__pyx_t_3;
|
|
6212
6305
|
}
|
|
6213
|
-
if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6306
|
+
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6214
6307
|
} else {
|
|
6215
6308
|
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
|
|
6216
6309
|
if (unlikely(!__pyx_t_5)) {
|
|
6217
6310
|
PyObject* exc_type = PyErr_Occurred();
|
|
6218
6311
|
if (exc_type) {
|
|
6219
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
6312
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6220
6313
|
PyErr_Clear();
|
|
6221
6314
|
}
|
|
6222
6315
|
break;
|
|
@@ -6225,12 +6318,12 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6225
6318
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6226
6319
|
__Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_p, __pyx_t_5);
|
|
6227
6320
|
__pyx_t_5 = 0;
|
|
6228
|
-
__pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_7genexpr__pyx_v_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6321
|
+
__pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_7genexpr__pyx_v_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6229
6322
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6230
|
-
__pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
6323
|
+
__pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6231
6324
|
__Pyx_GOTREF(__pyx_t_6);
|
|
6232
6325
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
6233
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0,
|
|
6326
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 475, __pyx_L5_error)
|
|
6234
6327
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
6235
6328
|
}
|
|
6236
6329
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -6244,37 +6337,37 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6244
6337
|
__Pyx_DECREF_SET(__pyx_v_curve, __pyx_t_1);
|
|
6245
6338
|
__pyx_t_1 = 0;
|
|
6246
6339
|
|
|
6247
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6340
|
+
/* "fontTools/cu2qu/cu2qu.py":477
|
|
6248
6341
|
* curve = [complex(*p) for p in curve]
|
|
6249
6342
|
*
|
|
6250
6343
|
* for n in range(1, MAX_N + 1): # <<<<<<<<<<<<<<
|
|
6251
6344
|
* spline = cubic_approx_spline(curve, n, max_err, all_quadratic)
|
|
6252
6345
|
* if spline is not None:
|
|
6253
6346
|
*/
|
|
6254
|
-
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6347
|
+
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
|
|
6255
6348
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6256
|
-
__pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6349
|
+
__pyx_t_2 = __Pyx_PyLong_AddObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
|
|
6257
6350
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6258
6351
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
6259
|
-
__pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6352
|
+
__pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 477, __pyx_L1_error)
|
|
6260
6353
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6261
6354
|
__pyx_t_7 = __pyx_t_3;
|
|
6262
6355
|
for (__pyx_t_8 = 1; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
|
|
6263
6356
|
__pyx_v_n = __pyx_t_8;
|
|
6264
6357
|
|
|
6265
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6358
|
+
/* "fontTools/cu2qu/cu2qu.py":478
|
|
6266
6359
|
*
|
|
6267
6360
|
* for n in range(1, MAX_N + 1):
|
|
6268
6361
|
* spline = cubic_approx_spline(curve, n, max_err, all_quadratic) # <<<<<<<<<<<<<<
|
|
6269
6362
|
* if spline is not None:
|
|
6270
6363
|
* # done. go home
|
|
6271
6364
|
*/
|
|
6272
|
-
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(__pyx_v_curve, __pyx_v_n, __pyx_v_max_err, __pyx_v_all_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6365
|
+
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(__pyx_v_curve, __pyx_v_n, __pyx_v_max_err, __pyx_v_all_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __pyx_L1_error)
|
|
6273
6366
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6274
6367
|
__Pyx_XDECREF_SET(__pyx_v_spline, __pyx_t_2);
|
|
6275
6368
|
__pyx_t_2 = 0;
|
|
6276
6369
|
|
|
6277
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6370
|
+
/* "fontTools/cu2qu/cu2qu.py":479
|
|
6278
6371
|
* for n in range(1, MAX_N + 1):
|
|
6279
6372
|
* spline = cubic_approx_spline(curve, n, max_err, all_quadratic)
|
|
6280
6373
|
* if spline is not None: # <<<<<<<<<<<<<<
|
|
@@ -6284,7 +6377,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6284
6377
|
__pyx_t_9 = (__pyx_v_spline != Py_None);
|
|
6285
6378
|
if (__pyx_t_9) {
|
|
6286
6379
|
|
|
6287
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6380
|
+
/* "fontTools/cu2qu/cu2qu.py":481
|
|
6288
6381
|
* if spline is not None:
|
|
6289
6382
|
* # done. go home
|
|
6290
6383
|
* return [(s.real, s.imag) for s in spline] # <<<<<<<<<<<<<<
|
|
@@ -6293,16 +6386,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6293
6386
|
*/
|
|
6294
6387
|
__Pyx_XDECREF(__pyx_r);
|
|
6295
6388
|
{ /* enter inner scope */
|
|
6296
|
-
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6389
|
+
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6297
6390
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6298
6391
|
if (likely(PyList_CheckExact(__pyx_v_spline)) || PyTuple_CheckExact(__pyx_v_spline)) {
|
|
6299
6392
|
__pyx_t_1 = __pyx_v_spline; __Pyx_INCREF(__pyx_t_1);
|
|
6300
6393
|
__pyx_t_10 = 0;
|
|
6301
6394
|
__pyx_t_4 = NULL;
|
|
6302
6395
|
} else {
|
|
6303
|
-
__pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_spline); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6396
|
+
__pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_spline); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6304
6397
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6305
|
-
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
6398
|
+
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6306
6399
|
}
|
|
6307
6400
|
for (;;) {
|
|
6308
6401
|
if (likely(!__pyx_t_4)) {
|
|
@@ -6310,7 +6403,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6310
6403
|
{
|
|
6311
6404
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
|
|
6312
6405
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6313
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6406
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6314
6407
|
#endif
|
|
6315
6408
|
if (__pyx_t_10 >= __pyx_temp) break;
|
|
6316
6409
|
}
|
|
@@ -6320,7 +6413,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6320
6413
|
{
|
|
6321
6414
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
|
|
6322
6415
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6323
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6416
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6324
6417
|
#endif
|
|
6325
6418
|
if (__pyx_t_10 >= __pyx_temp) break;
|
|
6326
6419
|
}
|
|
@@ -6331,13 +6424,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6331
6424
|
#endif
|
|
6332
6425
|
++__pyx_t_10;
|
|
6333
6426
|
}
|
|
6334
|
-
if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
6427
|
+
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6335
6428
|
} else {
|
|
6336
6429
|
__pyx_t_6 = __pyx_t_4(__pyx_t_1);
|
|
6337
6430
|
if (unlikely(!__pyx_t_6)) {
|
|
6338
6431
|
PyObject* exc_type = PyErr_Occurred();
|
|
6339
6432
|
if (exc_type) {
|
|
6340
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
6433
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6341
6434
|
PyErr_Clear();
|
|
6342
6435
|
}
|
|
6343
6436
|
break;
|
|
@@ -6346,19 +6439,19 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6346
6439
|
__Pyx_GOTREF(__pyx_t_6);
|
|
6347
6440
|
__Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_s, __pyx_t_6);
|
|
6348
6441
|
__pyx_t_6 = 0;
|
|
6349
|
-
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_s, __pyx_mstate_global->__pyx_n_u_real); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
6442
|
+
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_s, __pyx_mstate_global->__pyx_n_u_real); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6350
6443
|
__Pyx_GOTREF(__pyx_t_6);
|
|
6351
|
-
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_s, __pyx_mstate_global->__pyx_n_u_imag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6444
|
+
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr1__pyx_v_s, __pyx_mstate_global->__pyx_n_u_imag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6352
6445
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6353
|
-
__pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0,
|
|
6446
|
+
__pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6354
6447
|
__Pyx_GOTREF(__pyx_t_11);
|
|
6355
6448
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
6356
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
6449
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 481, __pyx_L15_error);
|
|
6357
6450
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
6358
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
6451
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 481, __pyx_L15_error);
|
|
6359
6452
|
__pyx_t_6 = 0;
|
|
6360
6453
|
__pyx_t_5 = 0;
|
|
6361
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0,
|
|
6454
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 481, __pyx_L15_error)
|
|
6362
6455
|
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
6363
6456
|
}
|
|
6364
6457
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
@@ -6373,7 +6466,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6373
6466
|
__pyx_t_2 = 0;
|
|
6374
6467
|
goto __pyx_L0;
|
|
6375
6468
|
|
|
6376
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6469
|
+
/* "fontTools/cu2qu/cu2qu.py":479
|
|
6377
6470
|
* for n in range(1, MAX_N + 1):
|
|
6378
6471
|
* spline = cubic_approx_spline(curve, n, max_err, all_quadratic)
|
|
6379
6472
|
* if spline is not None: # <<<<<<<<<<<<<<
|
|
@@ -6383,7 +6476,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6383
6476
|
}
|
|
6384
6477
|
}
|
|
6385
6478
|
|
|
6386
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6479
|
+
/* "fontTools/cu2qu/cu2qu.py":483
|
|
6387
6480
|
* return [(s.real, s.imag) for s in spline]
|
|
6388
6481
|
*
|
|
6389
6482
|
* raise ApproxNotFoundError(curve) # <<<<<<<<<<<<<<
|
|
@@ -6391,7 +6484,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6391
6484
|
*
|
|
6392
6485
|
*/
|
|
6393
6486
|
__pyx_t_1 = NULL;
|
|
6394
|
-
__Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0,
|
|
6487
|
+
__Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 483, __pyx_L1_error)
|
|
6395
6488
|
__Pyx_GOTREF(__pyx_t_11);
|
|
6396
6489
|
__pyx_t_12 = 1;
|
|
6397
6490
|
#if CYTHON_UNPACK_METHODS
|
|
@@ -6410,14 +6503,14 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6410
6503
|
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
6411
6504
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
6412
6505
|
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
6413
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6506
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error)
|
|
6414
6507
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6415
6508
|
}
|
|
6416
6509
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
6417
6510
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6418
|
-
__PYX_ERR(0,
|
|
6511
|
+
__PYX_ERR(0, 483, __pyx_L1_error)
|
|
6419
6512
|
|
|
6420
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6513
|
+
/* "fontTools/cu2qu/cu2qu.py":451
|
|
6421
6514
|
*
|
|
6422
6515
|
*
|
|
6423
6516
|
* @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
|
|
@@ -6444,7 +6537,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6444
6537
|
return __pyx_r;
|
|
6445
6538
|
}
|
|
6446
6539
|
|
|
6447
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6540
|
+
/* "fontTools/cu2qu/cu2qu.py":486
|
|
6448
6541
|
*
|
|
6449
6542
|
*
|
|
6450
6543
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
|
|
@@ -6494,40 +6587,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6494
6587
|
{
|
|
6495
6588
|
PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_curves,&__pyx_mstate_global->__pyx_n_u_max_errors,&__pyx_mstate_global->__pyx_n_u_all_quadratic,0};
|
|
6496
6589
|
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
|
|
6497
|
-
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0,
|
|
6590
|
+
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 486, __pyx_L3_error)
|
|
6498
6591
|
if (__pyx_kwds_len > 0) {
|
|
6499
6592
|
switch (__pyx_nargs) {
|
|
6500
6593
|
case 3:
|
|
6501
6594
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
6502
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
6595
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 486, __pyx_L3_error)
|
|
6503
6596
|
CYTHON_FALLTHROUGH;
|
|
6504
6597
|
case 2:
|
|
6505
6598
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
6506
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
6599
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 486, __pyx_L3_error)
|
|
6507
6600
|
CYTHON_FALLTHROUGH;
|
|
6508
6601
|
case 1:
|
|
6509
6602
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
6510
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
6603
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 486, __pyx_L3_error)
|
|
6511
6604
|
CYTHON_FALLTHROUGH;
|
|
6512
6605
|
case 0: break;
|
|
6513
6606
|
default: goto __pyx_L5_argtuple_error;
|
|
6514
6607
|
}
|
|
6515
6608
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
6516
|
-
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "curves_to_quadratic", 0) < 0) __PYX_ERR(0,
|
|
6609
|
+
if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "curves_to_quadratic", 0) < 0) __PYX_ERR(0, 486, __pyx_L3_error)
|
|
6517
6610
|
for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
|
|
6518
|
-
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, i); __PYX_ERR(0,
|
|
6611
|
+
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, i); __PYX_ERR(0, 486, __pyx_L3_error) }
|
|
6519
6612
|
}
|
|
6520
6613
|
} else {
|
|
6521
6614
|
switch (__pyx_nargs) {
|
|
6522
6615
|
case 3:
|
|
6523
6616
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
6524
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
6617
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 486, __pyx_L3_error)
|
|
6525
6618
|
CYTHON_FALLTHROUGH;
|
|
6526
6619
|
case 2:
|
|
6527
6620
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
6528
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
6621
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 486, __pyx_L3_error)
|
|
6529
6622
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
6530
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
6623
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 486, __pyx_L3_error)
|
|
6531
6624
|
break;
|
|
6532
6625
|
default: goto __pyx_L5_argtuple_error;
|
|
6533
6626
|
}
|
|
@@ -6535,10 +6628,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6535
6628
|
__pyx_v_curves = values[0];
|
|
6536
6629
|
__pyx_v_max_errors = values[1];
|
|
6537
6630
|
if (values[2]) {
|
|
6538
|
-
__pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6631
|
+
__pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L3_error)
|
|
6539
6632
|
} else {
|
|
6540
6633
|
|
|
6541
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6634
|
+
/* "fontTools/cu2qu/cu2qu.py":488
|
|
6542
6635
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int)
|
|
6543
6636
|
* @cython.locals(all_quadratic=cython.int)
|
|
6544
6637
|
* def curves_to_quadratic(curves, max_errors, all_quadratic=True): # <<<<<<<<<<<<<<
|
|
@@ -6550,7 +6643,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6550
6643
|
}
|
|
6551
6644
|
goto __pyx_L6_skip;
|
|
6552
6645
|
__pyx_L5_argtuple_error:;
|
|
6553
|
-
__Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0,
|
|
6646
|
+
__Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 486, __pyx_L3_error)
|
|
6554
6647
|
__pyx_L6_skip:;
|
|
6555
6648
|
goto __pyx_L4_argument_unpacking_done;
|
|
6556
6649
|
__pyx_L3_error:;
|
|
@@ -6563,7 +6656,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6563
6656
|
__pyx_L4_argument_unpacking_done:;
|
|
6564
6657
|
__pyx_r = __pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(__pyx_self, __pyx_v_curves, __pyx_v_max_errors, __pyx_v_all_quadratic);
|
|
6565
6658
|
|
|
6566
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6659
|
+
/* "fontTools/cu2qu/cu2qu.py":486
|
|
6567
6660
|
*
|
|
6568
6661
|
*
|
|
6569
6662
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
|
|
@@ -6614,7 +6707,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6614
6707
|
__Pyx_RefNannySetupContext("curves_to_quadratic", 0);
|
|
6615
6708
|
__Pyx_INCREF(__pyx_v_curves);
|
|
6616
6709
|
|
|
6617
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6710
|
+
/* "fontTools/cu2qu/cu2qu.py":525
|
|
6618
6711
|
* """
|
|
6619
6712
|
*
|
|
6620
6713
|
* curves = [[complex(*p) for p in curve] for curve in curves] # <<<<<<<<<<<<<<
|
|
@@ -6622,16 +6715,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6622
6715
|
*
|
|
6623
6716
|
*/
|
|
6624
6717
|
{ /* enter inner scope */
|
|
6625
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6718
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L5_error)
|
|
6626
6719
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6627
6720
|
if (likely(PyList_CheckExact(__pyx_v_curves)) || PyTuple_CheckExact(__pyx_v_curves)) {
|
|
6628
6721
|
__pyx_t_2 = __pyx_v_curves; __Pyx_INCREF(__pyx_t_2);
|
|
6629
6722
|
__pyx_t_3 = 0;
|
|
6630
6723
|
__pyx_t_4 = NULL;
|
|
6631
6724
|
} else {
|
|
6632
|
-
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6725
|
+
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L5_error)
|
|
6633
6726
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6634
|
-
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
6727
|
+
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L5_error)
|
|
6635
6728
|
}
|
|
6636
6729
|
for (;;) {
|
|
6637
6730
|
if (likely(!__pyx_t_4)) {
|
|
@@ -6639,7 +6732,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6639
6732
|
{
|
|
6640
6733
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
|
|
6641
6734
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6642
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6735
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 525, __pyx_L5_error)
|
|
6643
6736
|
#endif
|
|
6644
6737
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6645
6738
|
}
|
|
@@ -6649,7 +6742,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6649
6742
|
{
|
|
6650
6743
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
|
|
6651
6744
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6652
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6745
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 525, __pyx_L5_error)
|
|
6653
6746
|
#endif
|
|
6654
6747
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6655
6748
|
}
|
|
@@ -6660,13 +6753,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6660
6753
|
#endif
|
|
6661
6754
|
++__pyx_t_3;
|
|
6662
6755
|
}
|
|
6663
|
-
if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6756
|
+
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L5_error)
|
|
6664
6757
|
} else {
|
|
6665
6758
|
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
|
|
6666
6759
|
if (unlikely(!__pyx_t_5)) {
|
|
6667
6760
|
PyObject* exc_type = PyErr_Occurred();
|
|
6668
6761
|
if (exc_type) {
|
|
6669
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
6762
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 525, __pyx_L5_error)
|
|
6670
6763
|
PyErr_Clear();
|
|
6671
6764
|
}
|
|
6672
6765
|
break;
|
|
@@ -6676,16 +6769,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6676
6769
|
__Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_curve, __pyx_t_5);
|
|
6677
6770
|
__pyx_t_5 = 0;
|
|
6678
6771
|
{ /* enter inner scope */
|
|
6679
|
-
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6772
|
+
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6680
6773
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6681
6774
|
if (likely(PyList_CheckExact(__pyx_8genexpr2__pyx_v_curve)) || PyTuple_CheckExact(__pyx_8genexpr2__pyx_v_curve)) {
|
|
6682
6775
|
__pyx_t_6 = __pyx_8genexpr2__pyx_v_curve; __Pyx_INCREF(__pyx_t_6);
|
|
6683
6776
|
__pyx_t_7 = 0;
|
|
6684
6777
|
__pyx_t_8 = NULL;
|
|
6685
6778
|
} else {
|
|
6686
|
-
__pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr2__pyx_v_curve); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
6779
|
+
__pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr2__pyx_v_curve); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6687
6780
|
__Pyx_GOTREF(__pyx_t_6);
|
|
6688
|
-
__pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
6781
|
+
__pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6689
6782
|
}
|
|
6690
6783
|
for (;;) {
|
|
6691
6784
|
if (likely(!__pyx_t_8)) {
|
|
@@ -6693,7 +6786,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6693
6786
|
{
|
|
6694
6787
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
|
|
6695
6788
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6696
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6789
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6697
6790
|
#endif
|
|
6698
6791
|
if (__pyx_t_7 >= __pyx_temp) break;
|
|
6699
6792
|
}
|
|
@@ -6703,7 +6796,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6703
6796
|
{
|
|
6704
6797
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
|
|
6705
6798
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6706
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6799
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6707
6800
|
#endif
|
|
6708
6801
|
if (__pyx_t_7 >= __pyx_temp) break;
|
|
6709
6802
|
}
|
|
@@ -6714,13 +6807,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6714
6807
|
#endif
|
|
6715
6808
|
++__pyx_t_7;
|
|
6716
6809
|
}
|
|
6717
|
-
if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
6810
|
+
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6718
6811
|
} else {
|
|
6719
6812
|
__pyx_t_9 = __pyx_t_8(__pyx_t_6);
|
|
6720
6813
|
if (unlikely(!__pyx_t_9)) {
|
|
6721
6814
|
PyObject* exc_type = PyErr_Occurred();
|
|
6722
6815
|
if (exc_type) {
|
|
6723
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
6816
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6724
6817
|
PyErr_Clear();
|
|
6725
6818
|
}
|
|
6726
6819
|
break;
|
|
@@ -6729,12 +6822,12 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6729
6822
|
__Pyx_GOTREF(__pyx_t_9);
|
|
6730
6823
|
__Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_p, __pyx_t_9);
|
|
6731
6824
|
__pyx_t_9 = 0;
|
|
6732
|
-
__pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_8genexpr3__pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
6825
|
+
__pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_8genexpr3__pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6733
6826
|
__Pyx_GOTREF(__pyx_t_9);
|
|
6734
|
-
__pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
6827
|
+
__pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6735
6828
|
__Pyx_GOTREF(__pyx_t_10);
|
|
6736
6829
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
6737
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0,
|
|
6830
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 525, __pyx_L10_error)
|
|
6738
6831
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
6739
6832
|
}
|
|
6740
6833
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
@@ -6745,7 +6838,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6745
6838
|
goto __pyx_L5_error;
|
|
6746
6839
|
__pyx_L14_exit_scope:;
|
|
6747
6840
|
} /* exit inner scope */
|
|
6748
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0,
|
|
6841
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 525, __pyx_L5_error)
|
|
6749
6842
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
6750
6843
|
}
|
|
6751
6844
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -6759,7 +6852,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6759
6852
|
__Pyx_DECREF_SET(__pyx_v_curves, __pyx_t_1);
|
|
6760
6853
|
__pyx_t_1 = 0;
|
|
6761
6854
|
|
|
6762
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6855
|
+
/* "fontTools/cu2qu/cu2qu.py":526
|
|
6763
6856
|
*
|
|
6764
6857
|
* curves = [[complex(*p) for p in curve] for curve in curves]
|
|
6765
6858
|
* assert len(max_errors) == len(curves) # <<<<<<<<<<<<<<
|
|
@@ -6768,48 +6861,48 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6768
6861
|
*/
|
|
6769
6862
|
#ifndef CYTHON_WITHOUT_ASSERTIONS
|
|
6770
6863
|
if (unlikely(__pyx_assertions_enabled())) {
|
|
6771
|
-
__pyx_t_3 = PyObject_Length(__pyx_v_max_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0,
|
|
6772
|
-
__pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0,
|
|
6864
|
+
__pyx_t_3 = PyObject_Length(__pyx_v_max_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 526, __pyx_L1_error)
|
|
6865
|
+
__pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 526, __pyx_L1_error)
|
|
6773
6866
|
__pyx_t_11 = (__pyx_t_3 == __pyx_t_7);
|
|
6774
6867
|
if (unlikely(!__pyx_t_11)) {
|
|
6775
6868
|
__Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
|
|
6776
|
-
__PYX_ERR(0,
|
|
6869
|
+
__PYX_ERR(0, 526, __pyx_L1_error)
|
|
6777
6870
|
}
|
|
6778
6871
|
}
|
|
6779
6872
|
#else
|
|
6780
|
-
if ((1)); else __PYX_ERR(0,
|
|
6873
|
+
if ((1)); else __PYX_ERR(0, 526, __pyx_L1_error)
|
|
6781
6874
|
#endif
|
|
6782
6875
|
|
|
6783
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6876
|
+
/* "fontTools/cu2qu/cu2qu.py":528
|
|
6784
6877
|
* assert len(max_errors) == len(curves)
|
|
6785
6878
|
*
|
|
6786
6879
|
* l = len(curves) # <<<<<<<<<<<<<<
|
|
6787
6880
|
* splines = [None] * l
|
|
6788
6881
|
* last_i = i = 0
|
|
6789
6882
|
*/
|
|
6790
|
-
__pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0,
|
|
6883
|
+
__pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 528, __pyx_L1_error)
|
|
6791
6884
|
__pyx_v_l = __pyx_t_7;
|
|
6792
6885
|
|
|
6793
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6886
|
+
/* "fontTools/cu2qu/cu2qu.py":529
|
|
6794
6887
|
*
|
|
6795
6888
|
* l = len(curves)
|
|
6796
6889
|
* splines = [None] * l # <<<<<<<<<<<<<<
|
|
6797
6890
|
* last_i = i = 0
|
|
6798
6891
|
* n = 1
|
|
6799
6892
|
*/
|
|
6800
|
-
__pyx_t_1 = PyList_New(1 * ((__pyx_v_l<0) ? 0:__pyx_v_l)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6893
|
+
__pyx_t_1 = PyList_New(1 * ((__pyx_v_l<0) ? 0:__pyx_v_l)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error)
|
|
6801
6894
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6802
6895
|
{ Py_ssize_t __pyx_temp;
|
|
6803
6896
|
for (__pyx_temp=0; __pyx_temp < __pyx_v_l; __pyx_temp++) {
|
|
6804
6897
|
__Pyx_INCREF(Py_None);
|
|
6805
6898
|
__Pyx_GIVEREF(Py_None);
|
|
6806
|
-
if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0,
|
|
6899
|
+
if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 529, __pyx_L1_error);
|
|
6807
6900
|
}
|
|
6808
6901
|
}
|
|
6809
6902
|
__pyx_v_splines = ((PyObject*)__pyx_t_1);
|
|
6810
6903
|
__pyx_t_1 = 0;
|
|
6811
6904
|
|
|
6812
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6905
|
+
/* "fontTools/cu2qu/cu2qu.py":530
|
|
6813
6906
|
* l = len(curves)
|
|
6814
6907
|
* splines = [None] * l
|
|
6815
6908
|
* last_i = i = 0 # <<<<<<<<<<<<<<
|
|
@@ -6819,7 +6912,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6819
6912
|
__pyx_v_last_i = 0;
|
|
6820
6913
|
__pyx_v_i = 0;
|
|
6821
6914
|
|
|
6822
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6915
|
+
/* "fontTools/cu2qu/cu2qu.py":531
|
|
6823
6916
|
* splines = [None] * l
|
|
6824
6917
|
* last_i = i = 0
|
|
6825
6918
|
* n = 1 # <<<<<<<<<<<<<<
|
|
@@ -6829,7 +6922,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6829
6922
|
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
|
|
6830
6923
|
__pyx_v_n = __pyx_mstate_global->__pyx_int_1;
|
|
6831
6924
|
|
|
6832
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6925
|
+
/* "fontTools/cu2qu/cu2qu.py":532
|
|
6833
6926
|
* last_i = i = 0
|
|
6834
6927
|
* n = 1
|
|
6835
6928
|
* while True: # <<<<<<<<<<<<<<
|
|
@@ -6838,27 +6931,27 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6838
6931
|
*/
|
|
6839
6932
|
while (1) {
|
|
6840
6933
|
|
|
6841
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6934
|
+
/* "fontTools/cu2qu/cu2qu.py":533
|
|
6842
6935
|
* n = 1
|
|
6843
6936
|
* while True:
|
|
6844
6937
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic) # <<<<<<<<<<<<<<
|
|
6845
6938
|
* if spline is None:
|
|
6846
6939
|
* if n == MAX_N:
|
|
6847
6940
|
*/
|
|
6848
|
-
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curves, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6941
|
+
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curves, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
|
|
6849
6942
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6850
|
-
__pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_n); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6851
|
-
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_max_errors, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6943
|
+
__pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_n); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 533, __pyx_L1_error)
|
|
6944
|
+
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_max_errors, __pyx_v_i, int, 1, __Pyx_PyLong_From_int, 0, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
|
|
6852
6945
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6853
|
-
__pyx_t_13 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6946
|
+
__pyx_t_13 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 533, __pyx_L1_error)
|
|
6854
6947
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6855
|
-
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(__pyx_t_1, __pyx_t_12, __pyx_t_13, __pyx_v_all_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6948
|
+
__pyx_t_2 = __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(__pyx_t_1, __pyx_t_12, __pyx_t_13, __pyx_v_all_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
|
|
6856
6949
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6857
6950
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
6858
6951
|
__Pyx_XDECREF_SET(__pyx_v_spline, __pyx_t_2);
|
|
6859
6952
|
__pyx_t_2 = 0;
|
|
6860
6953
|
|
|
6861
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6954
|
+
/* "fontTools/cu2qu/cu2qu.py":534
|
|
6862
6955
|
* while True:
|
|
6863
6956
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
|
|
6864
6957
|
* if spline is None: # <<<<<<<<<<<<<<
|
|
@@ -6868,22 +6961,22 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6868
6961
|
__pyx_t_11 = (__pyx_v_spline == Py_None);
|
|
6869
6962
|
if (__pyx_t_11) {
|
|
6870
6963
|
|
|
6871
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6964
|
+
/* "fontTools/cu2qu/cu2qu.py":535
|
|
6872
6965
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
|
|
6873
6966
|
* if spline is None:
|
|
6874
6967
|
* if n == MAX_N: # <<<<<<<<<<<<<<
|
|
6875
6968
|
* break
|
|
6876
6969
|
* n += 1
|
|
6877
6970
|
*/
|
|
6878
|
-
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6971
|
+
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error)
|
|
6879
6972
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6880
|
-
__pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6973
|
+
__pyx_t_1 = PyObject_RichCompare(__pyx_v_n, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error)
|
|
6881
6974
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6882
|
-
__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0,
|
|
6975
|
+
__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 535, __pyx_L1_error)
|
|
6883
6976
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
6884
6977
|
if (__pyx_t_11) {
|
|
6885
6978
|
|
|
6886
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6979
|
+
/* "fontTools/cu2qu/cu2qu.py":536
|
|
6887
6980
|
* if spline is None:
|
|
6888
6981
|
* if n == MAX_N:
|
|
6889
6982
|
* break # <<<<<<<<<<<<<<
|
|
@@ -6892,7 +6985,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6892
6985
|
*/
|
|
6893
6986
|
goto __pyx_L18_break;
|
|
6894
6987
|
|
|
6895
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6988
|
+
/* "fontTools/cu2qu/cu2qu.py":535
|
|
6896
6989
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
|
|
6897
6990
|
* if spline is None:
|
|
6898
6991
|
* if n == MAX_N: # <<<<<<<<<<<<<<
|
|
@@ -6901,19 +6994,19 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6901
6994
|
*/
|
|
6902
6995
|
}
|
|
6903
6996
|
|
|
6904
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6997
|
+
/* "fontTools/cu2qu/cu2qu.py":537
|
|
6905
6998
|
* if n == MAX_N:
|
|
6906
6999
|
* break
|
|
6907
7000
|
* n += 1 # <<<<<<<<<<<<<<
|
|
6908
7001
|
* last_i = i
|
|
6909
7002
|
* continue
|
|
6910
7003
|
*/
|
|
6911
|
-
__pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
7004
|
+
__pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_v_n, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error)
|
|
6912
7005
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6913
7006
|
__Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1);
|
|
6914
7007
|
__pyx_t_1 = 0;
|
|
6915
7008
|
|
|
6916
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7009
|
+
/* "fontTools/cu2qu/cu2qu.py":538
|
|
6917
7010
|
* break
|
|
6918
7011
|
* n += 1
|
|
6919
7012
|
* last_i = i # <<<<<<<<<<<<<<
|
|
@@ -6922,7 +7015,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6922
7015
|
*/
|
|
6923
7016
|
__pyx_v_last_i = __pyx_v_i;
|
|
6924
7017
|
|
|
6925
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7018
|
+
/* "fontTools/cu2qu/cu2qu.py":539
|
|
6926
7019
|
* n += 1
|
|
6927
7020
|
* last_i = i
|
|
6928
7021
|
* continue # <<<<<<<<<<<<<<
|
|
@@ -6931,7 +7024,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6931
7024
|
*/
|
|
6932
7025
|
goto __pyx_L17_continue;
|
|
6933
7026
|
|
|
6934
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7027
|
+
/* "fontTools/cu2qu/cu2qu.py":534
|
|
6935
7028
|
* while True:
|
|
6936
7029
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
|
|
6937
7030
|
* if spline is None: # <<<<<<<<<<<<<<
|
|
@@ -6940,16 +7033,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6940
7033
|
*/
|
|
6941
7034
|
}
|
|
6942
7035
|
|
|
6943
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7036
|
+
/* "fontTools/cu2qu/cu2qu.py":540
|
|
6944
7037
|
* last_i = i
|
|
6945
7038
|
* continue
|
|
6946
7039
|
* splines[i] = spline # <<<<<<<<<<<<<<
|
|
6947
7040
|
* i = (i + 1) % l
|
|
6948
7041
|
* if i == last_i:
|
|
6949
7042
|
*/
|
|
6950
|
-
if (unlikely((__Pyx_SetItemInt(__pyx_v_splines, __pyx_v_i, __pyx_v_spline, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0,
|
|
7043
|
+
if (unlikely((__Pyx_SetItemInt(__pyx_v_splines, __pyx_v_i, __pyx_v_spline, int, 1, __Pyx_PyLong_From_int, 1, 1, 1, 1) < 0))) __PYX_ERR(0, 540, __pyx_L1_error)
|
|
6951
7044
|
|
|
6952
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7045
|
+
/* "fontTools/cu2qu/cu2qu.py":541
|
|
6953
7046
|
* continue
|
|
6954
7047
|
* splines[i] = spline
|
|
6955
7048
|
* i = (i + 1) % l # <<<<<<<<<<<<<<
|
|
@@ -6959,11 +7052,11 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6959
7052
|
__pyx_t_14 = (__pyx_v_i + 1);
|
|
6960
7053
|
if (unlikely(__pyx_v_l == 0)) {
|
|
6961
7054
|
PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
|
|
6962
|
-
__PYX_ERR(0,
|
|
7055
|
+
__PYX_ERR(0, 541, __pyx_L1_error)
|
|
6963
7056
|
}
|
|
6964
7057
|
__pyx_v_i = __Pyx_mod_long(__pyx_t_14, __pyx_v_l, 0);
|
|
6965
7058
|
|
|
6966
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7059
|
+
/* "fontTools/cu2qu/cu2qu.py":542
|
|
6967
7060
|
* splines[i] = spline
|
|
6968
7061
|
* i = (i + 1) % l
|
|
6969
7062
|
* if i == last_i: # <<<<<<<<<<<<<<
|
|
@@ -6973,7 +7066,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6973
7066
|
__pyx_t_11 = (__pyx_v_i == __pyx_v_last_i);
|
|
6974
7067
|
if (__pyx_t_11) {
|
|
6975
7068
|
|
|
6976
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7069
|
+
/* "fontTools/cu2qu/cu2qu.py":544
|
|
6977
7070
|
* if i == last_i:
|
|
6978
7071
|
* # done. go home
|
|
6979
7072
|
* return [[(s.real, s.imag) for s in spline] for spline in splines] # <<<<<<<<<<<<<<
|
|
@@ -6982,7 +7075,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6982
7075
|
*/
|
|
6983
7076
|
__Pyx_XDECREF(__pyx_r);
|
|
6984
7077
|
{ /* enter inner scope */
|
|
6985
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
7078
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L24_error)
|
|
6986
7079
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6987
7080
|
__pyx_t_2 = __pyx_v_splines; __Pyx_INCREF(__pyx_t_2);
|
|
6988
7081
|
__pyx_t_7 = 0;
|
|
@@ -6990,27 +7083,27 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6990
7083
|
{
|
|
6991
7084
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
|
|
6992
7085
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6993
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
7086
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 544, __pyx_L24_error)
|
|
6994
7087
|
#endif
|
|
6995
7088
|
if (__pyx_t_7 >= __pyx_temp) break;
|
|
6996
7089
|
}
|
|
6997
7090
|
__pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_7);
|
|
6998
7091
|
++__pyx_t_7;
|
|
6999
|
-
if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7092
|
+
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L24_error)
|
|
7000
7093
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7001
7094
|
__Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_spline, __pyx_t_5);
|
|
7002
7095
|
__pyx_t_5 = 0;
|
|
7003
7096
|
{ /* enter inner scope */
|
|
7004
|
-
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7097
|
+
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7005
7098
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7006
7099
|
if (likely(PyList_CheckExact(__pyx_8genexpr4__pyx_v_spline)) || PyTuple_CheckExact(__pyx_8genexpr4__pyx_v_spline)) {
|
|
7007
7100
|
__pyx_t_6 = __pyx_8genexpr4__pyx_v_spline; __Pyx_INCREF(__pyx_t_6);
|
|
7008
7101
|
__pyx_t_3 = 0;
|
|
7009
7102
|
__pyx_t_4 = NULL;
|
|
7010
7103
|
} else {
|
|
7011
|
-
__pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr4__pyx_v_spline); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
7104
|
+
__pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr4__pyx_v_spline); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7012
7105
|
__Pyx_GOTREF(__pyx_t_6);
|
|
7013
|
-
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
7106
|
+
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7014
7107
|
}
|
|
7015
7108
|
for (;;) {
|
|
7016
7109
|
if (likely(!__pyx_t_4)) {
|
|
@@ -7018,7 +7111,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7018
7111
|
{
|
|
7019
7112
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
|
|
7020
7113
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
7021
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
7114
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7022
7115
|
#endif
|
|
7023
7116
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
7024
7117
|
}
|
|
@@ -7028,7 +7121,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7028
7121
|
{
|
|
7029
7122
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
|
|
7030
7123
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
7031
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
7124
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7032
7125
|
#endif
|
|
7033
7126
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
7034
7127
|
}
|
|
@@ -7039,13 +7132,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7039
7132
|
#endif
|
|
7040
7133
|
++__pyx_t_3;
|
|
7041
7134
|
}
|
|
7042
|
-
if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
7135
|
+
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7043
7136
|
} else {
|
|
7044
7137
|
__pyx_t_10 = __pyx_t_4(__pyx_t_6);
|
|
7045
7138
|
if (unlikely(!__pyx_t_10)) {
|
|
7046
7139
|
PyObject* exc_type = PyErr_Occurred();
|
|
7047
7140
|
if (exc_type) {
|
|
7048
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
7141
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7049
7142
|
PyErr_Clear();
|
|
7050
7143
|
}
|
|
7051
7144
|
break;
|
|
@@ -7054,19 +7147,19 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7054
7147
|
__Pyx_GOTREF(__pyx_t_10);
|
|
7055
7148
|
__Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_s, __pyx_t_10);
|
|
7056
7149
|
__pyx_t_10 = 0;
|
|
7057
|
-
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_s, __pyx_mstate_global->__pyx_n_u_real); if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
7150
|
+
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_s, __pyx_mstate_global->__pyx_n_u_real); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7058
7151
|
__Pyx_GOTREF(__pyx_t_10);
|
|
7059
|
-
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_s, __pyx_mstate_global->__pyx_n_u_imag); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
7152
|
+
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr5__pyx_v_s, __pyx_mstate_global->__pyx_n_u_imag); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7060
7153
|
__Pyx_GOTREF(__pyx_t_9);
|
|
7061
|
-
__pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0,
|
|
7154
|
+
__pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7062
7155
|
__Pyx_GOTREF(__pyx_t_15);
|
|
7063
7156
|
__Pyx_GIVEREF(__pyx_t_10);
|
|
7064
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10) != (0)) __PYX_ERR(0,
|
|
7157
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 544, __pyx_L29_error);
|
|
7065
7158
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
7066
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_9) != (0)) __PYX_ERR(0,
|
|
7159
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 544, __pyx_L29_error);
|
|
7067
7160
|
__pyx_t_10 = 0;
|
|
7068
7161
|
__pyx_t_9 = 0;
|
|
7069
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_15))) __PYX_ERR(0,
|
|
7162
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_15))) __PYX_ERR(0, 544, __pyx_L29_error)
|
|
7070
7163
|
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
7071
7164
|
}
|
|
7072
7165
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
@@ -7077,7 +7170,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7077
7170
|
goto __pyx_L24_error;
|
|
7078
7171
|
__pyx_L33_exit_scope:;
|
|
7079
7172
|
} /* exit inner scope */
|
|
7080
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0,
|
|
7173
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 544, __pyx_L24_error)
|
|
7081
7174
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7082
7175
|
}
|
|
7083
7176
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -7092,7 +7185,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7092
7185
|
__pyx_t_1 = 0;
|
|
7093
7186
|
goto __pyx_L0;
|
|
7094
7187
|
|
|
7095
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7188
|
+
/* "fontTools/cu2qu/cu2qu.py":542
|
|
7096
7189
|
* splines[i] = spline
|
|
7097
7190
|
* i = (i + 1) % l
|
|
7098
7191
|
* if i == last_i: # <<<<<<<<<<<<<<
|
|
@@ -7104,13 +7197,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7104
7197
|
}
|
|
7105
7198
|
__pyx_L18_break:;
|
|
7106
7199
|
|
|
7107
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7200
|
+
/* "fontTools/cu2qu/cu2qu.py":546
|
|
7108
7201
|
* return [[(s.real, s.imag) for s in spline] for spline in splines]
|
|
7109
7202
|
*
|
|
7110
7203
|
* raise ApproxNotFoundError(curves) # <<<<<<<<<<<<<<
|
|
7111
7204
|
*/
|
|
7112
7205
|
__pyx_t_2 = NULL;
|
|
7113
|
-
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7206
|
+
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 546, __pyx_L1_error)
|
|
7114
7207
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7115
7208
|
__pyx_t_16 = 1;
|
|
7116
7209
|
#if CYTHON_UNPACK_METHODS
|
|
@@ -7129,14 +7222,14 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7129
7222
|
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
7130
7223
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
7131
7224
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7132
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
7225
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
|
|
7133
7226
|
__Pyx_GOTREF(__pyx_t_1);
|
|
7134
7227
|
}
|
|
7135
7228
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
7136
7229
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
7137
|
-
__PYX_ERR(0,
|
|
7230
|
+
__PYX_ERR(0, 546, __pyx_L1_error)
|
|
7138
7231
|
|
|
7139
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7232
|
+
/* "fontTools/cu2qu/cu2qu.py":486
|
|
7140
7233
|
*
|
|
7141
7234
|
*
|
|
7142
7235
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
|
|
@@ -7362,15 +7455,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
7362
7455
|
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
|
|
7363
7456
|
/*--- Type init code ---*/
|
|
7364
7457
|
#if CYTHON_USE_TYPE_SPECS
|
|
7365
|
-
__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen)) __PYX_ERR(0,
|
|
7366
|
-
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen_spec, __pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0,
|
|
7458
|
+
__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen)) __PYX_ERR(0, 133, __pyx_L1_error)
|
|
7459
|
+
if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen_spec, __pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
|
|
7367
7460
|
#else
|
|
7368
7461
|
__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen = &__pyx_type_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen;
|
|
7369
7462
|
#endif
|
|
7370
7463
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
7371
7464
|
#endif
|
|
7372
7465
|
#if !CYTHON_USE_TYPE_SPECS
|
|
7373
|
-
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0,
|
|
7466
|
+
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
|
|
7374
7467
|
#endif
|
|
7375
7468
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
7376
7469
|
if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen->tp_dictoffset && __pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen->tp_getattro == PyObject_GenericGetAttr)) {
|
|
@@ -7795,70 +7888,70 @@ __Pyx_RefNannySetupContext("PyInit_cu2qu", 0);
|
|
|
7795
7888
|
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NAN, __pyx_t_5) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
|
|
7796
7889
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7797
7890
|
|
|
7798
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7891
|
+
/* "fontTools/cu2qu/cu2qu.py":133
|
|
7799
7892
|
*
|
|
7800
7893
|
*
|
|
7801
7894
|
* @cython.locals( # <<<<<<<<<<<<<<
|
|
7802
7895
|
* p0=cython.complex,
|
|
7803
7896
|
* p1=cython.complex,
|
|
7804
7897
|
*/
|
|
7805
|
-
__pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_1_split_cubic_into_n_gen, 0, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7898
|
+
__pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_1_split_cubic_into_n_gen, 0, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __pyx_L1_error)
|
|
7806
7899
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7807
|
-
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_t_5) < 0) __PYX_ERR(0,
|
|
7900
|
+
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen, __pyx_t_5) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
|
|
7808
7901
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7809
7902
|
|
|
7810
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7903
|
+
/* "fontTools/cu2qu/cu2qu.py":454
|
|
7811
7904
|
* @cython.locals(n=cython.int)
|
|
7812
7905
|
* @cython.locals(all_quadratic=cython.int)
|
|
7813
7906
|
* def curve_to_quadratic(curve, max_err, all_quadratic=True): # <<<<<<<<<<<<<<
|
|
7814
7907
|
* """Approximate a cubic Bezier curve with a spline of n quadratics.
|
|
7815
7908
|
*
|
|
7816
7909
|
*/
|
|
7817
|
-
__pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7910
|
+
__pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error)
|
|
7818
7911
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7819
7912
|
|
|
7820
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7913
|
+
/* "fontTools/cu2qu/cu2qu.py":451
|
|
7821
7914
|
*
|
|
7822
7915
|
*
|
|
7823
7916
|
* @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
|
|
7824
7917
|
* @cython.locals(n=cython.int)
|
|
7825
7918
|
* @cython.locals(all_quadratic=cython.int)
|
|
7826
7919
|
*/
|
|
7827
|
-
__pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
7920
|
+
__pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
|
|
7828
7921
|
__Pyx_GOTREF(__pyx_t_4);
|
|
7829
7922
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7830
|
-
__pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_4curve_to_quadratic, 0, __pyx_mstate_global->__pyx_n_u_curve_to_quadratic, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7923
|
+
__pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_4curve_to_quadratic, 0, __pyx_mstate_global->__pyx_n_u_curve_to_quadratic, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 451, __pyx_L1_error)
|
|
7831
7924
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7832
7925
|
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4);
|
|
7833
7926
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
7834
|
-
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curve_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0,
|
|
7927
|
+
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curve_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0, 451, __pyx_L1_error)
|
|
7835
7928
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7836
7929
|
|
|
7837
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7930
|
+
/* "fontTools/cu2qu/cu2qu.py":488
|
|
7838
7931
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int)
|
|
7839
7932
|
* @cython.locals(all_quadratic=cython.int)
|
|
7840
7933
|
* def curves_to_quadratic(curves, max_errors, all_quadratic=True): # <<<<<<<<<<<<<<
|
|
7841
7934
|
* """Return quadratic Bezier splines approximating the input cubic Beziers.
|
|
7842
7935
|
*
|
|
7843
7936
|
*/
|
|
7844
|
-
__pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7937
|
+
__pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error)
|
|
7845
7938
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7846
7939
|
|
|
7847
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7940
|
+
/* "fontTools/cu2qu/cu2qu.py":486
|
|
7848
7941
|
*
|
|
7849
7942
|
*
|
|
7850
7943
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
|
|
7851
7944
|
* @cython.locals(all_quadratic=cython.int)
|
|
7852
7945
|
* def curves_to_quadratic(curves, max_errors, all_quadratic=True):
|
|
7853
7946
|
*/
|
|
7854
|
-
__pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
7947
|
+
__pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error)
|
|
7855
7948
|
__Pyx_GOTREF(__pyx_t_4);
|
|
7856
7949
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7857
|
-
__pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_6curves_to_quadratic, 0, __pyx_mstate_global->__pyx_n_u_curves_to_quadratic, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7950
|
+
__pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9fontTools_5cu2qu_5cu2qu_6curves_to_quadratic, 0, __pyx_mstate_global->__pyx_n_u_curves_to_quadratic, NULL, __pyx_mstate_global->__pyx_n_u_fontTools_cu2qu_cu2qu, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error)
|
|
7858
7951
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7859
7952
|
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4);
|
|
7860
7953
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
7861
|
-
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curves_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0,
|
|
7954
|
+
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curves_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
|
|
7862
7955
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7863
7956
|
|
|
7864
7957
|
/* "fontTools/cu2qu/cu2qu.py":1
|
|
@@ -7868,7 +7961,7 @@ __Pyx_RefNannySetupContext("PyInit_cu2qu", 0);
|
|
|
7868
7961
|
*/
|
|
7869
7962
|
__pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7870
7963
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7871
|
-
if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->
|
|
7964
|
+
if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_curves_to_quadratic_line_486, __pyx_mstate_global->__pyx_kp_u_Return_quadratic_Bezier_splines) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7872
7965
|
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7873
7966
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7874
7967
|
|
|
@@ -7961,7 +8054,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|
|
7961
8054
|
{__pyx_k_curve_to_quadratic, sizeof(__pyx_k_curve_to_quadratic), 0, 1, 1}, /* PyObject cname: __pyx_n_u_curve_to_quadratic */
|
|
7962
8055
|
{__pyx_k_curves, sizeof(__pyx_k_curves), 0, 1, 1}, /* PyObject cname: __pyx_n_u_curves */
|
|
7963
8056
|
{__pyx_k_curves_to_quadratic, sizeof(__pyx_k_curves_to_quadratic), 0, 1, 1}, /* PyObject cname: __pyx_n_u_curves_to_quadratic */
|
|
7964
|
-
{
|
|
8057
|
+
{__pyx_k_curves_to_quadratic_line_486, sizeof(__pyx_k_curves_to_quadratic_line_486), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_curves_to_quadratic_line_486 */
|
|
7965
8058
|
{__pyx_k_d, sizeof(__pyx_k_d), 0, 1, 1}, /* PyObject cname: __pyx_n_u_d */
|
|
7966
8059
|
{__pyx_k_d1, sizeof(__pyx_k_d1), 0, 1, 1}, /* PyObject cname: __pyx_n_u_d1 */
|
|
7967
8060
|
{__pyx_k_delta_2, sizeof(__pyx_k_delta_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_delta_2 */
|
|
@@ -8021,9 +8114,9 @@ static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
|
|
|
8021
8114
|
CYTHON_UNUSED_VAR(__pyx_mstate);
|
|
8022
8115
|
__pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 20, __pyx_L1_error)
|
|
8023
8116
|
__pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 20, __pyx_L1_error)
|
|
8024
|
-
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0,
|
|
8025
|
-
__pyx_builtin_ZeroDivisionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ZeroDivisionError); if (!__pyx_builtin_ZeroDivisionError) __PYX_ERR(0,
|
|
8026
|
-
__pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0,
|
|
8117
|
+
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 152, __pyx_L1_error)
|
|
8118
|
+
__pyx_builtin_ZeroDivisionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ZeroDivisionError); if (!__pyx_builtin_ZeroDivisionError) __PYX_ERR(0, 284, __pyx_L1_error)
|
|
8119
|
+
__pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 526, __pyx_L1_error)
|
|
8027
8120
|
return 0;
|
|
8028
8121
|
__pyx_L1_error:;
|
|
8029
8122
|
return -1;
|
|
@@ -8079,17 +8172,17 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
|
|
|
8079
8172
|
PyObject* tuple_dedup_map = PyDict_New();
|
|
8080
8173
|
if (unlikely(!tuple_dedup_map)) return -1;
|
|
8081
8174
|
{
|
|
8082
|
-
const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 19, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR),
|
|
8175
|
+
const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 19, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 133, 2};
|
|
8083
8176
|
PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p0, __pyx_mstate->__pyx_n_u_p1, __pyx_mstate->__pyx_n_u_p2, __pyx_mstate->__pyx_n_u_p3, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_a1, __pyx_mstate->__pyx_n_u_b1, __pyx_mstate->__pyx_n_u_c1, __pyx_mstate->__pyx_n_u_d1, __pyx_mstate->__pyx_n_u_dt, __pyx_mstate->__pyx_n_u_delta_2, __pyx_mstate->__pyx_n_u_delta_3, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_c, __pyx_mstate->__pyx_n_u_d, __pyx_mstate->__pyx_n_u_t1, __pyx_mstate->__pyx_n_u_t1_2};
|
|
8084
8177
|
__pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_cu2qu_cu2qu_py, __pyx_mstate->__pyx_n_u_split_cubic_into_n_gen, __pyx_k__3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad;
|
|
8085
8178
|
}
|
|
8086
8179
|
{
|
|
8087
|
-
const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS),
|
|
8180
|
+
const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 451, 97};
|
|
8088
8181
|
PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_max_err, __pyx_mstate->__pyx_n_u_all_quadratic, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_spline, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_s};
|
|
8089
8182
|
__pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_cu2qu_cu2qu_py, __pyx_mstate->__pyx_n_u_curve_to_quadratic, __pyx_k_AWBc_U_U_3fBa_AWCy_7_2QgQgT_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad;
|
|
8090
8183
|
}
|
|
8091
8184
|
{
|
|
8092
|
-
const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS),
|
|
8185
|
+
const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 486, 211};
|
|
8093
8186
|
PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_curves, __pyx_mstate->__pyx_n_u_max_errors, __pyx_mstate->__pyx_n_u_all_quadratic, __pyx_mstate->__pyx_n_u_l, __pyx_mstate->__pyx_n_u_last_i, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_splines, __pyx_mstate->__pyx_n_u_n, __pyx_mstate->__pyx_n_u_spline, __pyx_mstate->__pyx_n_u_curve, __pyx_mstate->__pyx_n_u_p, __pyx_mstate->__pyx_n_u_spline, __pyx_mstate->__pyx_n_u_s};
|
|
8094
8187
|
__pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_Lib_fontTools_cu2qu_cu2qu_py, __pyx_mstate->__pyx_n_u_curves_to_quadratic, __pyx_k_J_Qawb_4uG4y_3a_3c_1A_avRq_T_AV, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad;
|
|
8095
8188
|
}
|