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