fonttools 4.59.2__cp312-cp312-macosx_10_13_universal2.whl → 4.60.0__cp312-cp312-macosx_10_13_universal2.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/annotations.py +30 -0
- fontTools/cu2qu/cu2qu.c +1057 -937
- fontTools/cu2qu/cu2qu.cpython-312-darwin.so +0 -0
- fontTools/cu2qu/cu2qu.py +19 -2
- fontTools/feaLib/lexer.c +8 -3
- fontTools/feaLib/lexer.cpython-312-darwin.so +0 -0
- fontTools/misc/bezierTools.c +8 -3
- fontTools/misc/bezierTools.cpython-312-darwin.so +0 -0
- fontTools/misc/enumTools.py +23 -0
- fontTools/pens/filterPen.py +218 -26
- fontTools/pens/momentsPen.c +8 -3
- fontTools/pens/momentsPen.cpython-312-darwin.so +0 -0
- fontTools/pens/pointPen.py +40 -6
- fontTools/qu2cu/qu2cu.c +20 -7
- fontTools/qu2cu/qu2cu.cpython-312-darwin.so +0 -0
- fontTools/ttLib/tables/_p_o_s_t.py +5 -5
- fontTools/ufoLib/__init__.py +279 -176
- fontTools/ufoLib/converters.py +14 -5
- fontTools/ufoLib/filenames.py +16 -6
- fontTools/ufoLib/glifLib.py +286 -190
- fontTools/ufoLib/kerning.py +32 -12
- fontTools/ufoLib/utils.py +41 -13
- fontTools/ufoLib/validators.py +121 -97
- fontTools/varLib/avar/__init__.py +0 -0
- fontTools/varLib/avar/__main__.py +72 -0
- fontTools/varLib/avar/build.py +79 -0
- fontTools/varLib/avar/map.py +108 -0
- fontTools/varLib/avar/plan.py +1004 -0
- fontTools/varLib/{avar.py → avar/unbuild.py} +70 -59
- fontTools/varLib/avarPlanner.py +3 -999
- fontTools/varLib/interpolatableHelpers.py +3 -0
- fontTools/varLib/iup.c +14 -5
- fontTools/varLib/iup.cpython-312-darwin.so +0 -0
- {fonttools-4.59.2.dist-info → fonttools-4.60.0.dist-info}/METADATA +29 -2
- {fonttools-4.59.2.dist-info → fonttools-4.60.0.dist-info}/RECORD +42 -35
- {fonttools-4.59.2.data → fonttools-4.60.0.data}/data/share/man/man1/ttx.1 +0 -0
- {fonttools-4.59.2.dist-info → fonttools-4.60.0.dist-info}/WHEEL +0 -0
- {fonttools-4.59.2.dist-info → fonttools-4.60.0.dist-info}/entry_points.txt +0 -0
- {fonttools-4.59.2.dist-info → fonttools-4.60.0.dist-info}/licenses/LICENSE +0 -0
- {fonttools-4.59.2.dist-info → fonttools-4.60.0.dist-info}/licenses/LICENSE.external +0 -0
- {fonttools-4.59.2.dist-info → fonttools-4.60.0.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.4 */
|
|
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_4"
|
|
36
|
+
#define CYTHON_HEX_VERSION 0x030104F0
|
|
37
37
|
#define CYTHON_FUTURE_DIVISION 1
|
|
38
38
|
/* CModulePreamble */
|
|
39
39
|
#include <stddef.h>
|
|
@@ -1546,7 +1546,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do
|
|
|
1546
1546
|
/*--- Type declarations ---*/
|
|
1547
1547
|
struct __pyx_obj_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen;
|
|
1548
1548
|
|
|
1549
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
1549
|
+
/* "fontTools/cu2qu/cu2qu.py":150
|
|
1550
1550
|
*
|
|
1551
1551
|
*
|
|
1552
1552
|
* @cython.locals( # <<<<<<<<<<<<<<
|
|
@@ -1722,6 +1722,51 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name);
|
|
|
1722
1722
|
/* IncludeStdlibH.proto */
|
|
1723
1723
|
#include <stdlib.h>
|
|
1724
1724
|
|
|
1725
|
+
/* PyFunctionFastCall.proto */
|
|
1726
|
+
#if CYTHON_FAST_PYCALL
|
|
1727
|
+
#if !CYTHON_VECTORCALL
|
|
1728
|
+
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
|
|
1729
|
+
__Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
|
|
1730
|
+
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs);
|
|
1731
|
+
#endif
|
|
1732
|
+
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
|
|
1733
|
+
(sizeof(char [1 - 2*!(cond)]) - 1)
|
|
1734
|
+
#ifndef Py_MEMBER_SIZE
|
|
1735
|
+
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
|
|
1736
|
+
#endif
|
|
1737
|
+
#if !CYTHON_VECTORCALL
|
|
1738
|
+
#if PY_VERSION_HEX >= 0x03080000
|
|
1739
|
+
#include "frameobject.h"
|
|
1740
|
+
#define __Pxy_PyFrame_Initialize_Offsets()
|
|
1741
|
+
#define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
|
|
1742
|
+
#else
|
|
1743
|
+
static size_t __pyx_pyframe_localsplus_offset = 0;
|
|
1744
|
+
#include "frameobject.h"
|
|
1745
|
+
#define __Pxy_PyFrame_Initialize_Offsets()\
|
|
1746
|
+
((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
|
|
1747
|
+
(void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
|
|
1748
|
+
#define __Pyx_PyFrame_GetLocalsplus(frame)\
|
|
1749
|
+
(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
|
|
1750
|
+
#endif
|
|
1751
|
+
#endif
|
|
1752
|
+
#endif
|
|
1753
|
+
|
|
1754
|
+
/* PyObjectCall.proto */
|
|
1755
|
+
#if CYTHON_COMPILING_IN_CPYTHON
|
|
1756
|
+
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
|
|
1757
|
+
#else
|
|
1758
|
+
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
|
|
1759
|
+
#endif
|
|
1760
|
+
|
|
1761
|
+
/* PyObjectCallMethO.proto */
|
|
1762
|
+
#if CYTHON_COMPILING_IN_CPYTHON
|
|
1763
|
+
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
|
|
1764
|
+
#endif
|
|
1765
|
+
|
|
1766
|
+
/* PyObjectFastCall.proto */
|
|
1767
|
+
#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
|
|
1768
|
+
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);
|
|
1769
|
+
|
|
1725
1770
|
/* PyLongCompare.proto */
|
|
1726
1771
|
static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
|
|
1727
1772
|
|
|
@@ -1806,51 +1851,6 @@ static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_ve
|
|
|
1806
1851
|
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
|
|
1807
1852
|
#endif
|
|
1808
1853
|
|
|
1809
|
-
/* PyFunctionFastCall.proto */
|
|
1810
|
-
#if CYTHON_FAST_PYCALL
|
|
1811
|
-
#if !CYTHON_VECTORCALL
|
|
1812
|
-
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
|
|
1813
|
-
__Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
|
|
1814
|
-
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs);
|
|
1815
|
-
#endif
|
|
1816
|
-
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
|
|
1817
|
-
(sizeof(char [1 - 2*!(cond)]) - 1)
|
|
1818
|
-
#ifndef Py_MEMBER_SIZE
|
|
1819
|
-
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
|
|
1820
|
-
#endif
|
|
1821
|
-
#if !CYTHON_VECTORCALL
|
|
1822
|
-
#if PY_VERSION_HEX >= 0x03080000
|
|
1823
|
-
#include "frameobject.h"
|
|
1824
|
-
#define __Pxy_PyFrame_Initialize_Offsets()
|
|
1825
|
-
#define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
|
|
1826
|
-
#else
|
|
1827
|
-
static size_t __pyx_pyframe_localsplus_offset = 0;
|
|
1828
|
-
#include "frameobject.h"
|
|
1829
|
-
#define __Pxy_PyFrame_Initialize_Offsets()\
|
|
1830
|
-
((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
|
|
1831
|
-
(void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
|
|
1832
|
-
#define __Pyx_PyFrame_GetLocalsplus(frame)\
|
|
1833
|
-
(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
|
|
1834
|
-
#endif
|
|
1835
|
-
#endif
|
|
1836
|
-
#endif
|
|
1837
|
-
|
|
1838
|
-
/* PyObjectCall.proto */
|
|
1839
|
-
#if CYTHON_COMPILING_IN_CPYTHON
|
|
1840
|
-
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
|
|
1841
|
-
#else
|
|
1842
|
-
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
|
|
1843
|
-
#endif
|
|
1844
|
-
|
|
1845
|
-
/* PyObjectCallMethO.proto */
|
|
1846
|
-
#if CYTHON_COMPILING_IN_CPYTHON
|
|
1847
|
-
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
|
|
1848
|
-
#endif
|
|
1849
|
-
|
|
1850
|
-
/* PyObjectFastCall.proto */
|
|
1851
|
-
#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
|
|
1852
|
-
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs);
|
|
1853
|
-
|
|
1854
1854
|
/* TupleAndListFromArray.proto */
|
|
1855
1855
|
#if CYTHON_COMPILING_IN_CPYTHON
|
|
1856
1856
|
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
|
|
@@ -2768,6 +2768,7 @@ static int __Pyx_State_RemoveModule(void*);
|
|
|
2768
2768
|
|
|
2769
2769
|
/* Module declarations from "fontTools.cu2qu.cu2qu" */
|
|
2770
2770
|
static CYTHON_INLINE double __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_t_double_complex, __pyx_t_double_complex); /*proto*/
|
|
2771
|
+
static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu__complex_div_by_real(__pyx_t_double_complex, double); /*proto*/
|
|
2771
2772
|
static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_points(__pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex); /*proto*/
|
|
2772
2773
|
static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_parameters(__pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex); /*proto*/
|
|
2773
2774
|
static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into_n_iter(__pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex, __pyx_t_double_complex, PyObject *); /*proto*/
|
|
@@ -2870,7 +2871,7 @@ static const char __pyx_k_curves_to_quadratic[] = "curves_to_quadratic";
|
|
|
2870
2871
|
static const char __pyx_k_fontTools_cu2qu_cu2qu[] = "fontTools.cu2qu.cu2qu";
|
|
2871
2872
|
static const char __pyx_k_split_cubic_into_n_gen[] = "_split_cubic_into_n_gen";
|
|
2872
2873
|
static const char __pyx_k_Lib_fontTools_cu2qu_cu2qu_py[] = "Lib/fontTools/cu2qu/cu2qu.py";
|
|
2873
|
-
static const char
|
|
2874
|
+
static const char __pyx_k_curves_to_quadratic_line_503[] = "curves_to_quadratic (line 503)";
|
|
2874
2875
|
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";
|
|
2875
2876
|
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";
|
|
2876
2877
|
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 ";
|
|
@@ -3005,7 +3006,7 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati
|
|
|
3005
3006
|
#define __pyx_n_u_curve_to_quadratic __pyx_string_tab[27]
|
|
3006
3007
|
#define __pyx_n_u_curves __pyx_string_tab[28]
|
|
3007
3008
|
#define __pyx_n_u_curves_to_quadratic __pyx_string_tab[29]
|
|
3008
|
-
#define
|
|
3009
|
+
#define __pyx_kp_u_curves_to_quadratic_line_503 __pyx_string_tab[30]
|
|
3009
3010
|
#define __pyx_n_u_d __pyx_string_tab[31]
|
|
3010
3011
|
#define __pyx_n_u_d1 __pyx_string_tab[32]
|
|
3011
3012
|
#define __pyx_n_u_delta_2 __pyx_string_tab[33]
|
|
@@ -3196,6 +3197,112 @@ static CYTHON_INLINE double __pyx_f_9fontTools_5cu2qu_5cu2qu_dot(__pyx_t_double_
|
|
|
3196
3197
|
}
|
|
3197
3198
|
|
|
3198
3199
|
/* "fontTools/cu2qu/cu2qu.py":63
|
|
3200
|
+
*
|
|
3201
|
+
*
|
|
3202
|
+
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
3203
|
+
* @cython.locals(z=cython.complex, den=cython.double)
|
|
3204
|
+
* @cython.locals(zr=cython.double, zi=cython.double)
|
|
3205
|
+
*/
|
|
3206
|
+
|
|
3207
|
+
static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu__complex_div_by_real(__pyx_t_double_complex __pyx_v_z, double __pyx_v_den) {
|
|
3208
|
+
double __pyx_v_zr;
|
|
3209
|
+
double __pyx_v_zi;
|
|
3210
|
+
PyObject *__pyx_r = NULL;
|
|
3211
|
+
__Pyx_RefNannyDeclarations
|
|
3212
|
+
double __pyx_t_1;
|
|
3213
|
+
PyObject *__pyx_t_2 = NULL;
|
|
3214
|
+
PyObject *__pyx_t_3 = NULL;
|
|
3215
|
+
PyObject *__pyx_t_4 = NULL;
|
|
3216
|
+
PyObject *__pyx_t_5 = NULL;
|
|
3217
|
+
PyObject *__pyx_t_6 = NULL;
|
|
3218
|
+
size_t __pyx_t_7;
|
|
3219
|
+
int __pyx_lineno = 0;
|
|
3220
|
+
const char *__pyx_filename = NULL;
|
|
3221
|
+
int __pyx_clineno = 0;
|
|
3222
|
+
__Pyx_RefNannySetupContext("_complex_div_by_real", 0);
|
|
3223
|
+
|
|
3224
|
+
/* "fontTools/cu2qu/cu2qu.py":75
|
|
3225
|
+
* https://github.com/fonttools/fonttools/issues/3928
|
|
3226
|
+
* """
|
|
3227
|
+
* zr = z.real # <<<<<<<<<<<<<<
|
|
3228
|
+
* zi = z.imag
|
|
3229
|
+
* return complex(zr / den, zi / den)
|
|
3230
|
+
*/
|
|
3231
|
+
__pyx_t_1 = __Pyx_CREAL(__pyx_v_z);
|
|
3232
|
+
__pyx_v_zr = __pyx_t_1;
|
|
3233
|
+
|
|
3234
|
+
/* "fontTools/cu2qu/cu2qu.py":76
|
|
3235
|
+
* """
|
|
3236
|
+
* zr = z.real
|
|
3237
|
+
* zi = z.imag # <<<<<<<<<<<<<<
|
|
3238
|
+
* return complex(zr / den, zi / den)
|
|
3239
|
+
*
|
|
3240
|
+
*/
|
|
3241
|
+
__pyx_t_1 = __Pyx_CIMAG(__pyx_v_z);
|
|
3242
|
+
__pyx_v_zi = __pyx_t_1;
|
|
3243
|
+
|
|
3244
|
+
/* "fontTools/cu2qu/cu2qu.py":77
|
|
3245
|
+
* zr = z.real
|
|
3246
|
+
* zi = z.imag
|
|
3247
|
+
* return complex(zr / den, zi / den) # <<<<<<<<<<<<<<
|
|
3248
|
+
*
|
|
3249
|
+
*
|
|
3250
|
+
*/
|
|
3251
|
+
__Pyx_XDECREF(__pyx_r);
|
|
3252
|
+
__pyx_t_3 = NULL;
|
|
3253
|
+
__Pyx_INCREF((PyObject *)(&PyComplex_Type));
|
|
3254
|
+
__pyx_t_4 = ((PyObject *)(&PyComplex_Type));
|
|
3255
|
+
if (unlikely(__pyx_v_den == 0)) {
|
|
3256
|
+
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
3257
|
+
__PYX_ERR(0, 77, __pyx_L1_error)
|
|
3258
|
+
}
|
|
3259
|
+
__pyx_t_5 = PyFloat_FromDouble((__pyx_v_zr / __pyx_v_den)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error)
|
|
3260
|
+
__Pyx_GOTREF(__pyx_t_5);
|
|
3261
|
+
if (unlikely(__pyx_v_den == 0)) {
|
|
3262
|
+
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
3263
|
+
__PYX_ERR(0, 77, __pyx_L1_error)
|
|
3264
|
+
}
|
|
3265
|
+
__pyx_t_6 = PyFloat_FromDouble((__pyx_v_zi / __pyx_v_den)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error)
|
|
3266
|
+
__Pyx_GOTREF(__pyx_t_6);
|
|
3267
|
+
__pyx_t_7 = 1;
|
|
3268
|
+
{
|
|
3269
|
+
PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_5, __pyx_t_6};
|
|
3270
|
+
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
|
|
3271
|
+
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3272
|
+
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
3273
|
+
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
3274
|
+
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3275
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
|
|
3276
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
3277
|
+
}
|
|
3278
|
+
__pyx_r = __pyx_t_2;
|
|
3279
|
+
__pyx_t_2 = 0;
|
|
3280
|
+
goto __pyx_L0;
|
|
3281
|
+
|
|
3282
|
+
/* "fontTools/cu2qu/cu2qu.py":63
|
|
3283
|
+
*
|
|
3284
|
+
*
|
|
3285
|
+
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
3286
|
+
* @cython.locals(z=cython.complex, den=cython.double)
|
|
3287
|
+
* @cython.locals(zr=cython.double, zi=cython.double)
|
|
3288
|
+
*/
|
|
3289
|
+
|
|
3290
|
+
/* function exit code */
|
|
3291
|
+
__pyx_L1_error:;
|
|
3292
|
+
__Pyx_XDECREF(__pyx_t_2);
|
|
3293
|
+
__Pyx_XDECREF(__pyx_t_3);
|
|
3294
|
+
__Pyx_XDECREF(__pyx_t_4);
|
|
3295
|
+
__Pyx_XDECREF(__pyx_t_5);
|
|
3296
|
+
__Pyx_XDECREF(__pyx_t_6);
|
|
3297
|
+
__Pyx_AddTraceback("fontTools.cu2qu.cu2qu._complex_div_by_real", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3298
|
+
__pyx_r = 0;
|
|
3299
|
+
__pyx_L0:;
|
|
3300
|
+
__Pyx_XGIVEREF(__pyx_r);
|
|
3301
|
+
__Pyx_RefNannyFinishContext();
|
|
3302
|
+
return __pyx_r;
|
|
3303
|
+
}
|
|
3304
|
+
|
|
3305
|
+
/* "fontTools/cu2qu/cu2qu.py":80
|
|
3199
3306
|
*
|
|
3200
3307
|
*
|
|
3201
3308
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3210,100 +3317,108 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3210
3317
|
__pyx_t_double_complex __pyx_v__4;
|
|
3211
3318
|
PyObject *__pyx_r = NULL;
|
|
3212
3319
|
__Pyx_RefNannyDeclarations
|
|
3213
|
-
|
|
3214
|
-
|
|
3320
|
+
PyObject *__pyx_t_1 = NULL;
|
|
3321
|
+
PyObject *__pyx_t_2 = NULL;
|
|
3215
3322
|
PyObject *__pyx_t_3 = NULL;
|
|
3216
|
-
|
|
3323
|
+
__pyx_t_double_complex __pyx_t_4;
|
|
3217
3324
|
PyObject *__pyx_t_5 = NULL;
|
|
3218
3325
|
PyObject *__pyx_t_6 = NULL;
|
|
3219
|
-
PyObject *__pyx_t_7 = NULL;
|
|
3220
3326
|
int __pyx_lineno = 0;
|
|
3221
3327
|
const char *__pyx_filename = NULL;
|
|
3222
3328
|
int __pyx_clineno = 0;
|
|
3223
3329
|
__Pyx_RefNannySetupContext("calc_cubic_points", 0);
|
|
3224
3330
|
|
|
3225
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3331
|
+
/* "fontTools/cu2qu/cu2qu.py":87
|
|
3226
3332
|
* )
|
|
3227
3333
|
* def calc_cubic_points(a, b, c, d):
|
|
3228
3334
|
* _1 = d # <<<<<<<<<<<<<<
|
|
3229
|
-
* _2 = (c
|
|
3230
|
-
* _3 = (b + c
|
|
3335
|
+
* _2 = _complex_div_by_real(c, 3.0) + d
|
|
3336
|
+
* _3 = _complex_div_by_real(b + c, 3.0) + _2
|
|
3231
3337
|
*/
|
|
3232
3338
|
__pyx_v__1 = __pyx_v_d;
|
|
3233
3339
|
|
|
3234
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3340
|
+
/* "fontTools/cu2qu/cu2qu.py":88
|
|
3235
3341
|
* def calc_cubic_points(a, b, c, d):
|
|
3236
3342
|
* _1 = d
|
|
3237
|
-
* _2 = (c
|
|
3238
|
-
* _3 = (b + c
|
|
3343
|
+
* _2 = _complex_div_by_real(c, 3.0) + d # <<<<<<<<<<<<<<
|
|
3344
|
+
* _3 = _complex_div_by_real(b + c, 3.0) + _2
|
|
3239
3345
|
* _4 = a + d + c + b
|
|
3240
3346
|
*/
|
|
3241
|
-
__pyx_t_1 =
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3347
|
+
__pyx_t_1 = __pyx_f_9fontTools_5cu2qu_5cu2qu__complex_div_by_real(__pyx_v_c, 3.0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
3348
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
3349
|
+
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_d); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
3350
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
3351
|
+
__pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
3352
|
+
__Pyx_GOTREF(__pyx_t_3);
|
|
3353
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
3354
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3355
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L1_error)
|
|
3356
|
+
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3357
|
+
__pyx_v__2 = __pyx_t_4;
|
|
3247
3358
|
|
|
3248
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3359
|
+
/* "fontTools/cu2qu/cu2qu.py":89
|
|
3249
3360
|
* _1 = d
|
|
3250
|
-
* _2 = (c
|
|
3251
|
-
* _3 = (b + c
|
|
3361
|
+
* _2 = _complex_div_by_real(c, 3.0) + d
|
|
3362
|
+
* _3 = _complex_div_by_real(b + c, 3.0) + _2 # <<<<<<<<<<<<<<
|
|
3252
3363
|
* _4 = a + d + c + b
|
|
3253
3364
|
* return _1, _2, _3, _4
|
|
3254
3365
|
*/
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
if (unlikely(
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3366
|
+
__pyx_t_3 = __pyx_f_9fontTools_5cu2qu_5cu2qu__complex_div_by_real(__Pyx_c_sum_double(__pyx_v_b, __pyx_v_c), 3.0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
|
|
3367
|
+
__Pyx_GOTREF(__pyx_t_3);
|
|
3368
|
+
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v__2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
|
|
3369
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
3370
|
+
__pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
|
|
3371
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
3372
|
+
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3373
|
+
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3374
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error)
|
|
3375
|
+
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
3376
|
+
__pyx_v__3 = __pyx_t_4;
|
|
3262
3377
|
|
|
3263
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3264
|
-
* _2 = (c
|
|
3265
|
-
* _3 = (b + c
|
|
3378
|
+
/* "fontTools/cu2qu/cu2qu.py":90
|
|
3379
|
+
* _2 = _complex_div_by_real(c, 3.0) + d
|
|
3380
|
+
* _3 = _complex_div_by_real(b + c, 3.0) + _2
|
|
3266
3381
|
* _4 = a + d + c + b # <<<<<<<<<<<<<<
|
|
3267
3382
|
* return _1, _2, _3, _4
|
|
3268
3383
|
*
|
|
3269
3384
|
*/
|
|
3270
3385
|
__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);
|
|
3271
3386
|
|
|
3272
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3273
|
-
* _3 = (b + c
|
|
3387
|
+
/* "fontTools/cu2qu/cu2qu.py":91
|
|
3388
|
+
* _3 = _complex_div_by_real(b + c, 3.0) + _2
|
|
3274
3389
|
* _4 = a + d + c + b
|
|
3275
3390
|
* return _1, _2, _3, _4 # <<<<<<<<<<<<<<
|
|
3276
3391
|
*
|
|
3277
3392
|
*
|
|
3278
3393
|
*/
|
|
3279
3394
|
__Pyx_XDECREF(__pyx_r);
|
|
3280
|
-
|
|
3395
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v__1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
|
|
3396
|
+
__Pyx_GOTREF(__pyx_t_1);
|
|
3397
|
+
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v__2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
|
|
3398
|
+
__Pyx_GOTREF(__pyx_t_2);
|
|
3399
|
+
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v__3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 91, __pyx_L1_error)
|
|
3281
3400
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3282
|
-
|
|
3283
|
-
__Pyx_GOTREF(__pyx_t_4);
|
|
3284
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v__3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 74, __pyx_L1_error)
|
|
3401
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v__4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 91, __pyx_L1_error)
|
|
3285
3402
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3286
|
-
__pyx_t_6 =
|
|
3403
|
+
__pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
|
|
3287
3404
|
__Pyx_GOTREF(__pyx_t_6);
|
|
3288
|
-
|
|
3289
|
-
|
|
3405
|
+
__Pyx_GIVEREF(__pyx_t_1);
|
|
3406
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
|
|
3407
|
+
__Pyx_GIVEREF(__pyx_t_2);
|
|
3408
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
|
|
3290
3409
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
3291
|
-
if (__Pyx_PyTuple_SET_ITEM(
|
|
3292
|
-
__Pyx_GIVEREF(__pyx_t_4);
|
|
3293
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 74, __pyx_L1_error);
|
|
3410
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
|
|
3294
3411
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
3295
|
-
if (__Pyx_PyTuple_SET_ITEM(
|
|
3296
|
-
|
|
3297
|
-
|
|
3412
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(0, 91, __pyx_L1_error);
|
|
3413
|
+
__pyx_t_1 = 0;
|
|
3414
|
+
__pyx_t_2 = 0;
|
|
3298
3415
|
__pyx_t_3 = 0;
|
|
3299
|
-
__pyx_t_4 = 0;
|
|
3300
3416
|
__pyx_t_5 = 0;
|
|
3417
|
+
__pyx_r = __pyx_t_6;
|
|
3301
3418
|
__pyx_t_6 = 0;
|
|
3302
|
-
__pyx_r = __pyx_t_7;
|
|
3303
|
-
__pyx_t_7 = 0;
|
|
3304
3419
|
goto __pyx_L0;
|
|
3305
3420
|
|
|
3306
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3421
|
+
/* "fontTools/cu2qu/cu2qu.py":80
|
|
3307
3422
|
*
|
|
3308
3423
|
*
|
|
3309
3424
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3313,11 +3428,11 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3313
3428
|
|
|
3314
3429
|
/* function exit code */
|
|
3315
3430
|
__pyx_L1_error:;
|
|
3431
|
+
__Pyx_XDECREF(__pyx_t_1);
|
|
3432
|
+
__Pyx_XDECREF(__pyx_t_2);
|
|
3316
3433
|
__Pyx_XDECREF(__pyx_t_3);
|
|
3317
|
-
__Pyx_XDECREF(__pyx_t_4);
|
|
3318
3434
|
__Pyx_XDECREF(__pyx_t_5);
|
|
3319
3435
|
__Pyx_XDECREF(__pyx_t_6);
|
|
3320
|
-
__Pyx_XDECREF(__pyx_t_7);
|
|
3321
3436
|
__Pyx_AddTraceback("fontTools.cu2qu.cu2qu.calc_cubic_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
3322
3437
|
__pyx_r = 0;
|
|
3323
3438
|
__pyx_L0:;
|
|
@@ -3326,7 +3441,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_point
|
|
|
3326
3441
|
return __pyx_r;
|
|
3327
3442
|
}
|
|
3328
3443
|
|
|
3329
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3444
|
+
/* "fontTools/cu2qu/cu2qu.py":94
|
|
3330
3445
|
*
|
|
3331
3446
|
*
|
|
3332
3447
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3351,7 +3466,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3351
3466
|
int __pyx_clineno = 0;
|
|
3352
3467
|
__Pyx_RefNannySetupContext("calc_cubic_parameters", 0);
|
|
3353
3468
|
|
|
3354
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3469
|
+
/* "fontTools/cu2qu/cu2qu.py":101
|
|
3355
3470
|
* @cython.locals(a=cython.complex, b=cython.complex, c=cython.complex, d=cython.complex)
|
|
3356
3471
|
* def calc_cubic_parameters(p0, p1, p2, p3):
|
|
3357
3472
|
* c = (p1 - p0) * 3.0 # <<<<<<<<<<<<<<
|
|
@@ -3360,7 +3475,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3360
3475
|
*/
|
|
3361
3476
|
__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));
|
|
3362
3477
|
|
|
3363
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3478
|
+
/* "fontTools/cu2qu/cu2qu.py":102
|
|
3364
3479
|
* def calc_cubic_parameters(p0, p1, p2, p3):
|
|
3365
3480
|
* c = (p1 - p0) * 3.0
|
|
3366
3481
|
* b = (p2 - p1) * 3.0 - c # <<<<<<<<<<<<<<
|
|
@@ -3369,7 +3484,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3369
3484
|
*/
|
|
3370
3485
|
__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);
|
|
3371
3486
|
|
|
3372
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3487
|
+
/* "fontTools/cu2qu/cu2qu.py":103
|
|
3373
3488
|
* c = (p1 - p0) * 3.0
|
|
3374
3489
|
* b = (p2 - p1) * 3.0 - c
|
|
3375
3490
|
* d = p0 # <<<<<<<<<<<<<<
|
|
@@ -3378,7 +3493,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3378
3493
|
*/
|
|
3379
3494
|
__pyx_v_d = __pyx_v_p0;
|
|
3380
3495
|
|
|
3381
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3496
|
+
/* "fontTools/cu2qu/cu2qu.py":104
|
|
3382
3497
|
* b = (p2 - p1) * 3.0 - c
|
|
3383
3498
|
* d = p0
|
|
3384
3499
|
* a = p3 - d - c - b # <<<<<<<<<<<<<<
|
|
@@ -3387,7 +3502,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3387
3502
|
*/
|
|
3388
3503
|
__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);
|
|
3389
3504
|
|
|
3390
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3505
|
+
/* "fontTools/cu2qu/cu2qu.py":105
|
|
3391
3506
|
* d = p0
|
|
3392
3507
|
* a = p3 - d - c - b
|
|
3393
3508
|
* return a, b, c, d # <<<<<<<<<<<<<<
|
|
@@ -3395,24 +3510,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3395
3510
|
*
|
|
3396
3511
|
*/
|
|
3397
3512
|
__Pyx_XDECREF(__pyx_r);
|
|
3398
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
3513
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
|
|
3399
3514
|
__Pyx_GOTREF(__pyx_t_1);
|
|
3400
|
-
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3515
|
+
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
|
|
3401
3516
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3402
|
-
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3517
|
+
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 105, __pyx_L1_error)
|
|
3403
3518
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3404
|
-
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3519
|
+
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error)
|
|
3405
3520
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3406
|
-
__pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
3521
|
+
__pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error)
|
|
3407
3522
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3408
3523
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
3409
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
3524
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 105, __pyx_L1_error);
|
|
3410
3525
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
3411
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(0,
|
|
3526
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 105, __pyx_L1_error);
|
|
3412
3527
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
3413
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(0,
|
|
3528
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 105, __pyx_L1_error);
|
|
3414
3529
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
3415
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(0,
|
|
3530
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4) != (0)) __PYX_ERR(0, 105, __pyx_L1_error);
|
|
3416
3531
|
__pyx_t_1 = 0;
|
|
3417
3532
|
__pyx_t_2 = 0;
|
|
3418
3533
|
__pyx_t_3 = 0;
|
|
@@ -3421,7 +3536,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3421
3536
|
__pyx_t_5 = 0;
|
|
3422
3537
|
goto __pyx_L0;
|
|
3423
3538
|
|
|
3424
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3539
|
+
/* "fontTools/cu2qu/cu2qu.py":94
|
|
3425
3540
|
*
|
|
3426
3541
|
*
|
|
3427
3542
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3444,7 +3559,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_calc_cubic_param
|
|
|
3444
3559
|
return __pyx_r;
|
|
3445
3560
|
}
|
|
3446
3561
|
|
|
3447
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3562
|
+
/* "fontTools/cu2qu/cu2qu.py":108
|
|
3448
3563
|
*
|
|
3449
3564
|
*
|
|
3450
3565
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3476,17 +3591,17 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3476
3591
|
int __pyx_clineno = 0;
|
|
3477
3592
|
__Pyx_RefNannySetupContext("split_cubic_into_n_iter", 0);
|
|
3478
3593
|
|
|
3479
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3594
|
+
/* "fontTools/cu2qu/cu2qu.py":130
|
|
3480
3595
|
* """
|
|
3481
3596
|
* # Hand-coded special-cases
|
|
3482
3597
|
* if n == 2: # <<<<<<<<<<<<<<
|
|
3483
3598
|
* return iter(split_cubic_into_two(p0, p1, p2, p3))
|
|
3484
3599
|
* if n == 3:
|
|
3485
3600
|
*/
|
|
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,
|
|
3601
|
+
__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, 130, __pyx_L1_error)
|
|
3487
3602
|
if (__pyx_t_1) {
|
|
3488
3603
|
|
|
3489
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3604
|
+
/* "fontTools/cu2qu/cu2qu.py":131
|
|
3490
3605
|
* # Hand-coded special-cases
|
|
3491
3606
|
* if n == 2:
|
|
3492
3607
|
* return iter(split_cubic_into_two(p0, p1, p2, p3)) # <<<<<<<<<<<<<<
|
|
@@ -3494,16 +3609,16 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3494
3609
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3495
3610
|
*/
|
|
3496
3611
|
__Pyx_XDECREF(__pyx_r);
|
|
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,
|
|
3612
|
+
__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, 131, __pyx_L1_error)
|
|
3498
3613
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3499
|
-
__pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3614
|
+
__pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
|
|
3500
3615
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3501
3616
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3502
3617
|
__pyx_r = __pyx_t_3;
|
|
3503
3618
|
__pyx_t_3 = 0;
|
|
3504
3619
|
goto __pyx_L0;
|
|
3505
3620
|
|
|
3506
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3621
|
+
/* "fontTools/cu2qu/cu2qu.py":130
|
|
3507
3622
|
* """
|
|
3508
3623
|
* # Hand-coded special-cases
|
|
3509
3624
|
* if n == 2: # <<<<<<<<<<<<<<
|
|
@@ -3512,17 +3627,17 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3512
3627
|
*/
|
|
3513
3628
|
}
|
|
3514
3629
|
|
|
3515
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3630
|
+
/* "fontTools/cu2qu/cu2qu.py":132
|
|
3516
3631
|
* if n == 2:
|
|
3517
3632
|
* return iter(split_cubic_into_two(p0, p1, p2, p3))
|
|
3518
3633
|
* if n == 3: # <<<<<<<<<<<<<<
|
|
3519
3634
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3520
3635
|
* if n == 4:
|
|
3521
3636
|
*/
|
|
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,
|
|
3637
|
+
__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, 132, __pyx_L1_error)
|
|
3523
3638
|
if (__pyx_t_1) {
|
|
3524
3639
|
|
|
3525
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3640
|
+
/* "fontTools/cu2qu/cu2qu.py":133
|
|
3526
3641
|
* return iter(split_cubic_into_two(p0, p1, p2, p3))
|
|
3527
3642
|
* if n == 3:
|
|
3528
3643
|
* return iter(split_cubic_into_three(p0, p1, p2, p3)) # <<<<<<<<<<<<<<
|
|
@@ -3530,16 +3645,16 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3530
3645
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3531
3646
|
*/
|
|
3532
3647
|
__Pyx_XDECREF(__pyx_r);
|
|
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,
|
|
3648
|
+
__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, 133, __pyx_L1_error)
|
|
3534
3649
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3535
|
-
__pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3650
|
+
__pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
|
|
3536
3651
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3537
3652
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3538
3653
|
__pyx_r = __pyx_t_2;
|
|
3539
3654
|
__pyx_t_2 = 0;
|
|
3540
3655
|
goto __pyx_L0;
|
|
3541
3656
|
|
|
3542
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3657
|
+
/* "fontTools/cu2qu/cu2qu.py":132
|
|
3543
3658
|
* if n == 2:
|
|
3544
3659
|
* return iter(split_cubic_into_two(p0, p1, p2, p3))
|
|
3545
3660
|
* if n == 3: # <<<<<<<<<<<<<<
|
|
@@ -3548,24 +3663,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3548
3663
|
*/
|
|
3549
3664
|
}
|
|
3550
3665
|
|
|
3551
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3666
|
+
/* "fontTools/cu2qu/cu2qu.py":134
|
|
3552
3667
|
* if n == 3:
|
|
3553
3668
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3554
3669
|
* if n == 4: # <<<<<<<<<<<<<<
|
|
3555
3670
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3556
3671
|
* return iter(
|
|
3557
3672
|
*/
|
|
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,
|
|
3673
|
+
__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, 134, __pyx_L1_error)
|
|
3559
3674
|
if (__pyx_t_1) {
|
|
3560
3675
|
|
|
3561
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3676
|
+
/* "fontTools/cu2qu/cu2qu.py":135
|
|
3562
3677
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3563
3678
|
* if n == 4:
|
|
3564
3679
|
* a, b = split_cubic_into_two(p0, p1, p2, p3) # <<<<<<<<<<<<<<
|
|
3565
3680
|
* return iter(
|
|
3566
3681
|
* split_cubic_into_two(a[0], a[1], a[2], a[3])
|
|
3567
3682
|
*/
|
|
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,
|
|
3683
|
+
__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, 135, __pyx_L1_error)
|
|
3569
3684
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3570
3685
|
if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
|
|
3571
3686
|
PyObject* sequence = __pyx_t_2;
|
|
@@ -3573,7 +3688,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3573
3688
|
if (unlikely(size != 2)) {
|
|
3574
3689
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
|
3575
3690
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
3576
|
-
__PYX_ERR(0,
|
|
3691
|
+
__PYX_ERR(0, 135, __pyx_L1_error)
|
|
3577
3692
|
}
|
|
3578
3693
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
3579
3694
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
@@ -3583,22 +3698,22 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3583
3698
|
__Pyx_INCREF(__pyx_t_4);
|
|
3584
3699
|
} else {
|
|
3585
3700
|
__pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0);
|
|
3586
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3701
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
|
|
3587
3702
|
__Pyx_XGOTREF(__pyx_t_3);
|
|
3588
3703
|
__pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 1);
|
|
3589
|
-
if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3704
|
+
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
|
|
3590
3705
|
__Pyx_XGOTREF(__pyx_t_4);
|
|
3591
3706
|
}
|
|
3592
3707
|
#else
|
|
3593
|
-
__pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3708
|
+
__pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
|
|
3594
3709
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3595
|
-
__pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3710
|
+
__pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 135, __pyx_L1_error)
|
|
3596
3711
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3597
3712
|
#endif
|
|
3598
3713
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3599
3714
|
} else {
|
|
3600
3715
|
Py_ssize_t index = -1;
|
|
3601
|
-
__pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
3716
|
+
__pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
|
|
3602
3717
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3603
3718
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3604
3719
|
__pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
|
|
@@ -3606,7 +3721,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3606
3721
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3607
3722
|
index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
|
|
3608
3723
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3609
|
-
if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0,
|
|
3724
|
+
if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 135, __pyx_L1_error)
|
|
3610
3725
|
__pyx_t_6 = NULL;
|
|
3611
3726
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
3612
3727
|
goto __pyx_L7_unpacking_done;
|
|
@@ -3614,7 +3729,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3614
3729
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
3615
3730
|
__pyx_t_6 = NULL;
|
|
3616
3731
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
3617
|
-
__PYX_ERR(0,
|
|
3732
|
+
__PYX_ERR(0, 135, __pyx_L1_error)
|
|
3618
3733
|
__pyx_L7_unpacking_done:;
|
|
3619
3734
|
}
|
|
3620
3735
|
__pyx_v_a = __pyx_t_3;
|
|
@@ -3622,7 +3737,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3622
3737
|
__pyx_v_b = __pyx_t_4;
|
|
3623
3738
|
__pyx_t_4 = 0;
|
|
3624
3739
|
|
|
3625
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3740
|
+
/* "fontTools/cu2qu/cu2qu.py":136
|
|
3626
3741
|
* if n == 4:
|
|
3627
3742
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3628
3743
|
* return iter( # <<<<<<<<<<<<<<
|
|
@@ -3631,77 +3746,77 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3631
3746
|
*/
|
|
3632
3747
|
__Pyx_XDECREF(__pyx_r);
|
|
3633
3748
|
|
|
3634
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3749
|
+
/* "fontTools/cu2qu/cu2qu.py":137
|
|
3635
3750
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3636
3751
|
* return iter(
|
|
3637
3752
|
* split_cubic_into_two(a[0], a[1], a[2], a[3]) # <<<<<<<<<<<<<<
|
|
3638
3753
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3])
|
|
3639
3754
|
* )
|
|
3640
3755
|
*/
|
|
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,
|
|
3756
|
+
__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, 137, __pyx_L1_error)
|
|
3642
3757
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3643
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3758
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error)
|
|
3644
3759
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
3760
|
+
__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, 137, __pyx_L1_error)
|
|
3646
3761
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3647
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3762
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error)
|
|
3648
3763
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
3764
|
+
__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, 137, __pyx_L1_error)
|
|
3650
3765
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3651
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3766
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error)
|
|
3652
3767
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
3768
|
+
__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, 137, __pyx_L1_error)
|
|
3654
3769
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3655
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3770
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error)
|
|
3656
3771
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
3772
|
+
__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, 137, __pyx_L1_error)
|
|
3658
3773
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3659
3774
|
|
|
3660
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3775
|
+
/* "fontTools/cu2qu/cu2qu.py":138
|
|
3661
3776
|
* return iter(
|
|
3662
3777
|
* split_cubic_into_two(a[0], a[1], a[2], a[3])
|
|
3663
3778
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3]) # <<<<<<<<<<<<<<
|
|
3664
3779
|
* )
|
|
3665
3780
|
* if n == 6:
|
|
3666
3781
|
*/
|
|
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,
|
|
3782
|
+
__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, 138, __pyx_L1_error)
|
|
3668
3783
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3669
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3784
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
|
|
3670
3785
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
3786
|
+
__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, 138, __pyx_L1_error)
|
|
3672
3787
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3673
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3788
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
|
|
3674
3789
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
3790
|
+
__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, 138, __pyx_L1_error)
|
|
3676
3791
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3677
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3792
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
|
|
3678
3793
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
3794
|
+
__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, 138, __pyx_L1_error)
|
|
3680
3795
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3681
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3796
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error)
|
|
3682
3797
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
3798
|
+
__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, 138, __pyx_L1_error)
|
|
3684
3799
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3685
|
-
__pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3800
|
+
__pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
|
|
3686
3801
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3687
3802
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3688
3803
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3689
3804
|
|
|
3690
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3805
|
+
/* "fontTools/cu2qu/cu2qu.py":136
|
|
3691
3806
|
* if n == 4:
|
|
3692
3807
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3693
3808
|
* return iter( # <<<<<<<<<<<<<<
|
|
3694
3809
|
* split_cubic_into_two(a[0], a[1], a[2], a[3])
|
|
3695
3810
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3])
|
|
3696
3811
|
*/
|
|
3697
|
-
__pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
3812
|
+
__pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 136, __pyx_L1_error)
|
|
3698
3813
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3699
3814
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3700
3815
|
__pyx_r = __pyx_t_4;
|
|
3701
3816
|
__pyx_t_4 = 0;
|
|
3702
3817
|
goto __pyx_L0;
|
|
3703
3818
|
|
|
3704
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3819
|
+
/* "fontTools/cu2qu/cu2qu.py":134
|
|
3705
3820
|
* if n == 3:
|
|
3706
3821
|
* return iter(split_cubic_into_three(p0, p1, p2, p3))
|
|
3707
3822
|
* if n == 4: # <<<<<<<<<<<<<<
|
|
@@ -3710,24 +3825,24 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3710
3825
|
*/
|
|
3711
3826
|
}
|
|
3712
3827
|
|
|
3713
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3828
|
+
/* "fontTools/cu2qu/cu2qu.py":140
|
|
3714
3829
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3])
|
|
3715
3830
|
* )
|
|
3716
3831
|
* if n == 6: # <<<<<<<<<<<<<<
|
|
3717
3832
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3718
3833
|
* return iter(
|
|
3719
3834
|
*/
|
|
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,
|
|
3835
|
+
__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, 140, __pyx_L1_error)
|
|
3721
3836
|
if (__pyx_t_1) {
|
|
3722
3837
|
|
|
3723
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3838
|
+
/* "fontTools/cu2qu/cu2qu.py":141
|
|
3724
3839
|
* )
|
|
3725
3840
|
* if n == 6:
|
|
3726
3841
|
* a, b = split_cubic_into_two(p0, p1, p2, p3) # <<<<<<<<<<<<<<
|
|
3727
3842
|
* return iter(
|
|
3728
3843
|
* split_cubic_into_three(a[0], a[1], a[2], a[3])
|
|
3729
3844
|
*/
|
|
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,
|
|
3845
|
+
__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, 141, __pyx_L1_error)
|
|
3731
3846
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3732
3847
|
if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
|
|
3733
3848
|
PyObject* sequence = __pyx_t_4;
|
|
@@ -3735,7 +3850,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3735
3850
|
if (unlikely(size != 2)) {
|
|
3736
3851
|
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
|
|
3737
3852
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
3738
|
-
__PYX_ERR(0,
|
|
3853
|
+
__PYX_ERR(0, 141, __pyx_L1_error)
|
|
3739
3854
|
}
|
|
3740
3855
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
3741
3856
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
@@ -3745,22 +3860,22 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3745
3860
|
__Pyx_INCREF(__pyx_t_2);
|
|
3746
3861
|
} else {
|
|
3747
3862
|
__pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 0);
|
|
3748
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3863
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
|
|
3749
3864
|
__Pyx_XGOTREF(__pyx_t_3);
|
|
3750
3865
|
__pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1);
|
|
3751
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3866
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
|
|
3752
3867
|
__Pyx_XGOTREF(__pyx_t_2);
|
|
3753
3868
|
}
|
|
3754
3869
|
#else
|
|
3755
|
-
__pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3870
|
+
__pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
|
|
3756
3871
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3757
|
-
__pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3872
|
+
__pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
|
|
3758
3873
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3759
3874
|
#endif
|
|
3760
3875
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3761
3876
|
} else {
|
|
3762
3877
|
Py_ssize_t index = -1;
|
|
3763
|
-
__pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
3878
|
+
__pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
|
|
3764
3879
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3765
3880
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3766
3881
|
__pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
|
|
@@ -3768,7 +3883,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3768
3883
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3769
3884
|
index = 1; __pyx_t_2 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L9_unpacking_failed;
|
|
3770
3885
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3771
|
-
if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0,
|
|
3886
|
+
if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 2) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
|
|
3772
3887
|
__pyx_t_6 = NULL;
|
|
3773
3888
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
3774
3889
|
goto __pyx_L10_unpacking_done;
|
|
@@ -3776,7 +3891,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3776
3891
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
3777
3892
|
__pyx_t_6 = NULL;
|
|
3778
3893
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
3779
|
-
__PYX_ERR(0,
|
|
3894
|
+
__PYX_ERR(0, 141, __pyx_L1_error)
|
|
3780
3895
|
__pyx_L10_unpacking_done:;
|
|
3781
3896
|
}
|
|
3782
3897
|
__pyx_v_a = __pyx_t_3;
|
|
@@ -3784,7 +3899,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3784
3899
|
__pyx_v_b = __pyx_t_2;
|
|
3785
3900
|
__pyx_t_2 = 0;
|
|
3786
3901
|
|
|
3787
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3902
|
+
/* "fontTools/cu2qu/cu2qu.py":142
|
|
3788
3903
|
* if n == 6:
|
|
3789
3904
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3790
3905
|
* return iter( # <<<<<<<<<<<<<<
|
|
@@ -3793,77 +3908,77 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3793
3908
|
*/
|
|
3794
3909
|
__Pyx_XDECREF(__pyx_r);
|
|
3795
3910
|
|
|
3796
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3911
|
+
/* "fontTools/cu2qu/cu2qu.py":143
|
|
3797
3912
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3798
3913
|
* return iter(
|
|
3799
3914
|
* split_cubic_into_three(a[0], a[1], a[2], a[3]) # <<<<<<<<<<<<<<
|
|
3800
3915
|
* + split_cubic_into_three(b[0], b[1], b[2], b[3])
|
|
3801
3916
|
* )
|
|
3802
3917
|
*/
|
|
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,
|
|
3918
|
+
__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, 143, __pyx_L1_error)
|
|
3804
3919
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3805
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3920
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
|
|
3806
3921
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
3922
|
+
__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, 143, __pyx_L1_error)
|
|
3808
3923
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3809
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3924
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
|
|
3810
3925
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
3926
|
+
__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, 143, __pyx_L1_error)
|
|
3812
3927
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3813
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3928
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
|
|
3814
3929
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
3930
|
+
__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, 143, __pyx_L1_error)
|
|
3816
3931
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3817
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3932
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
|
|
3818
3933
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
3934
|
+
__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, 143, __pyx_L1_error)
|
|
3820
3935
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3821
3936
|
|
|
3822
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3937
|
+
/* "fontTools/cu2qu/cu2qu.py":144
|
|
3823
3938
|
* return iter(
|
|
3824
3939
|
* split_cubic_into_three(a[0], a[1], a[2], a[3])
|
|
3825
3940
|
* + split_cubic_into_three(b[0], b[1], b[2], b[3]) # <<<<<<<<<<<<<<
|
|
3826
3941
|
* )
|
|
3827
3942
|
*
|
|
3828
3943
|
*/
|
|
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,
|
|
3944
|
+
__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, 144, __pyx_L1_error)
|
|
3830
3945
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3831
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3946
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
|
|
3832
3947
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
3948
|
+
__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, 144, __pyx_L1_error)
|
|
3834
3949
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3835
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3950
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
|
|
3836
3951
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
3952
|
+
__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, 144, __pyx_L1_error)
|
|
3838
3953
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3839
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3954
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
|
|
3840
3955
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
3956
|
+
__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, 144, __pyx_L1_error)
|
|
3842
3957
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3843
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
3958
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
|
|
3844
3959
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
3960
|
+
__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, 144, __pyx_L1_error)
|
|
3846
3961
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3847
|
-
__pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
3962
|
+
__pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
|
|
3848
3963
|
__Pyx_GOTREF(__pyx_t_3);
|
|
3849
3964
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3850
3965
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
3851
3966
|
|
|
3852
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3967
|
+
/* "fontTools/cu2qu/cu2qu.py":142
|
|
3853
3968
|
* if n == 6:
|
|
3854
3969
|
* a, b = split_cubic_into_two(p0, p1, p2, p3)
|
|
3855
3970
|
* return iter( # <<<<<<<<<<<<<<
|
|
3856
3971
|
* split_cubic_into_three(a[0], a[1], a[2], a[3])
|
|
3857
3972
|
* + split_cubic_into_three(b[0], b[1], b[2], b[3])
|
|
3858
3973
|
*/
|
|
3859
|
-
__pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
3974
|
+
__pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
|
|
3860
3975
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3861
3976
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
3862
3977
|
__pyx_r = __pyx_t_2;
|
|
3863
3978
|
__pyx_t_2 = 0;
|
|
3864
3979
|
goto __pyx_L0;
|
|
3865
3980
|
|
|
3866
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3981
|
+
/* "fontTools/cu2qu/cu2qu.py":140
|
|
3867
3982
|
* + split_cubic_into_two(b[0], b[1], b[2], b[3])
|
|
3868
3983
|
* )
|
|
3869
3984
|
* if n == 6: # <<<<<<<<<<<<<<
|
|
@@ -3872,7 +3987,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3872
3987
|
*/
|
|
3873
3988
|
}
|
|
3874
3989
|
|
|
3875
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
3990
|
+
/* "fontTools/cu2qu/cu2qu.py":147
|
|
3876
3991
|
* )
|
|
3877
3992
|
*
|
|
3878
3993
|
* return _split_cubic_into_n_gen(p0, p1, p2, p3, n) # <<<<<<<<<<<<<<
|
|
@@ -3881,15 +3996,15 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3881
3996
|
*/
|
|
3882
3997
|
__Pyx_XDECREF(__pyx_r);
|
|
3883
3998
|
__pyx_t_3 = NULL;
|
|
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,
|
|
3999
|
+
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_split_cubic_into_n_gen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
|
|
3885
4000
|
__Pyx_GOTREF(__pyx_t_4);
|
|
3886
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4001
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
|
|
3887
4002
|
__Pyx_GOTREF(__pyx_t_5);
|
|
3888
|
-
__pyx_t_11 = __pyx_PyComplex_FromComplex(__pyx_v_p1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0,
|
|
4003
|
+
__pyx_t_11 = __pyx_PyComplex_FromComplex(__pyx_v_p1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 147, __pyx_L1_error)
|
|
3889
4004
|
__Pyx_GOTREF(__pyx_t_11);
|
|
3890
|
-
__pyx_t_12 = __pyx_PyComplex_FromComplex(__pyx_v_p2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0,
|
|
4005
|
+
__pyx_t_12 = __pyx_PyComplex_FromComplex(__pyx_v_p2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 147, __pyx_L1_error)
|
|
3891
4006
|
__Pyx_GOTREF(__pyx_t_12);
|
|
3892
|
-
__pyx_t_13 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0,
|
|
4007
|
+
__pyx_t_13 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 147, __pyx_L1_error)
|
|
3893
4008
|
__Pyx_GOTREF(__pyx_t_13);
|
|
3894
4009
|
__pyx_t_14 = 1;
|
|
3895
4010
|
#if CYTHON_UNPACK_METHODS
|
|
@@ -3912,14 +4027,14 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3912
4027
|
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
3913
4028
|
__Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
|
|
3914
4029
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
3915
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4030
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error)
|
|
3916
4031
|
__Pyx_GOTREF(__pyx_t_2);
|
|
3917
4032
|
}
|
|
3918
4033
|
__pyx_r = __pyx_t_2;
|
|
3919
4034
|
__pyx_t_2 = 0;
|
|
3920
4035
|
goto __pyx_L0;
|
|
3921
4036
|
|
|
3922
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4037
|
+
/* "fontTools/cu2qu/cu2qu.py":108
|
|
3923
4038
|
*
|
|
3924
4039
|
*
|
|
3925
4040
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -3947,7 +4062,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
3947
4062
|
}
|
|
3948
4063
|
static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
|
|
3949
4064
|
|
|
3950
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4065
|
+
/* "fontTools/cu2qu/cu2qu.py":150
|
|
3951
4066
|
*
|
|
3952
4067
|
*
|
|
3953
4068
|
* @cython.locals( # <<<<<<<<<<<<<<
|
|
@@ -3999,60 +4114,60 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
3999
4114
|
{
|
|
4000
4115
|
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};
|
|
4001
4116
|
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
|
|
4002
|
-
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0,
|
|
4117
|
+
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4003
4118
|
if (__pyx_kwds_len > 0) {
|
|
4004
4119
|
switch (__pyx_nargs) {
|
|
4005
4120
|
case 5:
|
|
4006
4121
|
values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
|
|
4007
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0,
|
|
4122
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4008
4123
|
CYTHON_FALLTHROUGH;
|
|
4009
4124
|
case 4:
|
|
4010
4125
|
values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
|
|
4011
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0,
|
|
4126
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4012
4127
|
CYTHON_FALLTHROUGH;
|
|
4013
4128
|
case 3:
|
|
4014
4129
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
4015
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
4130
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4016
4131
|
CYTHON_FALLTHROUGH;
|
|
4017
4132
|
case 2:
|
|
4018
4133
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
4019
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
4134
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4020
4135
|
CYTHON_FALLTHROUGH;
|
|
4021
4136
|
case 1:
|
|
4022
4137
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
4023
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
4138
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4024
4139
|
CYTHON_FALLTHROUGH;
|
|
4025
4140
|
case 0: break;
|
|
4026
4141
|
default: goto __pyx_L5_argtuple_error;
|
|
4027
4142
|
}
|
|
4028
4143
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
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,
|
|
4144
|
+
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, 150, __pyx_L3_error)
|
|
4030
4145
|
for (Py_ssize_t i = __pyx_nargs; i < 5; i++) {
|
|
4031
|
-
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, i); __PYX_ERR(0,
|
|
4146
|
+
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, i); __PYX_ERR(0, 150, __pyx_L3_error) }
|
|
4032
4147
|
}
|
|
4033
4148
|
} else if (unlikely(__pyx_nargs != 5)) {
|
|
4034
4149
|
goto __pyx_L5_argtuple_error;
|
|
4035
4150
|
} else {
|
|
4036
4151
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
4037
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
4152
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4038
4153
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
4039
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
4154
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4040
4155
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
4041
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
4156
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4042
4157
|
values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
|
|
4043
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0,
|
|
4158
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4044
4159
|
values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4);
|
|
4045
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0,
|
|
4160
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4046
4161
|
}
|
|
4047
|
-
__pyx_v_p0 = __Pyx_PyComplex_As___pyx_t_double_complex(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4048
|
-
__pyx_v_p1 = __Pyx_PyComplex_As___pyx_t_double_complex(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4049
|
-
__pyx_v_p2 = __Pyx_PyComplex_As___pyx_t_double_complex(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4050
|
-
__pyx_v_p3 = __Pyx_PyComplex_As___pyx_t_double_complex(values[3]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4051
|
-
__pyx_v_n = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
4162
|
+
__pyx_v_p0 = __Pyx_PyComplex_As___pyx_t_double_complex(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
|
|
4163
|
+
__pyx_v_p1 = __Pyx_PyComplex_As___pyx_t_double_complex(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
|
|
4164
|
+
__pyx_v_p2 = __Pyx_PyComplex_As___pyx_t_double_complex(values[2]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
|
|
4165
|
+
__pyx_v_p3 = __Pyx_PyComplex_As___pyx_t_double_complex(values[3]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
|
|
4166
|
+
__pyx_v_n = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error)
|
|
4052
4167
|
}
|
|
4053
4168
|
goto __pyx_L6_skip;
|
|
4054
4169
|
__pyx_L5_argtuple_error:;
|
|
4055
|
-
__Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, __pyx_nargs); __PYX_ERR(0,
|
|
4170
|
+
__Pyx_RaiseArgtupleInvalid("_split_cubic_into_n_gen", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 150, __pyx_L3_error)
|
|
4056
4171
|
__pyx_L6_skip:;
|
|
4057
4172
|
goto __pyx_L4_argument_unpacking_done;
|
|
4058
4173
|
__pyx_L3_error:;
|
|
@@ -4085,7 +4200,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu__split_cubic_into_n_gen(CYTHO
|
|
|
4085
4200
|
if (unlikely(!__pyx_cur_scope)) {
|
|
4086
4201
|
__pyx_cur_scope = ((struct __pyx_obj_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen *)Py_None);
|
|
4087
4202
|
__Pyx_INCREF(Py_None);
|
|
4088
|
-
__PYX_ERR(0,
|
|
4203
|
+
__PYX_ERR(0, 150, __pyx_L1_error)
|
|
4089
4204
|
} else {
|
|
4090
4205
|
__Pyx_GOTREF((PyObject *)__pyx_cur_scope);
|
|
4091
4206
|
}
|
|
@@ -4095,7 +4210,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu__split_cubic_into_n_gen(CYTHO
|
|
|
4095
4210
|
__pyx_cur_scope->__pyx_v_p3 = __pyx_v_p3;
|
|
4096
4211
|
__pyx_cur_scope->__pyx_v_n = __pyx_v_n;
|
|
4097
4212
|
{
|
|
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,
|
|
4213
|
+
__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, 150, __pyx_L1_error)
|
|
4099
4214
|
__Pyx_DECREF(__pyx_cur_scope);
|
|
4100
4215
|
__Pyx_RefNannyFinishContext();
|
|
4101
4216
|
return (PyObject *) gen;
|
|
@@ -4144,17 +4259,17 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4144
4259
|
__pyx_L3_first_run:;
|
|
4145
4260
|
if (unlikely(__pyx_sent_value != Py_None)) {
|
|
4146
4261
|
if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator");
|
|
4147
|
-
__PYX_ERR(0,
|
|
4262
|
+
__PYX_ERR(0, 150, __pyx_L1_error)
|
|
4148
4263
|
}
|
|
4149
4264
|
|
|
4150
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4265
|
+
/* "fontTools/cu2qu/cu2qu.py":165
|
|
4151
4266
|
* )
|
|
4152
4267
|
* def _split_cubic_into_n_gen(p0, p1, p2, p3, n):
|
|
4153
4268
|
* a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3) # <<<<<<<<<<<<<<
|
|
4154
4269
|
* dt = 1 / n
|
|
4155
4270
|
* delta_2 = dt * dt
|
|
4156
4271
|
*/
|
|
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,
|
|
4272
|
+
__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, 165, __pyx_L1_error)
|
|
4158
4273
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4159
4274
|
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
|
|
4160
4275
|
PyObject* sequence = __pyx_t_1;
|
|
@@ -4162,7 +4277,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4162
4277
|
if (unlikely(size != 4)) {
|
|
4163
4278
|
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
|
|
4164
4279
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
4165
|
-
__PYX_ERR(0,
|
|
4280
|
+
__PYX_ERR(0, 165, __pyx_L1_error)
|
|
4166
4281
|
}
|
|
4167
4282
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
4168
4283
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
@@ -4176,16 +4291,16 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4176
4291
|
__Pyx_INCREF(__pyx_t_5);
|
|
4177
4292
|
} else {
|
|
4178
4293
|
__pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 0);
|
|
4179
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
4294
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4180
4295
|
__Pyx_XGOTREF(__pyx_t_2);
|
|
4181
4296
|
__pyx_t_3 = __Pyx_PyList_GetItemRef(sequence, 1);
|
|
4182
|
-
if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4297
|
+
if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4183
4298
|
__Pyx_XGOTREF(__pyx_t_3);
|
|
4184
4299
|
__pyx_t_4 = __Pyx_PyList_GetItemRef(sequence, 2);
|
|
4185
|
-
if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
4300
|
+
if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4186
4301
|
__Pyx_XGOTREF(__pyx_t_4);
|
|
4187
4302
|
__pyx_t_5 = __Pyx_PyList_GetItemRef(sequence, 3);
|
|
4188
|
-
if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4303
|
+
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4189
4304
|
__Pyx_XGOTREF(__pyx_t_5);
|
|
4190
4305
|
}
|
|
4191
4306
|
#else
|
|
@@ -4193,7 +4308,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4193
4308
|
Py_ssize_t i;
|
|
4194
4309
|
PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5};
|
|
4195
4310
|
for (i=0; i < 4; i++) {
|
|
4196
|
-
PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0,
|
|
4311
|
+
PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4197
4312
|
__Pyx_GOTREF(item);
|
|
4198
4313
|
*(temps[i]) = item;
|
|
4199
4314
|
}
|
|
@@ -4203,7 +4318,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4203
4318
|
} else {
|
|
4204
4319
|
Py_ssize_t index = -1;
|
|
4205
4320
|
PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5};
|
|
4206
|
-
__pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4321
|
+
__pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4207
4322
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4208
4323
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
4209
4324
|
__pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
|
|
@@ -4212,7 +4327,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4212
4327
|
__Pyx_GOTREF(item);
|
|
4213
4328
|
*(temps[index]) = item;
|
|
4214
4329
|
}
|
|
4215
|
-
if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) __PYX_ERR(0,
|
|
4330
|
+
if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4216
4331
|
__pyx_t_7 = NULL;
|
|
4217
4332
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4218
4333
|
goto __pyx_L5_unpacking_done;
|
|
@@ -4220,23 +4335,23 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4220
4335
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
4221
4336
|
__pyx_t_7 = NULL;
|
|
4222
4337
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
4223
|
-
__PYX_ERR(0,
|
|
4338
|
+
__PYX_ERR(0, 165, __pyx_L1_error)
|
|
4224
4339
|
__pyx_L5_unpacking_done:;
|
|
4225
4340
|
}
|
|
4226
|
-
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4341
|
+
__pyx_t_8 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4227
4342
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
4228
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4343
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4229
4344
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
4230
|
-
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4345
|
+
__pyx_t_10 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4231
4346
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
|
|
4232
|
-
__pyx_t_11 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
4347
|
+
__pyx_t_11 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
|
|
4233
4348
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
4234
4349
|
__pyx_cur_scope->__pyx_v_a = __pyx_t_8;
|
|
4235
4350
|
__pyx_cur_scope->__pyx_v_b = __pyx_t_9;
|
|
4236
4351
|
__pyx_cur_scope->__pyx_v_c = __pyx_t_10;
|
|
4237
4352
|
__pyx_cur_scope->__pyx_v_d = __pyx_t_11;
|
|
4238
4353
|
|
|
4239
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4354
|
+
/* "fontTools/cu2qu/cu2qu.py":166
|
|
4240
4355
|
* def _split_cubic_into_n_gen(p0, p1, p2, p3, n):
|
|
4241
4356
|
* a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3)
|
|
4242
4357
|
* dt = 1 / n # <<<<<<<<<<<<<<
|
|
@@ -4245,11 +4360,11 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4245
4360
|
*/
|
|
4246
4361
|
if (unlikely(__pyx_cur_scope->__pyx_v_n == 0)) {
|
|
4247
4362
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
4248
|
-
__PYX_ERR(0,
|
|
4363
|
+
__PYX_ERR(0, 166, __pyx_L1_error)
|
|
4249
4364
|
}
|
|
4250
4365
|
__pyx_cur_scope->__pyx_v_dt = (1.0 / ((double)__pyx_cur_scope->__pyx_v_n));
|
|
4251
4366
|
|
|
4252
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4367
|
+
/* "fontTools/cu2qu/cu2qu.py":167
|
|
4253
4368
|
* a, b, c, d = calc_cubic_parameters(p0, p1, p2, p3)
|
|
4254
4369
|
* dt = 1 / n
|
|
4255
4370
|
* delta_2 = dt * dt # <<<<<<<<<<<<<<
|
|
@@ -4258,7 +4373,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4258
4373
|
*/
|
|
4259
4374
|
__pyx_cur_scope->__pyx_v_delta_2 = (__pyx_cur_scope->__pyx_v_dt * __pyx_cur_scope->__pyx_v_dt);
|
|
4260
4375
|
|
|
4261
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4376
|
+
/* "fontTools/cu2qu/cu2qu.py":168
|
|
4262
4377
|
* dt = 1 / n
|
|
4263
4378
|
* delta_2 = dt * dt
|
|
4264
4379
|
* delta_3 = dt * delta_2 # <<<<<<<<<<<<<<
|
|
@@ -4267,7 +4382,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4267
4382
|
*/
|
|
4268
4383
|
__pyx_cur_scope->__pyx_v_delta_3 = (__pyx_cur_scope->__pyx_v_dt * __pyx_cur_scope->__pyx_v_delta_2);
|
|
4269
4384
|
|
|
4270
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4385
|
+
/* "fontTools/cu2qu/cu2qu.py":169
|
|
4271
4386
|
* delta_2 = dt * dt
|
|
4272
4387
|
* delta_3 = dt * delta_2
|
|
4273
4388
|
* for i in range(n): # <<<<<<<<<<<<<<
|
|
@@ -4279,7 +4394,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4279
4394
|
for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) {
|
|
4280
4395
|
__pyx_cur_scope->__pyx_v_i = __pyx_t_14;
|
|
4281
4396
|
|
|
4282
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4397
|
+
/* "fontTools/cu2qu/cu2qu.py":170
|
|
4283
4398
|
* delta_3 = dt * delta_2
|
|
4284
4399
|
* for i in range(n):
|
|
4285
4400
|
* t1 = i * dt # <<<<<<<<<<<<<<
|
|
@@ -4288,7 +4403,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4288
4403
|
*/
|
|
4289
4404
|
__pyx_cur_scope->__pyx_v_t1 = (__pyx_cur_scope->__pyx_v_i * __pyx_cur_scope->__pyx_v_dt);
|
|
4290
4405
|
|
|
4291
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4406
|
+
/* "fontTools/cu2qu/cu2qu.py":171
|
|
4292
4407
|
* for i in range(n):
|
|
4293
4408
|
* t1 = i * dt
|
|
4294
4409
|
* t1_2 = t1 * t1 # <<<<<<<<<<<<<<
|
|
@@ -4297,7 +4412,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4297
4412
|
*/
|
|
4298
4413
|
__pyx_cur_scope->__pyx_v_t1_2 = (__pyx_cur_scope->__pyx_v_t1 * __pyx_cur_scope->__pyx_v_t1);
|
|
4299
4414
|
|
|
4300
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4415
|
+
/* "fontTools/cu2qu/cu2qu.py":173
|
|
4301
4416
|
* t1_2 = t1 * t1
|
|
4302
4417
|
* # calc new a, b, c and d
|
|
4303
4418
|
* a1 = a * delta_3 # <<<<<<<<<<<<<<
|
|
@@ -4306,7 +4421,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4306
4421
|
*/
|
|
4307
4422
|
__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));
|
|
4308
4423
|
|
|
4309
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4424
|
+
/* "fontTools/cu2qu/cu2qu.py":174
|
|
4310
4425
|
* # calc new a, b, c and d
|
|
4311
4426
|
* a1 = a * delta_3
|
|
4312
4427
|
* b1 = (3 * a * t1 + b) * delta_2 # <<<<<<<<<<<<<<
|
|
@@ -4315,7 +4430,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4315
4430
|
*/
|
|
4316
4431
|
__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));
|
|
4317
4432
|
|
|
4318
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4433
|
+
/* "fontTools/cu2qu/cu2qu.py":175
|
|
4319
4434
|
* a1 = a * delta_3
|
|
4320
4435
|
* b1 = (3 * a * t1 + b) * delta_2
|
|
4321
4436
|
* c1 = (2 * b * t1 + c + 3 * a * t1_2) * dt # <<<<<<<<<<<<<<
|
|
@@ -4324,7 +4439,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4324
4439
|
*/
|
|
4325
4440
|
__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));
|
|
4326
4441
|
|
|
4327
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4442
|
+
/* "fontTools/cu2qu/cu2qu.py":176
|
|
4328
4443
|
* b1 = (3 * a * t1 + b) * delta_2
|
|
4329
4444
|
* c1 = (2 * b * t1 + c + 3 * a * t1_2) * dt
|
|
4330
4445
|
* d1 = a * t1 * t1_2 + b * t1_2 + c * t1 + d # <<<<<<<<<<<<<<
|
|
@@ -4333,14 +4448,14 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4333
4448
|
*/
|
|
4334
4449
|
__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);
|
|
4335
4450
|
|
|
4336
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4451
|
+
/* "fontTools/cu2qu/cu2qu.py":177
|
|
4337
4452
|
* c1 = (2 * b * t1 + c + 3 * a * t1_2) * dt
|
|
4338
4453
|
* d1 = a * t1 * t1_2 + b * t1_2 + c * t1 + d
|
|
4339
4454
|
* yield calc_cubic_points(a1, b1, c1, d1) # <<<<<<<<<<<<<<
|
|
4340
4455
|
*
|
|
4341
4456
|
*
|
|
4342
4457
|
*/
|
|
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,
|
|
4458
|
+
__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, 177, __pyx_L1_error)
|
|
4344
4459
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4345
4460
|
__pyx_r = __pyx_t_1;
|
|
4346
4461
|
__pyx_t_1 = 0;
|
|
@@ -4357,11 +4472,11 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4357
4472
|
__pyx_t_12 = __pyx_cur_scope->__pyx_t_0;
|
|
4358
4473
|
__pyx_t_13 = __pyx_cur_scope->__pyx_t_1;
|
|
4359
4474
|
__pyx_t_14 = __pyx_cur_scope->__pyx_t_2;
|
|
4360
|
-
if (unlikely(!__pyx_sent_value)) __PYX_ERR(0,
|
|
4475
|
+
if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 177, __pyx_L1_error)
|
|
4361
4476
|
}
|
|
4362
4477
|
CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
|
|
4363
4478
|
|
|
4364
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4479
|
+
/* "fontTools/cu2qu/cu2qu.py":150
|
|
4365
4480
|
*
|
|
4366
4481
|
*
|
|
4367
4482
|
* @cython.locals( # <<<<<<<<<<<<<<
|
|
@@ -4394,7 +4509,7 @@ static PyObject *__pyx_gb_9fontTools_5cu2qu_5cu2qu_2generator(__pyx_CoroutineObj
|
|
|
4394
4509
|
return __pyx_r;
|
|
4395
4510
|
}
|
|
4396
4511
|
|
|
4397
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4512
|
+
/* "fontTools/cu2qu/cu2qu.py":180
|
|
4398
4513
|
*
|
|
4399
4514
|
*
|
|
4400
4515
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4419,7 +4534,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4419
4534
|
int __pyx_clineno = 0;
|
|
4420
4535
|
__Pyx_RefNannySetupContext("split_cubic_into_two", 0);
|
|
4421
4536
|
|
|
4422
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4537
|
+
/* "fontTools/cu2qu/cu2qu.py":201
|
|
4423
4538
|
* values).
|
|
4424
4539
|
* """
|
|
4425
4540
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125 # <<<<<<<<<<<<<<
|
|
@@ -4428,7 +4543,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4428
4543
|
*/
|
|
4429
4544
|
__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));
|
|
4430
4545
|
|
|
4431
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4546
|
+
/* "fontTools/cu2qu/cu2qu.py":202
|
|
4432
4547
|
* """
|
|
4433
4548
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
4434
4549
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125 # <<<<<<<<<<<<<<
|
|
@@ -4437,7 +4552,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4437
4552
|
*/
|
|
4438
4553
|
__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));
|
|
4439
4554
|
|
|
4440
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4555
|
+
/* "fontTools/cu2qu/cu2qu.py":203
|
|
4441
4556
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
4442
4557
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125
|
|
4443
4558
|
* return ( # <<<<<<<<<<<<<<
|
|
@@ -4446,90 +4561,90 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4446
4561
|
*/
|
|
4447
4562
|
__Pyx_XDECREF(__pyx_r);
|
|
4448
4563
|
|
|
4449
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4564
|
+
/* "fontTools/cu2qu/cu2qu.py":204
|
|
4450
4565
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125
|
|
4451
4566
|
* return (
|
|
4452
4567
|
* (p0, (p0 + p1) * 0.5, mid - deriv3, mid), # <<<<<<<<<<<<<<
|
|
4453
4568
|
* (mid, mid + deriv3, (p2 + p3) * 0.5, p3),
|
|
4454
4569
|
* )
|
|
4455
4570
|
*/
|
|
4456
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4571
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
|
|
4457
4572
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4458
4573
|
__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));
|
|
4459
|
-
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4574
|
+
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 204, __pyx_L1_error)
|
|
4460
4575
|
__Pyx_GOTREF(__pyx_t_3);
|
|
4461
4576
|
__pyx_t_2 = __Pyx_c_diff_double(__pyx_v_mid, __pyx_v_deriv3);
|
|
4462
|
-
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
4577
|
+
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error)
|
|
4463
4578
|
__Pyx_GOTREF(__pyx_t_4);
|
|
4464
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4579
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
|
|
4465
4580
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4466
|
-
__pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4581
|
+
__pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 204, __pyx_L1_error)
|
|
4467
4582
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4468
4583
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4469
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4584
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
|
|
4470
4585
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
4471
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0,
|
|
4586
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
|
|
4472
4587
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
4473
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(0,
|
|
4588
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
|
|
4474
4589
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4475
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4590
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
|
|
4476
4591
|
__pyx_t_1 = 0;
|
|
4477
4592
|
__pyx_t_3 = 0;
|
|
4478
4593
|
__pyx_t_4 = 0;
|
|
4479
4594
|
__pyx_t_5 = 0;
|
|
4480
4595
|
|
|
4481
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4596
|
+
/* "fontTools/cu2qu/cu2qu.py":205
|
|
4482
4597
|
* return (
|
|
4483
4598
|
* (p0, (p0 + p1) * 0.5, mid - deriv3, mid),
|
|
4484
4599
|
* (mid, mid + deriv3, (p2 + p3) * 0.5, p3), # <<<<<<<<<<<<<<
|
|
4485
4600
|
* )
|
|
4486
4601
|
*
|
|
4487
4602
|
*/
|
|
4488
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4603
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_v_mid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 205, __pyx_L1_error)
|
|
4489
4604
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4490
4605
|
__pyx_t_2 = __Pyx_c_sum_double(__pyx_v_mid, __pyx_v_deriv3);
|
|
4491
|
-
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
4606
|
+
__pyx_t_4 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __pyx_L1_error)
|
|
4492
4607
|
__Pyx_GOTREF(__pyx_t_4);
|
|
4493
4608
|
__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));
|
|
4494
|
-
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0,
|
|
4609
|
+
__pyx_t_3 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 205, __pyx_L1_error)
|
|
4495
4610
|
__Pyx_GOTREF(__pyx_t_3);
|
|
4496
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4611
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
|
|
4497
4612
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4498
|
-
__pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4613
|
+
__pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 205, __pyx_L1_error)
|
|
4499
4614
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4500
4615
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4501
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4616
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 205, __pyx_L1_error);
|
|
4502
4617
|
__Pyx_GIVEREF(__pyx_t_4);
|
|
4503
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0,
|
|
4618
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4) != (0)) __PYX_ERR(0, 205, __pyx_L1_error);
|
|
4504
4619
|
__Pyx_GIVEREF(__pyx_t_3);
|
|
4505
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0,
|
|
4620
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3) != (0)) __PYX_ERR(0, 205, __pyx_L1_error);
|
|
4506
4621
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4507
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4622
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_1) != (0)) __PYX_ERR(0, 205, __pyx_L1_error);
|
|
4508
4623
|
__pyx_t_5 = 0;
|
|
4509
4624
|
__pyx_t_4 = 0;
|
|
4510
4625
|
__pyx_t_3 = 0;
|
|
4511
4626
|
__pyx_t_1 = 0;
|
|
4512
4627
|
|
|
4513
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4628
|
+
/* "fontTools/cu2qu/cu2qu.py":204
|
|
4514
4629
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125
|
|
4515
4630
|
* return (
|
|
4516
4631
|
* (p0, (p0 + p1) * 0.5, mid - deriv3, mid), # <<<<<<<<<<<<<<
|
|
4517
4632
|
* (mid, mid + deriv3, (p2 + p3) * 0.5, p3),
|
|
4518
4633
|
* )
|
|
4519
4634
|
*/
|
|
4520
|
-
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4635
|
+
__pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error)
|
|
4521
4636
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4522
4637
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
4523
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
4638
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
|
|
4524
4639
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
4525
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7) != (0)) __PYX_ERR(0,
|
|
4640
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 204, __pyx_L1_error);
|
|
4526
4641
|
__pyx_t_6 = 0;
|
|
4527
4642
|
__pyx_t_7 = 0;
|
|
4528
4643
|
__pyx_r = __pyx_t_1;
|
|
4529
4644
|
__pyx_t_1 = 0;
|
|
4530
4645
|
goto __pyx_L0;
|
|
4531
4646
|
|
|
4532
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4647
|
+
/* "fontTools/cu2qu/cu2qu.py":180
|
|
4533
4648
|
*
|
|
4534
4649
|
*
|
|
4535
4650
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4553,7 +4668,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4553
4668
|
return __pyx_r;
|
|
4554
4669
|
}
|
|
4555
4670
|
|
|
4556
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4671
|
+
/* "fontTools/cu2qu/cu2qu.py":209
|
|
4557
4672
|
*
|
|
4558
4673
|
*
|
|
4559
4674
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4583,7 +4698,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4583
4698
|
int __pyx_clineno = 0;
|
|
4584
4699
|
__Pyx_RefNannySetupContext("split_cubic_into_three", 0);
|
|
4585
4700
|
|
|
4586
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4701
|
+
/* "fontTools/cu2qu/cu2qu.py":238
|
|
4587
4702
|
* values).
|
|
4588
4703
|
* """
|
|
4589
4704
|
* mid1 = (8 * p0 + 12 * p1 + 6 * p2 + p3) * (1 / 27) # <<<<<<<<<<<<<<
|
|
@@ -4592,7 +4707,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4592
4707
|
*/
|
|
4593
4708
|
__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));
|
|
4594
4709
|
|
|
4595
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4710
|
+
/* "fontTools/cu2qu/cu2qu.py":239
|
|
4596
4711
|
* """
|
|
4597
4712
|
* mid1 = (8 * p0 + 12 * p1 + 6 * p2 + p3) * (1 / 27)
|
|
4598
4713
|
* deriv1 = (p3 + 3 * p2 - 4 * p0) * (1 / 27) # <<<<<<<<<<<<<<
|
|
@@ -4601,7 +4716,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4601
4716
|
*/
|
|
4602
4717
|
__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));
|
|
4603
4718
|
|
|
4604
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4719
|
+
/* "fontTools/cu2qu/cu2qu.py":240
|
|
4605
4720
|
* mid1 = (8 * p0 + 12 * p1 + 6 * p2 + p3) * (1 / 27)
|
|
4606
4721
|
* deriv1 = (p3 + 3 * p2 - 4 * p0) * (1 / 27)
|
|
4607
4722
|
* mid2 = (p0 + 6 * p1 + 12 * p2 + 8 * p3) * (1 / 27) # <<<<<<<<<<<<<<
|
|
@@ -4610,7 +4725,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4610
4725
|
*/
|
|
4611
4726
|
__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));
|
|
4612
4727
|
|
|
4613
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4728
|
+
/* "fontTools/cu2qu/cu2qu.py":241
|
|
4614
4729
|
* deriv1 = (p3 + 3 * p2 - 4 * p0) * (1 / 27)
|
|
4615
4730
|
* mid2 = (p0 + 6 * p1 + 12 * p2 + 8 * p3) * (1 / 27)
|
|
4616
4731
|
* deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27) # <<<<<<<<<<<<<<
|
|
@@ -4619,7 +4734,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4619
4734
|
*/
|
|
4620
4735
|
__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));
|
|
4621
4736
|
|
|
4622
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4737
|
+
/* "fontTools/cu2qu/cu2qu.py":242
|
|
4623
4738
|
* mid2 = (p0 + 6 * p1 + 12 * p2 + 8 * p3) * (1 / 27)
|
|
4624
4739
|
* deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27)
|
|
4625
4740
|
* return ( # <<<<<<<<<<<<<<
|
|
@@ -4628,129 +4743,129 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4628
4743
|
*/
|
|
4629
4744
|
__Pyx_XDECREF(__pyx_r);
|
|
4630
4745
|
|
|
4631
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4746
|
+
/* "fontTools/cu2qu/cu2qu.py":243
|
|
4632
4747
|
* deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27)
|
|
4633
4748
|
* return (
|
|
4634
4749
|
* (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1), # <<<<<<<<<<<<<<
|
|
4635
4750
|
* (mid1, mid1 + deriv1, mid2 - deriv2, mid2),
|
|
4636
4751
|
* (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3),
|
|
4637
4752
|
*/
|
|
4638
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4753
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_p0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
|
|
4639
4754
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4640
4755
|
__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);
|
|
4641
4756
|
__pyx_t_3 = __pyx_t_double_complex_from_parts(3.0, 0);
|
|
4642
4757
|
if (unlikely(__Pyx_c_is_zero_double(__pyx_t_3))) {
|
|
4643
4758
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
4644
|
-
__PYX_ERR(0,
|
|
4759
|
+
__PYX_ERR(0, 243, __pyx_L1_error)
|
|
4645
4760
|
}
|
|
4646
4761
|
__pyx_t_4 = __Pyx_c_quot_double(__pyx_t_2, __pyx_t_3);
|
|
4647
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4762
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error)
|
|
4648
4763
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4649
4764
|
__pyx_t_4 = __Pyx_c_diff_double(__pyx_v_mid1, __pyx_v_deriv1);
|
|
4650
|
-
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4765
|
+
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error)
|
|
4651
4766
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4652
|
-
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4767
|
+
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error)
|
|
4653
4768
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4654
|
-
__pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
4769
|
+
__pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 243, __pyx_L1_error)
|
|
4655
4770
|
__Pyx_GOTREF(__pyx_t_8);
|
|
4656
4771
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4657
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4772
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
|
|
4658
4773
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4659
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4774
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
|
|
4660
4775
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
4661
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
4776
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
|
|
4662
4777
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
4663
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_7) != (0)) __PYX_ERR(0,
|
|
4778
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_7) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
|
|
4664
4779
|
__pyx_t_1 = 0;
|
|
4665
4780
|
__pyx_t_5 = 0;
|
|
4666
4781
|
__pyx_t_6 = 0;
|
|
4667
4782
|
__pyx_t_7 = 0;
|
|
4668
4783
|
|
|
4669
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4784
|
+
/* "fontTools/cu2qu/cu2qu.py":244
|
|
4670
4785
|
* return (
|
|
4671
4786
|
* (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1),
|
|
4672
4787
|
* (mid1, mid1 + deriv1, mid2 - deriv2, mid2), # <<<<<<<<<<<<<<
|
|
4673
4788
|
* (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3),
|
|
4674
4789
|
* )
|
|
4675
4790
|
*/
|
|
4676
|
-
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4791
|
+
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_mid1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 244, __pyx_L1_error)
|
|
4677
4792
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4678
4793
|
__pyx_t_4 = __Pyx_c_sum_double(__pyx_v_mid1, __pyx_v_deriv1);
|
|
4679
|
-
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4794
|
+
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
|
|
4680
4795
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4681
4796
|
__pyx_t_4 = __Pyx_c_diff_double(__pyx_v_mid2, __pyx_v_deriv2);
|
|
4682
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4797
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
|
|
4683
4798
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4684
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4799
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
|
|
4685
4800
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4686
|
-
__pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
4801
|
+
__pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 244, __pyx_L1_error)
|
|
4687
4802
|
__Pyx_GOTREF(__pyx_t_9);
|
|
4688
4803
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
4689
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7) != (0)) __PYX_ERR(0,
|
|
4804
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7) != (0)) __PYX_ERR(0, 244, __pyx_L1_error);
|
|
4690
4805
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
4691
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
4806
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6) != (0)) __PYX_ERR(0, 244, __pyx_L1_error);
|
|
4692
4807
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4693
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4808
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 244, __pyx_L1_error);
|
|
4694
4809
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4695
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4810
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_1) != (0)) __PYX_ERR(0, 244, __pyx_L1_error);
|
|
4696
4811
|
__pyx_t_7 = 0;
|
|
4697
4812
|
__pyx_t_6 = 0;
|
|
4698
4813
|
__pyx_t_5 = 0;
|
|
4699
4814
|
__pyx_t_1 = 0;
|
|
4700
4815
|
|
|
4701
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4816
|
+
/* "fontTools/cu2qu/cu2qu.py":245
|
|
4702
4817
|
* (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1),
|
|
4703
4818
|
* (mid1, mid1 + deriv1, mid2 - deriv2, mid2),
|
|
4704
4819
|
* (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3), # <<<<<<<<<<<<<<
|
|
4705
4820
|
* )
|
|
4706
4821
|
*
|
|
4707
4822
|
*/
|
|
4708
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
4823
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_mid2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
|
|
4709
4824
|
__Pyx_GOTREF(__pyx_t_1);
|
|
4710
4825
|
__pyx_t_4 = __Pyx_c_sum_double(__pyx_v_mid2, __pyx_v_deriv2);
|
|
4711
|
-
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
4826
|
+
__pyx_t_5 = __pyx_PyComplex_FromComplex(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 245, __pyx_L1_error)
|
|
4712
4827
|
__Pyx_GOTREF(__pyx_t_5);
|
|
4713
4828
|
__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));
|
|
4714
4829
|
__pyx_t_3 = __pyx_t_double_complex_from_parts(3.0, 0);
|
|
4715
4830
|
if (unlikely(__Pyx_c_is_zero_double(__pyx_t_3))) {
|
|
4716
4831
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
4717
|
-
__PYX_ERR(0,
|
|
4832
|
+
__PYX_ERR(0, 245, __pyx_L1_error)
|
|
4718
4833
|
}
|
|
4719
4834
|
__pyx_t_2 = __Pyx_c_quot_double(__pyx_t_4, __pyx_t_3);
|
|
4720
|
-
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
4835
|
+
__pyx_t_6 = __pyx_PyComplex_FromComplex(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error)
|
|
4721
4836
|
__Pyx_GOTREF(__pyx_t_6);
|
|
4722
|
-
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4837
|
+
__pyx_t_7 = __pyx_PyComplex_FromComplex(__pyx_v_p3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 245, __pyx_L1_error)
|
|
4723
4838
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4724
|
-
__pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
4839
|
+
__pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 245, __pyx_L1_error)
|
|
4725
4840
|
__Pyx_GOTREF(__pyx_t_10);
|
|
4726
4841
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
4727
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
4842
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 245, __pyx_L1_error);
|
|
4728
4843
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
4729
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
4844
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 245, __pyx_L1_error);
|
|
4730
4845
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
4731
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
4846
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6) != (0)) __PYX_ERR(0, 245, __pyx_L1_error);
|
|
4732
4847
|
__Pyx_GIVEREF(__pyx_t_7);
|
|
4733
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7) != (0)) __PYX_ERR(0,
|
|
4848
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_7) != (0)) __PYX_ERR(0, 245, __pyx_L1_error);
|
|
4734
4849
|
__pyx_t_1 = 0;
|
|
4735
4850
|
__pyx_t_5 = 0;
|
|
4736
4851
|
__pyx_t_6 = 0;
|
|
4737
4852
|
__pyx_t_7 = 0;
|
|
4738
4853
|
|
|
4739
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4854
|
+
/* "fontTools/cu2qu/cu2qu.py":243
|
|
4740
4855
|
* deriv2 = (4 * p3 - 3 * p1 - p0) * (1 / 27)
|
|
4741
4856
|
* return (
|
|
4742
4857
|
* (p0, (2 * p0 + p1) / 3.0, mid1 - deriv1, mid1), # <<<<<<<<<<<<<<
|
|
4743
4858
|
* (mid1, mid1 + deriv1, mid2 - deriv2, mid2),
|
|
4744
4859
|
* (mid2, mid2 + deriv2, (p2 + 2 * p3) / 3.0, p3),
|
|
4745
4860
|
*/
|
|
4746
|
-
__pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
4861
|
+
__pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 243, __pyx_L1_error)
|
|
4747
4862
|
__Pyx_GOTREF(__pyx_t_7);
|
|
4748
4863
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
4749
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8) != (0)) __PYX_ERR(0,
|
|
4864
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
|
|
4750
4865
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
4751
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0,
|
|
4866
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
|
|
4752
4867
|
__Pyx_GIVEREF(__pyx_t_10);
|
|
4753
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_10) != (0)) __PYX_ERR(0,
|
|
4868
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_10) != (0)) __PYX_ERR(0, 243, __pyx_L1_error);
|
|
4754
4869
|
__pyx_t_8 = 0;
|
|
4755
4870
|
__pyx_t_9 = 0;
|
|
4756
4871
|
__pyx_t_10 = 0;
|
|
@@ -4758,7 +4873,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4758
4873
|
__pyx_t_7 = 0;
|
|
4759
4874
|
goto __pyx_L0;
|
|
4760
4875
|
|
|
4761
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4876
|
+
/* "fontTools/cu2qu/cu2qu.py":209
|
|
4762
4877
|
*
|
|
4763
4878
|
*
|
|
4764
4879
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4783,7 +4898,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_split_cubic_into
|
|
|
4783
4898
|
return __pyx_r;
|
|
4784
4899
|
}
|
|
4785
4900
|
|
|
4786
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4901
|
+
/* "fontTools/cu2qu/cu2qu.py":249
|
|
4787
4902
|
*
|
|
4788
4903
|
*
|
|
4789
4904
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4796,7 +4911,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4796
4911
|
__pyx_t_double_complex __pyx_v__p2;
|
|
4797
4912
|
__pyx_t_double_complex __pyx_r;
|
|
4798
4913
|
|
|
4799
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4914
|
+
/* "fontTools/cu2qu/cu2qu.py":273
|
|
4800
4915
|
* complex: Location of candidate control point on quadratic curve.
|
|
4801
4916
|
* """
|
|
4802
4917
|
* _p1 = p0 + (p1 - p0) * 1.5 # <<<<<<<<<<<<<<
|
|
@@ -4805,7 +4920,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4805
4920
|
*/
|
|
4806
4921
|
__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)));
|
|
4807
4922
|
|
|
4808
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4923
|
+
/* "fontTools/cu2qu/cu2qu.py":274
|
|
4809
4924
|
* """
|
|
4810
4925
|
* _p1 = p0 + (p1 - p0) * 1.5
|
|
4811
4926
|
* _p2 = p3 + (p2 - p3) * 1.5 # <<<<<<<<<<<<<<
|
|
@@ -4814,7 +4929,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4814
4929
|
*/
|
|
4815
4930
|
__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)));
|
|
4816
4931
|
|
|
4817
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4932
|
+
/* "fontTools/cu2qu/cu2qu.py":275
|
|
4818
4933
|
* _p1 = p0 + (p1 - p0) * 1.5
|
|
4819
4934
|
* _p2 = p3 + (p2 - p3) * 1.5
|
|
4820
4935
|
* return _p1 + (_p2 - _p1) * t # <<<<<<<<<<<<<<
|
|
@@ -4824,7 +4939,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4824
4939
|
__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)));
|
|
4825
4940
|
goto __pyx_L0;
|
|
4826
4941
|
|
|
4827
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4942
|
+
/* "fontTools/cu2qu/cu2qu.py":249
|
|
4828
4943
|
*
|
|
4829
4944
|
*
|
|
4830
4945
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4837,7 +4952,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cub
|
|
|
4837
4952
|
return __pyx_r;
|
|
4838
4953
|
}
|
|
4839
4954
|
|
|
4840
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4955
|
+
/* "fontTools/cu2qu/cu2qu.py":278
|
|
4841
4956
|
*
|
|
4842
4957
|
*
|
|
4843
4958
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -4875,7 +4990,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4875
4990
|
int __pyx_clineno = 0;
|
|
4876
4991
|
__Pyx_RefNannySetupContext("calc_intersect", 0);
|
|
4877
4992
|
|
|
4878
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
4993
|
+
/* "fontTools/cu2qu/cu2qu.py":296
|
|
4879
4994
|
* if no intersection was found.
|
|
4880
4995
|
* """
|
|
4881
4996
|
* ab = b - a # <<<<<<<<<<<<<<
|
|
@@ -4884,7 +4999,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4884
4999
|
*/
|
|
4885
5000
|
__pyx_v_ab = __Pyx_c_diff_double(__pyx_v_b, __pyx_v_a);
|
|
4886
5001
|
|
|
4887
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5002
|
+
/* "fontTools/cu2qu/cu2qu.py":297
|
|
4888
5003
|
* """
|
|
4889
5004
|
* ab = b - a
|
|
4890
5005
|
* cd = d - c # <<<<<<<<<<<<<<
|
|
@@ -4893,7 +5008,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4893
5008
|
*/
|
|
4894
5009
|
__pyx_v_cd = __Pyx_c_diff_double(__pyx_v_d, __pyx_v_c);
|
|
4895
5010
|
|
|
4896
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5011
|
+
/* "fontTools/cu2qu/cu2qu.py":298
|
|
4897
5012
|
* ab = b - a
|
|
4898
5013
|
* cd = d - c
|
|
4899
5014
|
* p = ab * 1j # <<<<<<<<<<<<<<
|
|
@@ -4902,7 +5017,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4902
5017
|
*/
|
|
4903
5018
|
__pyx_v_p = __Pyx_c_prod_double(__pyx_v_ab, __pyx_t_double_complex_from_parts(0, 1.0));
|
|
4904
5019
|
|
|
4905
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5020
|
+
/* "fontTools/cu2qu/cu2qu.py":299
|
|
4906
5021
|
* cd = d - c
|
|
4907
5022
|
* p = ab * 1j
|
|
4908
5023
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -4918,22 +5033,22 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4918
5033
|
__Pyx_XGOTREF(__pyx_t_3);
|
|
4919
5034
|
/*try:*/ {
|
|
4920
5035
|
|
|
4921
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5036
|
+
/* "fontTools/cu2qu/cu2qu.py":300
|
|
4922
5037
|
* p = ab * 1j
|
|
4923
5038
|
* try:
|
|
4924
5039
|
* h = dot(p, a - c) / dot(p, cd) # <<<<<<<<<<<<<<
|
|
4925
5040
|
* except ZeroDivisionError:
|
|
4926
5041
|
* # if 3 or 4 points are equal, we do have an intersection despite the zero-div:
|
|
4927
5042
|
*/
|
|
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,
|
|
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,
|
|
5043
|
+
__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, 300, __pyx_L3_error)
|
|
5044
|
+
__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, 300, __pyx_L3_error)
|
|
4930
5045
|
if (unlikely(__pyx_t_5 == 0)) {
|
|
4931
5046
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
4932
|
-
__PYX_ERR(0,
|
|
5047
|
+
__PYX_ERR(0, 300, __pyx_L3_error)
|
|
4933
5048
|
}
|
|
4934
5049
|
__pyx_v_h = (__pyx_t_4 / __pyx_t_5);
|
|
4935
5050
|
|
|
4936
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5051
|
+
/* "fontTools/cu2qu/cu2qu.py":299
|
|
4937
5052
|
* cd = d - c
|
|
4938
5053
|
* p = ab * 1j
|
|
4939
5054
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -4947,7 +5062,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4947
5062
|
goto __pyx_L8_try_end;
|
|
4948
5063
|
__pyx_L3_error:;
|
|
4949
5064
|
|
|
4950
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5065
|
+
/* "fontTools/cu2qu/cu2qu.py":301
|
|
4951
5066
|
* try:
|
|
4952
5067
|
* h = dot(p, a - c) / dot(p, cd)
|
|
4953
5068
|
* except ZeroDivisionError: # <<<<<<<<<<<<<<
|
|
@@ -4957,12 +5072,12 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4957
5072
|
__pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ZeroDivisionError);
|
|
4958
5073
|
if (__pyx_t_6) {
|
|
4959
5074
|
__Pyx_AddTraceback("fontTools.cu2qu.cu2qu.calc_intersect", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
4960
|
-
if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0,
|
|
5075
|
+
if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 301, __pyx_L5_except_error)
|
|
4961
5076
|
__Pyx_XGOTREF(__pyx_t_7);
|
|
4962
5077
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
4963
5078
|
__Pyx_XGOTREF(__pyx_t_9);
|
|
4964
5079
|
|
|
4965
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5080
|
+
/* "fontTools/cu2qu/cu2qu.py":306
|
|
4966
5081
|
* # solution if it's within tolerance:
|
|
4967
5082
|
* # https://github.com/linebender/kurbo/pull/484
|
|
4968
5083
|
* if b == c and (a == b or c == d): # <<<<<<<<<<<<<<
|
|
@@ -4986,7 +5101,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4986
5101
|
__pyx_L12_bool_binop_done:;
|
|
4987
5102
|
if (__pyx_t_10) {
|
|
4988
5103
|
|
|
4989
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5104
|
+
/* "fontTools/cu2qu/cu2qu.py":307
|
|
4990
5105
|
* # https://github.com/linebender/kurbo/pull/484
|
|
4991
5106
|
* if b == c and (a == b or c == d):
|
|
4992
5107
|
* return b # <<<<<<<<<<<<<<
|
|
@@ -4999,7 +5114,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
4999
5114
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
5000
5115
|
goto __pyx_L6_except_return;
|
|
5001
5116
|
|
|
5002
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5117
|
+
/* "fontTools/cu2qu/cu2qu.py":306
|
|
5003
5118
|
* # solution if it's within tolerance:
|
|
5004
5119
|
* # https://github.com/linebender/kurbo/pull/484
|
|
5005
5120
|
* if b == c and (a == b or c == d): # <<<<<<<<<<<<<<
|
|
@@ -5008,7 +5123,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
5008
5123
|
*/
|
|
5009
5124
|
}
|
|
5010
5125
|
|
|
5011
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5126
|
+
/* "fontTools/cu2qu/cu2qu.py":308
|
|
5012
5127
|
* if b == c and (a == b or c == d):
|
|
5013
5128
|
* return b
|
|
5014
5129
|
* return complex(NAN, NAN) # <<<<<<<<<<<<<<
|
|
@@ -5018,9 +5133,9 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
5018
5133
|
__pyx_t_13 = NULL;
|
|
5019
5134
|
__Pyx_INCREF((PyObject *)(&PyComplex_Type));
|
|
5020
5135
|
__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,
|
|
5136
|
+
__Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_NAN); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 308, __pyx_L5_except_error)
|
|
5022
5137
|
__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,
|
|
5138
|
+
__Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_NAN); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 308, __pyx_L5_except_error)
|
|
5024
5139
|
__Pyx_GOTREF(__pyx_t_16);
|
|
5025
5140
|
__pyx_t_17 = 1;
|
|
5026
5141
|
{
|
|
@@ -5030,10 +5145,10 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
5030
5145
|
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
5031
5146
|
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
|
|
5032
5147
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5033
|
-
if (unlikely(!__pyx_t_12)) __PYX_ERR(0,
|
|
5148
|
+
if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 308, __pyx_L5_except_error)
|
|
5034
5149
|
__Pyx_GOTREF(__pyx_t_12);
|
|
5035
5150
|
}
|
|
5036
|
-
__pyx_t_18 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_12); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5151
|
+
__pyx_t_18 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_12); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 308, __pyx_L5_except_error)
|
|
5037
5152
|
__Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
|
|
5038
5153
|
__pyx_r = __pyx_t_18;
|
|
5039
5154
|
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
@@ -5043,7 +5158,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
5043
5158
|
}
|
|
5044
5159
|
goto __pyx_L5_except_error;
|
|
5045
5160
|
|
|
5046
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5161
|
+
/* "fontTools/cu2qu/cu2qu.py":299
|
|
5047
5162
|
* cd = d - c
|
|
5048
5163
|
* p = ab * 1j
|
|
5049
5164
|
* try: # <<<<<<<<<<<<<<
|
|
@@ -5065,7 +5180,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
5065
5180
|
__pyx_L8_try_end:;
|
|
5066
5181
|
}
|
|
5067
5182
|
|
|
5068
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5183
|
+
/* "fontTools/cu2qu/cu2qu.py":309
|
|
5069
5184
|
* return b
|
|
5070
5185
|
* return complex(NAN, NAN)
|
|
5071
5186
|
* return c + cd * h # <<<<<<<<<<<<<<
|
|
@@ -5075,7 +5190,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
5075
5190
|
__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)));
|
|
5076
5191
|
goto __pyx_L0;
|
|
5077
5192
|
|
|
5078
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5193
|
+
/* "fontTools/cu2qu/cu2qu.py":278
|
|
5079
5194
|
*
|
|
5080
5195
|
*
|
|
5081
5196
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5100,7 +5215,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_f_9fontTools_5cu2qu_5cu2qu_cal
|
|
|
5100
5215
|
return __pyx_r;
|
|
5101
5216
|
}
|
|
5102
5217
|
|
|
5103
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5218
|
+
/* "fontTools/cu2qu/cu2qu.py":312
|
|
5104
5219
|
*
|
|
5105
5220
|
*
|
|
5106
5221
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5120,7 +5235,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5120
5235
|
const char *__pyx_filename = NULL;
|
|
5121
5236
|
int __pyx_clineno = 0;
|
|
5122
5237
|
|
|
5123
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5238
|
+
/* "fontTools/cu2qu/cu2qu.py":341
|
|
5124
5239
|
* """
|
|
5125
5240
|
* # First check p2 then p1, as p2 has higher error early on.
|
|
5126
5241
|
* if abs(p2) <= tolerance and abs(p1) <= tolerance: # <<<<<<<<<<<<<<
|
|
@@ -5138,7 +5253,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5138
5253
|
__pyx_L4_bool_binop_done:;
|
|
5139
5254
|
if (__pyx_t_1) {
|
|
5140
5255
|
|
|
5141
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5256
|
+
/* "fontTools/cu2qu/cu2qu.py":342
|
|
5142
5257
|
* # First check p2 then p1, as p2 has higher error early on.
|
|
5143
5258
|
* if abs(p2) <= tolerance and abs(p1) <= tolerance:
|
|
5144
5259
|
* return True # <<<<<<<<<<<<<<
|
|
@@ -5148,7 +5263,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5148
5263
|
__pyx_r = 1;
|
|
5149
5264
|
goto __pyx_L0;
|
|
5150
5265
|
|
|
5151
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5266
|
+
/* "fontTools/cu2qu/cu2qu.py":341
|
|
5152
5267
|
* """
|
|
5153
5268
|
* # First check p2 then p1, as p2 has higher error early on.
|
|
5154
5269
|
* if abs(p2) <= tolerance and abs(p1) <= tolerance: # <<<<<<<<<<<<<<
|
|
@@ -5157,7 +5272,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5157
5272
|
*/
|
|
5158
5273
|
}
|
|
5159
5274
|
|
|
5160
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5275
|
+
/* "fontTools/cu2qu/cu2qu.py":345
|
|
5161
5276
|
*
|
|
5162
5277
|
* # Split.
|
|
5163
5278
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125 # <<<<<<<<<<<<<<
|
|
@@ -5166,7 +5281,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5166
5281
|
*/
|
|
5167
5282
|
__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));
|
|
5168
5283
|
|
|
5169
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5284
|
+
/* "fontTools/cu2qu/cu2qu.py":346
|
|
5170
5285
|
* # Split.
|
|
5171
5286
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
5172
5287
|
* if abs(mid) > tolerance: # <<<<<<<<<<<<<<
|
|
@@ -5176,7 +5291,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5176
5291
|
__pyx_t_1 = (__Pyx_c_abs_double(__pyx_v_mid) > __pyx_v_tolerance);
|
|
5177
5292
|
if (__pyx_t_1) {
|
|
5178
5293
|
|
|
5179
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5294
|
+
/* "fontTools/cu2qu/cu2qu.py":347
|
|
5180
5295
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
5181
5296
|
* if abs(mid) > tolerance:
|
|
5182
5297
|
* return False # <<<<<<<<<<<<<<
|
|
@@ -5186,7 +5301,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5186
5301
|
__pyx_r = 0;
|
|
5187
5302
|
goto __pyx_L0;
|
|
5188
5303
|
|
|
5189
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5304
|
+
/* "fontTools/cu2qu/cu2qu.py":346
|
|
5190
5305
|
* # Split.
|
|
5191
5306
|
* mid = (p0 + 3 * (p1 + p2) + p3) * 0.125
|
|
5192
5307
|
* if abs(mid) > tolerance: # <<<<<<<<<<<<<<
|
|
@@ -5195,7 +5310,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5195
5310
|
*/
|
|
5196
5311
|
}
|
|
5197
5312
|
|
|
5198
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5313
|
+
/* "fontTools/cu2qu/cu2qu.py":348
|
|
5199
5314
|
* if abs(mid) > tolerance:
|
|
5200
5315
|
* return False
|
|
5201
5316
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125 # <<<<<<<<<<<<<<
|
|
@@ -5204,34 +5319,34 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5204
5319
|
*/
|
|
5205
5320
|
__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));
|
|
5206
5321
|
|
|
5207
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5322
|
+
/* "fontTools/cu2qu/cu2qu.py":349
|
|
5208
5323
|
* return False
|
|
5209
5324
|
* deriv3 = (p3 + p2 - p1 - p0) * 0.125
|
|
5210
5325
|
* return cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
|
|
5211
5326
|
* p0, (p0 + p1) * 0.5, mid - deriv3, mid, tolerance
|
|
5212
5327
|
* ) and cubic_farthest_fit_inside(mid, mid + deriv3, (p2 + p3) * 0.5, p3, tolerance)
|
|
5213
5328
|
*/
|
|
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,
|
|
5329
|
+
__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, 349, __pyx_L1_error)
|
|
5215
5330
|
if (__pyx_t_4) {
|
|
5216
5331
|
} else {
|
|
5217
5332
|
__pyx_t_3 = __pyx_t_4;
|
|
5218
5333
|
goto __pyx_L7_bool_binop_done;
|
|
5219
5334
|
}
|
|
5220
5335
|
|
|
5221
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5336
|
+
/* "fontTools/cu2qu/cu2qu.py":351
|
|
5222
5337
|
* return cubic_farthest_fit_inside(
|
|
5223
5338
|
* p0, (p0 + p1) * 0.5, mid - deriv3, mid, tolerance
|
|
5224
5339
|
* ) and cubic_farthest_fit_inside(mid, mid + deriv3, (p2 + p3) * 0.5, p3, tolerance) # <<<<<<<<<<<<<<
|
|
5225
5340
|
*
|
|
5226
5341
|
*
|
|
5227
5342
|
*/
|
|
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,
|
|
5343
|
+
__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, 351, __pyx_L1_error)
|
|
5229
5344
|
__pyx_t_3 = __pyx_t_4;
|
|
5230
5345
|
__pyx_L7_bool_binop_done:;
|
|
5231
5346
|
__pyx_r = __pyx_t_3;
|
|
5232
5347
|
goto __pyx_L0;
|
|
5233
5348
|
|
|
5234
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5349
|
+
/* "fontTools/cu2qu/cu2qu.py":312
|
|
5235
5350
|
*
|
|
5236
5351
|
*
|
|
5237
5352
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5247,7 +5362,7 @@ static int __pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_farthest_fit_inside(__pyx_t_do
|
|
|
5247
5362
|
return __pyx_r;
|
|
5248
5363
|
}
|
|
5249
5364
|
|
|
5250
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5365
|
+
/* "fontTools/cu2qu/cu2qu.py":354
|
|
5251
5366
|
*
|
|
5252
5367
|
*
|
|
5253
5368
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5280,33 +5395,33 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5280
5395
|
int __pyx_clineno = 0;
|
|
5281
5396
|
__Pyx_RefNannySetupContext("cubic_approx_quadratic", 0);
|
|
5282
5397
|
|
|
5283
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5398
|
+
/* "fontTools/cu2qu/cu2qu.py":378
|
|
5284
5399
|
* """
|
|
5285
5400
|
*
|
|
5286
5401
|
* q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3]) # <<<<<<<<<<<<<<
|
|
5287
5402
|
* if math.isnan(q1.imag):
|
|
5288
5403
|
* return None
|
|
5289
5404
|
*/
|
|
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,
|
|
5405
|
+
__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, 378, __pyx_L1_error)
|
|
5291
5406
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5292
|
-
__pyx_t_2 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5407
|
+
__pyx_t_2 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
|
|
5293
5408
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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,
|
|
5409
|
+
__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, 378, __pyx_L1_error)
|
|
5295
5410
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5296
|
-
__pyx_t_3 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5411
|
+
__pyx_t_3 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
|
|
5297
5412
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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,
|
|
5413
|
+
__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, 378, __pyx_L1_error)
|
|
5299
5414
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5300
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5415
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
|
|
5301
5416
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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,
|
|
5417
|
+
__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, 378, __pyx_L1_error)
|
|
5303
5418
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5304
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5419
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 378, __pyx_L1_error)
|
|
5305
5420
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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,
|
|
5421
|
+
__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, 378, __pyx_L1_error)
|
|
5307
5422
|
__pyx_v_q1 = __pyx_t_6;
|
|
5308
5423
|
|
|
5309
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5424
|
+
/* "fontTools/cu2qu/cu2qu.py":379
|
|
5310
5425
|
*
|
|
5311
5426
|
* q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3])
|
|
5312
5427
|
* if math.isnan(q1.imag): # <<<<<<<<<<<<<<
|
|
@@ -5314,12 +5429,12 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5314
5429
|
* c0 = cubic[0]
|
|
5315
5430
|
*/
|
|
5316
5431
|
__pyx_t_7 = NULL;
|
|
5317
|
-
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5432
|
+
__Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_math); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 379, __pyx_L1_error)
|
|
5318
5433
|
__Pyx_GOTREF(__pyx_t_8);
|
|
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,
|
|
5434
|
+
__pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_isnan); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 379, __pyx_L1_error)
|
|
5320
5435
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5321
5436
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5322
|
-
__pyx_t_8 = PyFloat_FromDouble(__Pyx_CIMAG(__pyx_v_q1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5437
|
+
__pyx_t_8 = PyFloat_FromDouble(__Pyx_CIMAG(__pyx_v_q1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 379, __pyx_L1_error)
|
|
5323
5438
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5324
5439
|
__pyx_t_10 = 1;
|
|
5325
5440
|
#if CYTHON_UNPACK_METHODS
|
|
@@ -5339,14 +5454,14 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5339
5454
|
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
|
|
5340
5455
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5341
5456
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
5342
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5457
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
|
|
5343
5458
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5344
5459
|
}
|
|
5345
|
-
__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0,
|
|
5460
|
+
__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 379, __pyx_L1_error)
|
|
5346
5461
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5347
5462
|
if (__pyx_t_11) {
|
|
5348
5463
|
|
|
5349
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5464
|
+
/* "fontTools/cu2qu/cu2qu.py":380
|
|
5350
5465
|
* q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3])
|
|
5351
5466
|
* if math.isnan(q1.imag):
|
|
5352
5467
|
* return None # <<<<<<<<<<<<<<
|
|
@@ -5357,7 +5472,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5357
5472
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
5358
5473
|
goto __pyx_L0;
|
|
5359
5474
|
|
|
5360
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5475
|
+
/* "fontTools/cu2qu/cu2qu.py":379
|
|
5361
5476
|
*
|
|
5362
5477
|
* q1 = calc_intersect(cubic[0], cubic[1], cubic[2], cubic[3])
|
|
5363
5478
|
* if math.isnan(q1.imag): # <<<<<<<<<<<<<<
|
|
@@ -5366,33 +5481,33 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5366
5481
|
*/
|
|
5367
5482
|
}
|
|
5368
5483
|
|
|
5369
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5484
|
+
/* "fontTools/cu2qu/cu2qu.py":381
|
|
5370
5485
|
* if math.isnan(q1.imag):
|
|
5371
5486
|
* return None
|
|
5372
5487
|
* c0 = cubic[0] # <<<<<<<<<<<<<<
|
|
5373
5488
|
* c3 = cubic[3]
|
|
5374
5489
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5375
5490
|
*/
|
|
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,
|
|
5491
|
+
__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, 381, __pyx_L1_error)
|
|
5377
5492
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5378
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5493
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 381, __pyx_L1_error)
|
|
5379
5494
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5380
5495
|
__pyx_v_c0 = __pyx_t_6;
|
|
5381
5496
|
|
|
5382
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5497
|
+
/* "fontTools/cu2qu/cu2qu.py":382
|
|
5383
5498
|
* return None
|
|
5384
5499
|
* c0 = cubic[0]
|
|
5385
5500
|
* c3 = cubic[3] # <<<<<<<<<<<<<<
|
|
5386
5501
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5387
5502
|
* c2 = c3 + (q1 - c3) * (2 / 3)
|
|
5388
5503
|
*/
|
|
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,
|
|
5504
|
+
__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, 382, __pyx_L1_error)
|
|
5390
5505
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5391
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5506
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 382, __pyx_L1_error)
|
|
5392
5507
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5393
5508
|
__pyx_v_c3 = __pyx_t_6;
|
|
5394
5509
|
|
|
5395
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5510
|
+
/* "fontTools/cu2qu/cu2qu.py":383
|
|
5396
5511
|
* c0 = cubic[0]
|
|
5397
5512
|
* c3 = cubic[3]
|
|
5398
5513
|
* c1 = c0 + (q1 - c0) * (2 / 3) # <<<<<<<<<<<<<<
|
|
@@ -5401,7 +5516,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5401
5516
|
*/
|
|
5402
5517
|
__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)));
|
|
5403
5518
|
|
|
5404
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5519
|
+
/* "fontTools/cu2qu/cu2qu.py":384
|
|
5405
5520
|
* c3 = cubic[3]
|
|
5406
5521
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5407
5522
|
* c2 = c3 + (q1 - c3) * (2 / 3) # <<<<<<<<<<<<<<
|
|
@@ -5410,38 +5525,38 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5410
5525
|
*/
|
|
5411
5526
|
__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)));
|
|
5412
5527
|
|
|
5413
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5528
|
+
/* "fontTools/cu2qu/cu2qu.py":385
|
|
5414
5529
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5415
5530
|
* c2 = c3 + (q1 - c3) * (2 / 3)
|
|
5416
5531
|
* if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance): # <<<<<<<<<<<<<<
|
|
5417
5532
|
* return None
|
|
5418
5533
|
* return c0, q1, c3
|
|
5419
5534
|
*/
|
|
5420
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5535
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
|
|
5421
5536
|
__Pyx_GOTREF(__pyx_t_1);
|
|
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,
|
|
5537
|
+
__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, 385, __pyx_L1_error)
|
|
5423
5538
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5424
|
-
__pyx_t_8 = PyNumber_Subtract(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5539
|
+
__pyx_t_8 = PyNumber_Subtract(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 385, __pyx_L1_error)
|
|
5425
5540
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5426
5541
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
5427
5542
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
5428
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5543
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 385, __pyx_L1_error)
|
|
5429
5544
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5430
|
-
__pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5545
|
+
__pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 385, __pyx_L1_error)
|
|
5431
5546
|
__Pyx_GOTREF(__pyx_t_8);
|
|
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,
|
|
5547
|
+
__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, 385, __pyx_L1_error)
|
|
5433
5548
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5434
|
-
__pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5549
|
+
__pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error)
|
|
5435
5550
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5436
5551
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5437
5552
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
5438
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5553
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_1); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 385, __pyx_L1_error)
|
|
5439
5554
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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,
|
|
5555
|
+
__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, 385, __pyx_L1_error)
|
|
5441
5556
|
__pyx_t_11 = (!(__pyx_t_12 != 0));
|
|
5442
5557
|
if (__pyx_t_11) {
|
|
5443
5558
|
|
|
5444
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5559
|
+
/* "fontTools/cu2qu/cu2qu.py":386
|
|
5445
5560
|
* c2 = c3 + (q1 - c3) * (2 / 3)
|
|
5446
5561
|
* if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance):
|
|
5447
5562
|
* return None # <<<<<<<<<<<<<<
|
|
@@ -5452,7 +5567,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5452
5567
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
5453
5568
|
goto __pyx_L0;
|
|
5454
5569
|
|
|
5455
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5570
|
+
/* "fontTools/cu2qu/cu2qu.py":385
|
|
5456
5571
|
* c1 = c0 + (q1 - c0) * (2 / 3)
|
|
5457
5572
|
* c2 = c3 + (q1 - c3) * (2 / 3)
|
|
5458
5573
|
* if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance): # <<<<<<<<<<<<<<
|
|
@@ -5461,7 +5576,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5461
5576
|
*/
|
|
5462
5577
|
}
|
|
5463
5578
|
|
|
5464
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5579
|
+
/* "fontTools/cu2qu/cu2qu.py":387
|
|
5465
5580
|
* if not cubic_farthest_fit_inside(0, c1 - cubic[1], c2 - cubic[2], 0, tolerance):
|
|
5466
5581
|
* return None
|
|
5467
5582
|
* return c0, q1, c3 # <<<<<<<<<<<<<<
|
|
@@ -5469,20 +5584,20 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5469
5584
|
*
|
|
5470
5585
|
*/
|
|
5471
5586
|
__Pyx_XDECREF(__pyx_r);
|
|
5472
|
-
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
5587
|
+
__pyx_t_1 = __pyx_PyComplex_FromComplex(__pyx_v_c0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
|
|
5473
5588
|
__Pyx_GOTREF(__pyx_t_1);
|
|
5474
|
-
__pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_q1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
5589
|
+
__pyx_t_9 = __pyx_PyComplex_FromComplex(__pyx_v_q1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 387, __pyx_L1_error)
|
|
5475
5590
|
__Pyx_GOTREF(__pyx_t_9);
|
|
5476
|
-
__pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5591
|
+
__pyx_t_8 = __pyx_PyComplex_FromComplex(__pyx_v_c3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 387, __pyx_L1_error)
|
|
5477
5592
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5478
|
-
__pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0,
|
|
5593
|
+
__pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 387, __pyx_L1_error)
|
|
5479
5594
|
__Pyx_GOTREF(__pyx_t_7);
|
|
5480
5595
|
__Pyx_GIVEREF(__pyx_t_1);
|
|
5481
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0,
|
|
5596
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 387, __pyx_L1_error);
|
|
5482
5597
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
5483
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0,
|
|
5598
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 387, __pyx_L1_error);
|
|
5484
5599
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
5485
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_8) != (0)) __PYX_ERR(0,
|
|
5600
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_8) != (0)) __PYX_ERR(0, 387, __pyx_L1_error);
|
|
5486
5601
|
__pyx_t_1 = 0;
|
|
5487
5602
|
__pyx_t_9 = 0;
|
|
5488
5603
|
__pyx_t_8 = 0;
|
|
@@ -5490,7 +5605,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5490
5605
|
__pyx_t_7 = 0;
|
|
5491
5606
|
goto __pyx_L0;
|
|
5492
5607
|
|
|
5493
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5608
|
+
/* "fontTools/cu2qu/cu2qu.py":354
|
|
5494
5609
|
*
|
|
5495
5610
|
*
|
|
5496
5611
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5512,7 +5627,7 @@ static CYTHON_INLINE PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_qua
|
|
|
5512
5627
|
return __pyx_r;
|
|
5513
5628
|
}
|
|
5514
5629
|
|
|
5515
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5630
|
+
/* "fontTools/cu2qu/cu2qu.py":390
|
|
5516
5631
|
*
|
|
5517
5632
|
*
|
|
5518
5633
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -5561,7 +5676,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5561
5676
|
int __pyx_clineno = 0;
|
|
5562
5677
|
__Pyx_RefNannySetupContext("cubic_approx_spline", 0);
|
|
5563
5678
|
|
|
5564
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5679
|
+
/* "fontTools/cu2qu/cu2qu.py":419
|
|
5565
5680
|
* """
|
|
5566
5681
|
*
|
|
5567
5682
|
* if n == 1: # <<<<<<<<<<<<<<
|
|
@@ -5571,7 +5686,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5571
5686
|
__pyx_t_1 = (__pyx_v_n == 1);
|
|
5572
5687
|
if (__pyx_t_1) {
|
|
5573
5688
|
|
|
5574
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5689
|
+
/* "fontTools/cu2qu/cu2qu.py":420
|
|
5575
5690
|
*
|
|
5576
5691
|
* if n == 1:
|
|
5577
5692
|
* return cubic_approx_quadratic(cubic, tolerance) # <<<<<<<<<<<<<<
|
|
@@ -5579,13 +5694,13 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5579
5694
|
* return cubic
|
|
5580
5695
|
*/
|
|
5581
5696
|
__Pyx_XDECREF(__pyx_r);
|
|
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,
|
|
5697
|
+
__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, 420, __pyx_L1_error)
|
|
5583
5698
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5584
5699
|
__pyx_r = __pyx_t_2;
|
|
5585
5700
|
__pyx_t_2 = 0;
|
|
5586
5701
|
goto __pyx_L0;
|
|
5587
5702
|
|
|
5588
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5703
|
+
/* "fontTools/cu2qu/cu2qu.py":419
|
|
5589
5704
|
* """
|
|
5590
5705
|
*
|
|
5591
5706
|
* if n == 1: # <<<<<<<<<<<<<<
|
|
@@ -5594,7 +5709,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5594
5709
|
*/
|
|
5595
5710
|
}
|
|
5596
5711
|
|
|
5597
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5712
|
+
/* "fontTools/cu2qu/cu2qu.py":421
|
|
5598
5713
|
* if n == 1:
|
|
5599
5714
|
* return cubic_approx_quadratic(cubic, tolerance)
|
|
5600
5715
|
* if n == 2 and all_quadratic == False: # <<<<<<<<<<<<<<
|
|
@@ -5612,7 +5727,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5612
5727
|
__pyx_L5_bool_binop_done:;
|
|
5613
5728
|
if (__pyx_t_1) {
|
|
5614
5729
|
|
|
5615
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5730
|
+
/* "fontTools/cu2qu/cu2qu.py":422
|
|
5616
5731
|
* return cubic_approx_quadratic(cubic, tolerance)
|
|
5617
5732
|
* if n == 2 and all_quadratic == False:
|
|
5618
5733
|
* return cubic # <<<<<<<<<<<<<<
|
|
@@ -5624,7 +5739,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5624
5739
|
__pyx_r = __pyx_v_cubic;
|
|
5625
5740
|
goto __pyx_L0;
|
|
5626
5741
|
|
|
5627
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5742
|
+
/* "fontTools/cu2qu/cu2qu.py":421
|
|
5628
5743
|
* if n == 1:
|
|
5629
5744
|
* return cubic_approx_quadratic(cubic, tolerance)
|
|
5630
5745
|
* if n == 2 and all_quadratic == False: # <<<<<<<<<<<<<<
|
|
@@ -5633,97 +5748,97 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5633
5748
|
*/
|
|
5634
5749
|
}
|
|
5635
5750
|
|
|
5636
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5751
|
+
/* "fontTools/cu2qu/cu2qu.py":424
|
|
5637
5752
|
* return cubic
|
|
5638
5753
|
*
|
|
5639
5754
|
* cubics = split_cubic_into_n_iter(cubic[0], cubic[1], cubic[2], cubic[3], n) # <<<<<<<<<<<<<<
|
|
5640
5755
|
*
|
|
5641
5756
|
* # calculate the spline of quadratics and check errors at the same time.
|
|
5642
5757
|
*/
|
|
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,
|
|
5758
|
+
__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, 424, __pyx_L1_error)
|
|
5644
5759
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5645
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5760
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
|
|
5646
5761
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
5762
|
+
__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, 424, __pyx_L1_error)
|
|
5648
5763
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5649
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5764
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
|
|
5650
5765
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
5766
|
+
__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, 424, __pyx_L1_error)
|
|
5652
5767
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5653
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5768
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
|
|
5654
5769
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
5770
|
+
__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, 424, __pyx_L1_error)
|
|
5656
5771
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5657
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5772
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error)
|
|
5658
5773
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5659
|
-
__pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5774
|
+
__pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
|
|
5660
5775
|
__Pyx_GOTREF(__pyx_t_2);
|
|
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,
|
|
5776
|
+
__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, 424, __pyx_L1_error)
|
|
5662
5777
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5663
5778
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5664
5779
|
__pyx_v_cubics = __pyx_t_8;
|
|
5665
5780
|
__pyx_t_8 = 0;
|
|
5666
5781
|
|
|
5667
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5782
|
+
/* "fontTools/cu2qu/cu2qu.py":427
|
|
5668
5783
|
*
|
|
5669
5784
|
* # calculate the spline of quadratics and check errors at the same time.
|
|
5670
5785
|
* next_cubic = next(cubics) # <<<<<<<<<<<<<<
|
|
5671
5786
|
* next_q1 = cubic_approx_control(
|
|
5672
5787
|
* 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5673
5788
|
*/
|
|
5674
|
-
__pyx_t_8 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5789
|
+
__pyx_t_8 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 427, __pyx_L1_error)
|
|
5675
5790
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5676
5791
|
__pyx_v_next_cubic = __pyx_t_8;
|
|
5677
5792
|
__pyx_t_8 = 0;
|
|
5678
5793
|
|
|
5679
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5794
|
+
/* "fontTools/cu2qu/cu2qu.py":429
|
|
5680
5795
|
* next_cubic = next(cubics)
|
|
5681
5796
|
* next_q1 = cubic_approx_control(
|
|
5682
5797
|
* 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3] # <<<<<<<<<<<<<<
|
|
5683
5798
|
* )
|
|
5684
5799
|
* q2 = cubic[0]
|
|
5685
5800
|
*/
|
|
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,
|
|
5801
|
+
__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, 429, __pyx_L1_error)
|
|
5687
5802
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5688
|
-
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5803
|
+
__pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L1_error)
|
|
5689
5804
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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,
|
|
5805
|
+
__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, 429, __pyx_L1_error)
|
|
5691
5806
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5692
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5807
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L1_error)
|
|
5693
5808
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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,
|
|
5809
|
+
__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, 429, __pyx_L1_error)
|
|
5695
5810
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5696
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5811
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L1_error)
|
|
5697
5812
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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,
|
|
5813
|
+
__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, 429, __pyx_L1_error)
|
|
5699
5814
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5700
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5815
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 429, __pyx_L1_error)
|
|
5701
5816
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5702
5817
|
|
|
5703
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5818
|
+
/* "fontTools/cu2qu/cu2qu.py":428
|
|
5704
5819
|
* # calculate the spline of quadratics and check errors at the same time.
|
|
5705
5820
|
* next_cubic = next(cubics)
|
|
5706
5821
|
* next_q1 = cubic_approx_control( # <<<<<<<<<<<<<<
|
|
5707
5822
|
* 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5708
5823
|
* )
|
|
5709
5824
|
*/
|
|
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,
|
|
5825
|
+
__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, 428, __pyx_L1_error)
|
|
5711
5826
|
__pyx_v_next_q1 = __pyx_t_9;
|
|
5712
5827
|
|
|
5713
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5828
|
+
/* "fontTools/cu2qu/cu2qu.py":431
|
|
5714
5829
|
* 0, next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5715
5830
|
* )
|
|
5716
5831
|
* q2 = cubic[0] # <<<<<<<<<<<<<<
|
|
5717
5832
|
* d1 = 0j
|
|
5718
5833
|
* spline = [cubic[0], next_q1]
|
|
5719
5834
|
*/
|
|
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,
|
|
5835
|
+
__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, 431, __pyx_L1_error)
|
|
5721
5836
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5722
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5837
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 431, __pyx_L1_error)
|
|
5723
5838
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5724
5839
|
__pyx_v_q2 = __pyx_t_9;
|
|
5725
5840
|
|
|
5726
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5841
|
+
/* "fontTools/cu2qu/cu2qu.py":432
|
|
5727
5842
|
* )
|
|
5728
5843
|
* q2 = cubic[0]
|
|
5729
5844
|
* d1 = 0j # <<<<<<<<<<<<<<
|
|
@@ -5732,29 +5847,29 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5732
5847
|
*/
|
|
5733
5848
|
__pyx_v_d1 = __pyx_t_double_complex_from_parts(0, 0.0);
|
|
5734
5849
|
|
|
5735
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5850
|
+
/* "fontTools/cu2qu/cu2qu.py":433
|
|
5736
5851
|
* q2 = cubic[0]
|
|
5737
5852
|
* d1 = 0j
|
|
5738
5853
|
* spline = [cubic[0], next_q1] # <<<<<<<<<<<<<<
|
|
5739
5854
|
* for i in range(1, n + 1):
|
|
5740
5855
|
* # Current cubic to convert
|
|
5741
5856
|
*/
|
|
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,
|
|
5857
|
+
__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, 433, __pyx_L1_error)
|
|
5743
5858
|
__Pyx_GOTREF(__pyx_t_8);
|
|
5744
|
-
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5859
|
+
__pyx_t_2 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error)
|
|
5745
5860
|
__Pyx_GOTREF(__pyx_t_2);
|
|
5746
|
-
__pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
5861
|
+
__pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 433, __pyx_L1_error)
|
|
5747
5862
|
__Pyx_GOTREF(__pyx_t_10);
|
|
5748
5863
|
__Pyx_GIVEREF(__pyx_t_8);
|
|
5749
|
-
if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_8) != (0)) __PYX_ERR(0,
|
|
5864
|
+
if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_8) != (0)) __PYX_ERR(0, 433, __pyx_L1_error);
|
|
5750
5865
|
__Pyx_GIVEREF(__pyx_t_2);
|
|
5751
|
-
if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_2) != (0)) __PYX_ERR(0,
|
|
5866
|
+
if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 433, __pyx_L1_error);
|
|
5752
5867
|
__pyx_t_8 = 0;
|
|
5753
5868
|
__pyx_t_2 = 0;
|
|
5754
5869
|
__pyx_v_spline = ((PyObject*)__pyx_t_10);
|
|
5755
5870
|
__pyx_t_10 = 0;
|
|
5756
5871
|
|
|
5757
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5872
|
+
/* "fontTools/cu2qu/cu2qu.py":434
|
|
5758
5873
|
* d1 = 0j
|
|
5759
5874
|
* spline = [cubic[0], next_q1]
|
|
5760
5875
|
* for i in range(1, n + 1): # <<<<<<<<<<<<<<
|
|
@@ -5766,7 +5881,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5766
5881
|
for (__pyx_t_13 = 1; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
|
|
5767
5882
|
__pyx_v_i = __pyx_t_13;
|
|
5768
5883
|
|
|
5769
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5884
|
+
/* "fontTools/cu2qu/cu2qu.py":436
|
|
5770
5885
|
* for i in range(1, n + 1):
|
|
5771
5886
|
* # Current cubic to convert
|
|
5772
5887
|
* c0, c1, c2, c3 = next_cubic # <<<<<<<<<<<<<<
|
|
@@ -5779,7 +5894,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5779
5894
|
if (unlikely(size != 4)) {
|
|
5780
5895
|
if (size > 4) __Pyx_RaiseTooManyValuesError(4);
|
|
5781
5896
|
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
|
|
5782
|
-
__PYX_ERR(0,
|
|
5897
|
+
__PYX_ERR(0, 436, __pyx_L1_error)
|
|
5783
5898
|
}
|
|
5784
5899
|
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
|
|
5785
5900
|
if (likely(PyTuple_CheckExact(sequence))) {
|
|
@@ -5793,16 +5908,16 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5793
5908
|
__Pyx_INCREF(__pyx_t_14);
|
|
5794
5909
|
} else {
|
|
5795
5910
|
__pyx_t_10 = __Pyx_PyList_GetItemRef(sequence, 0);
|
|
5796
|
-
if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
5911
|
+
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5797
5912
|
__Pyx_XGOTREF(__pyx_t_10);
|
|
5798
5913
|
__pyx_t_2 = __Pyx_PyList_GetItemRef(sequence, 1);
|
|
5799
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
5914
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5800
5915
|
__Pyx_XGOTREF(__pyx_t_2);
|
|
5801
5916
|
__pyx_t_8 = __Pyx_PyList_GetItemRef(sequence, 2);
|
|
5802
|
-
if (unlikely(!__pyx_t_8)) __PYX_ERR(0,
|
|
5917
|
+
if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5803
5918
|
__Pyx_XGOTREF(__pyx_t_8);
|
|
5804
5919
|
__pyx_t_14 = __Pyx_PyList_GetItemRef(sequence, 3);
|
|
5805
|
-
if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
5920
|
+
if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5806
5921
|
__Pyx_XGOTREF(__pyx_t_14);
|
|
5807
5922
|
}
|
|
5808
5923
|
#else
|
|
@@ -5810,7 +5925,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5810
5925
|
Py_ssize_t i;
|
|
5811
5926
|
PyObject** temps[4] = {&__pyx_t_10,&__pyx_t_2,&__pyx_t_8,&__pyx_t_14};
|
|
5812
5927
|
for (i=0; i < 4; i++) {
|
|
5813
|
-
PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0,
|
|
5928
|
+
PyObject* item = __Pyx_PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5814
5929
|
__Pyx_GOTREF(item);
|
|
5815
5930
|
*(temps[i]) = item;
|
|
5816
5931
|
}
|
|
@@ -5819,7 +5934,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5819
5934
|
} else {
|
|
5820
5935
|
Py_ssize_t index = -1;
|
|
5821
5936
|
PyObject** temps[4] = {&__pyx_t_10,&__pyx_t_2,&__pyx_t_8,&__pyx_t_14};
|
|
5822
|
-
__pyx_t_15 = PyObject_GetIter(__pyx_v_next_cubic); if (unlikely(!__pyx_t_15)) __PYX_ERR(0,
|
|
5937
|
+
__pyx_t_15 = PyObject_GetIter(__pyx_v_next_cubic); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5823
5938
|
__Pyx_GOTREF(__pyx_t_15);
|
|
5824
5939
|
__pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_15);
|
|
5825
5940
|
for (index=0; index < 4; index++) {
|
|
@@ -5827,7 +5942,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5827
5942
|
__Pyx_GOTREF(item);
|
|
5828
5943
|
*(temps[index]) = item;
|
|
5829
5944
|
}
|
|
5830
|
-
if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 4) < 0) __PYX_ERR(0,
|
|
5945
|
+
if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 4) < 0) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5831
5946
|
__pyx_t_16 = NULL;
|
|
5832
5947
|
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
5833
5948
|
goto __pyx_L10_unpacking_done;
|
|
@@ -5835,23 +5950,23 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5835
5950
|
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
5836
5951
|
__pyx_t_16 = NULL;
|
|
5837
5952
|
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
|
|
5838
|
-
__PYX_ERR(0,
|
|
5953
|
+
__PYX_ERR(0, 436, __pyx_L1_error)
|
|
5839
5954
|
__pyx_L10_unpacking_done:;
|
|
5840
5955
|
}
|
|
5841
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5956
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5842
5957
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
5843
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5958
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5844
5959
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
5845
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5960
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5846
5961
|
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
|
|
5847
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
5962
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L1_error)
|
|
5848
5963
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5849
5964
|
__pyx_v_c0 = __pyx_t_9;
|
|
5850
5965
|
__pyx_v_c1 = __pyx_t_4;
|
|
5851
5966
|
__pyx_v_c2 = __pyx_t_5;
|
|
5852
5967
|
__pyx_v_c3 = __pyx_t_6;
|
|
5853
5968
|
|
|
5854
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5969
|
+
/* "fontTools/cu2qu/cu2qu.py":439
|
|
5855
5970
|
*
|
|
5856
5971
|
* # Current quadratic approximation of current cubic
|
|
5857
5972
|
* q0 = q2 # <<<<<<<<<<<<<<
|
|
@@ -5860,7 +5975,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5860
5975
|
*/
|
|
5861
5976
|
__pyx_v_q0 = __pyx_v_q2;
|
|
5862
5977
|
|
|
5863
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5978
|
+
/* "fontTools/cu2qu/cu2qu.py":440
|
|
5864
5979
|
* # Current quadratic approximation of current cubic
|
|
5865
5980
|
* q0 = q2
|
|
5866
5981
|
* q1 = next_q1 # <<<<<<<<<<<<<<
|
|
@@ -5869,7 +5984,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5869
5984
|
*/
|
|
5870
5985
|
__pyx_v_q1 = __pyx_v_next_q1;
|
|
5871
5986
|
|
|
5872
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5987
|
+
/* "fontTools/cu2qu/cu2qu.py":441
|
|
5873
5988
|
* q0 = q2
|
|
5874
5989
|
* q1 = next_q1
|
|
5875
5990
|
* if i < n: # <<<<<<<<<<<<<<
|
|
@@ -5879,19 +5994,19 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5879
5994
|
__pyx_t_1 = (__pyx_v_i < __pyx_v_n);
|
|
5880
5995
|
if (__pyx_t_1) {
|
|
5881
5996
|
|
|
5882
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
5997
|
+
/* "fontTools/cu2qu/cu2qu.py":442
|
|
5883
5998
|
* q1 = next_q1
|
|
5884
5999
|
* if i < n:
|
|
5885
6000
|
* next_cubic = next(cubics) # <<<<<<<<<<<<<<
|
|
5886
6001
|
* next_q1 = cubic_approx_control(
|
|
5887
6002
|
* i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5888
6003
|
*/
|
|
5889
|
-
__pyx_t_14 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
6004
|
+
__pyx_t_14 = __Pyx_PyIter_Next(__pyx_v_cubics); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 442, __pyx_L1_error)
|
|
5890
6005
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5891
6006
|
__Pyx_DECREF_SET(__pyx_v_next_cubic, __pyx_t_14);
|
|
5892
6007
|
__pyx_t_14 = 0;
|
|
5893
6008
|
|
|
5894
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6009
|
+
/* "fontTools/cu2qu/cu2qu.py":444
|
|
5895
6010
|
* next_cubic = next(cubics)
|
|
5896
6011
|
* next_q1 = cubic_approx_control(
|
|
5897
6012
|
* i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3] # <<<<<<<<<<<<<<
|
|
@@ -5901,48 +6016,48 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5901
6016
|
__pyx_t_17 = (__pyx_v_n - 1);
|
|
5902
6017
|
if (unlikely(__pyx_t_17 == 0)) {
|
|
5903
6018
|
PyErr_SetString(PyExc_ZeroDivisionError, "float division");
|
|
5904
|
-
__PYX_ERR(0,
|
|
6019
|
+
__PYX_ERR(0, 444, __pyx_L1_error)
|
|
5905
6020
|
}
|
|
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,
|
|
6021
|
+
__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, 444, __pyx_L1_error)
|
|
5907
6022
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5908
|
-
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
6023
|
+
__pyx_t_6 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
|
|
5909
6024
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 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,
|
|
6025
|
+
__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, 444, __pyx_L1_error)
|
|
5911
6026
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5912
|
-
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
6027
|
+
__pyx_t_5 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
|
|
5913
6028
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 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,
|
|
6029
|
+
__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, 444, __pyx_L1_error)
|
|
5915
6030
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5916
|
-
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
6031
|
+
__pyx_t_4 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
|
|
5917
6032
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 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,
|
|
6033
|
+
__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, 444, __pyx_L1_error)
|
|
5919
6034
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5920
|
-
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0,
|
|
6035
|
+
__pyx_t_9 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error)
|
|
5921
6036
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5922
6037
|
|
|
5923
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6038
|
+
/* "fontTools/cu2qu/cu2qu.py":443
|
|
5924
6039
|
* if i < n:
|
|
5925
6040
|
* next_cubic = next(cubics)
|
|
5926
6041
|
* next_q1 = cubic_approx_control( # <<<<<<<<<<<<<<
|
|
5927
6042
|
* i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5928
6043
|
* )
|
|
5929
6044
|
*/
|
|
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,
|
|
6045
|
+
__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, 443, __pyx_L1_error)
|
|
5931
6046
|
__pyx_v_next_q1 = __pyx_t_7;
|
|
5932
6047
|
|
|
5933
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6048
|
+
/* "fontTools/cu2qu/cu2qu.py":446
|
|
5934
6049
|
* i / (n - 1), next_cubic[0], next_cubic[1], next_cubic[2], next_cubic[3]
|
|
5935
6050
|
* )
|
|
5936
6051
|
* spline.append(next_q1) # <<<<<<<<<<<<<<
|
|
5937
6052
|
* q2 = (q1 + next_q1) * 0.5
|
|
5938
6053
|
* else:
|
|
5939
6054
|
*/
|
|
5940
|
-
__pyx_t_14 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0,
|
|
6055
|
+
__pyx_t_14 = __pyx_PyComplex_FromComplex(__pyx_v_next_q1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 446, __pyx_L1_error)
|
|
5941
6056
|
__Pyx_GOTREF(__pyx_t_14);
|
|
5942
|
-
__pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0,
|
|
6057
|
+
__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)
|
|
5943
6058
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
5944
6059
|
|
|
5945
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6060
|
+
/* "fontTools/cu2qu/cu2qu.py":447
|
|
5946
6061
|
* )
|
|
5947
6062
|
* spline.append(next_q1)
|
|
5948
6063
|
* q2 = (q1 + next_q1) * 0.5 # <<<<<<<<<<<<<<
|
|
@@ -5951,7 +6066,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5951
6066
|
*/
|
|
5952
6067
|
__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));
|
|
5953
6068
|
|
|
5954
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6069
|
+
/* "fontTools/cu2qu/cu2qu.py":441
|
|
5955
6070
|
* q0 = q2
|
|
5956
6071
|
* q1 = next_q1
|
|
5957
6072
|
* if i < n: # <<<<<<<<<<<<<<
|
|
@@ -5961,7 +6076,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5961
6076
|
goto __pyx_L11;
|
|
5962
6077
|
}
|
|
5963
6078
|
|
|
5964
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6079
|
+
/* "fontTools/cu2qu/cu2qu.py":449
|
|
5965
6080
|
* q2 = (q1 + next_q1) * 0.5
|
|
5966
6081
|
* else:
|
|
5967
6082
|
* q2 = c3 # <<<<<<<<<<<<<<
|
|
@@ -5973,7 +6088,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5973
6088
|
}
|
|
5974
6089
|
__pyx_L11:;
|
|
5975
6090
|
|
|
5976
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6091
|
+
/* "fontTools/cu2qu/cu2qu.py":452
|
|
5977
6092
|
*
|
|
5978
6093
|
* # End-point deltas
|
|
5979
6094
|
* d0 = d1 # <<<<<<<<<<<<<<
|
|
@@ -5982,7 +6097,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5982
6097
|
*/
|
|
5983
6098
|
__pyx_v_d0 = __pyx_v_d1;
|
|
5984
6099
|
|
|
5985
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6100
|
+
/* "fontTools/cu2qu/cu2qu.py":453
|
|
5986
6101
|
* # End-point deltas
|
|
5987
6102
|
* d0 = d1
|
|
5988
6103
|
* d1 = q2 - c3 # <<<<<<<<<<<<<<
|
|
@@ -5991,7 +6106,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
5991
6106
|
*/
|
|
5992
6107
|
__pyx_v_d1 = __Pyx_c_diff_double(__pyx_v_q2, __pyx_v_c3);
|
|
5993
6108
|
|
|
5994
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6109
|
+
/* "fontTools/cu2qu/cu2qu.py":455
|
|
5995
6110
|
* d1 = q2 - c3
|
|
5996
6111
|
*
|
|
5997
6112
|
* if abs(d1) > tolerance or not cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
|
|
@@ -6005,16 +6120,16 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
6005
6120
|
goto __pyx_L13_bool_binop_done;
|
|
6006
6121
|
}
|
|
6007
6122
|
|
|
6008
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6123
|
+
/* "fontTools/cu2qu/cu2qu.py":460
|
|
6009
6124
|
* q2 + (q1 - q2) * (2 / 3) - c2,
|
|
6010
6125
|
* d1,
|
|
6011
6126
|
* tolerance, # <<<<<<<<<<<<<<
|
|
6012
6127
|
* ):
|
|
6013
6128
|
* return None
|
|
6014
6129
|
*/
|
|
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,
|
|
6130
|
+
__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, 455, __pyx_L1_error)
|
|
6016
6131
|
|
|
6017
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6132
|
+
/* "fontTools/cu2qu/cu2qu.py":455
|
|
6018
6133
|
* d1 = q2 - c3
|
|
6019
6134
|
*
|
|
6020
6135
|
* if abs(d1) > tolerance or not cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
|
|
@@ -6026,7 +6141,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
6026
6141
|
__pyx_L13_bool_binop_done:;
|
|
6027
6142
|
if (__pyx_t_1) {
|
|
6028
6143
|
|
|
6029
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6144
|
+
/* "fontTools/cu2qu/cu2qu.py":462
|
|
6030
6145
|
* tolerance,
|
|
6031
6146
|
* ):
|
|
6032
6147
|
* return None # <<<<<<<<<<<<<<
|
|
@@ -6037,7 +6152,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
6037
6152
|
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
|
|
6038
6153
|
goto __pyx_L0;
|
|
6039
6154
|
|
|
6040
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6155
|
+
/* "fontTools/cu2qu/cu2qu.py":455
|
|
6041
6156
|
* d1 = q2 - c3
|
|
6042
6157
|
*
|
|
6043
6158
|
* if abs(d1) > tolerance or not cubic_farthest_fit_inside( # <<<<<<<<<<<<<<
|
|
@@ -6047,19 +6162,19 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
6047
6162
|
}
|
|
6048
6163
|
}
|
|
6049
6164
|
|
|
6050
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6165
|
+
/* "fontTools/cu2qu/cu2qu.py":463
|
|
6051
6166
|
* ):
|
|
6052
6167
|
* return None
|
|
6053
6168
|
* spline.append(cubic[3]) # <<<<<<<<<<<<<<
|
|
6054
6169
|
*
|
|
6055
6170
|
* return spline
|
|
6056
6171
|
*/
|
|
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,
|
|
6172
|
+
__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, 463, __pyx_L1_error)
|
|
6058
6173
|
__Pyx_GOTREF(__pyx_t_14);
|
|
6059
|
-
__pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0,
|
|
6174
|
+
__pyx_t_18 = __Pyx_PyList_Append(__pyx_v_spline, __pyx_t_14); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 463, __pyx_L1_error)
|
|
6060
6175
|
__Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
|
|
6061
6176
|
|
|
6062
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6177
|
+
/* "fontTools/cu2qu/cu2qu.py":465
|
|
6063
6178
|
* spline.append(cubic[3])
|
|
6064
6179
|
*
|
|
6065
6180
|
* return spline # <<<<<<<<<<<<<<
|
|
@@ -6071,7 +6186,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
6071
6186
|
__pyx_r = __pyx_v_spline;
|
|
6072
6187
|
goto __pyx_L0;
|
|
6073
6188
|
|
|
6074
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6189
|
+
/* "fontTools/cu2qu/cu2qu.py":390
|
|
6075
6190
|
*
|
|
6076
6191
|
*
|
|
6077
6192
|
* @cython.cfunc # <<<<<<<<<<<<<<
|
|
@@ -6097,7 +6212,7 @@ static PyObject *__pyx_f_9fontTools_5cu2qu_5cu2qu_cubic_approx_spline(PyObject *
|
|
|
6097
6212
|
return __pyx_r;
|
|
6098
6213
|
}
|
|
6099
6214
|
|
|
6100
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6215
|
+
/* "fontTools/cu2qu/cu2qu.py":468
|
|
6101
6216
|
*
|
|
6102
6217
|
*
|
|
6103
6218
|
* @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
|
|
@@ -6147,51 +6262,51 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6147
6262
|
{
|
|
6148
6263
|
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};
|
|
6149
6264
|
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
|
|
6150
|
-
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0,
|
|
6265
|
+
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 468, __pyx_L3_error)
|
|
6151
6266
|
if (__pyx_kwds_len > 0) {
|
|
6152
6267
|
switch (__pyx_nargs) {
|
|
6153
6268
|
case 3:
|
|
6154
6269
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
6155
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
6270
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 468, __pyx_L3_error)
|
|
6156
6271
|
CYTHON_FALLTHROUGH;
|
|
6157
6272
|
case 2:
|
|
6158
6273
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
6159
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
6274
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 468, __pyx_L3_error)
|
|
6160
6275
|
CYTHON_FALLTHROUGH;
|
|
6161
6276
|
case 1:
|
|
6162
6277
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
6163
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
6278
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 468, __pyx_L3_error)
|
|
6164
6279
|
CYTHON_FALLTHROUGH;
|
|
6165
6280
|
case 0: break;
|
|
6166
6281
|
default: goto __pyx_L5_argtuple_error;
|
|
6167
6282
|
}
|
|
6168
6283
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
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,
|
|
6284
|
+
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, 468, __pyx_L3_error)
|
|
6170
6285
|
for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
|
|
6171
|
-
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, i); __PYX_ERR(0,
|
|
6286
|
+
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, i); __PYX_ERR(0, 468, __pyx_L3_error) }
|
|
6172
6287
|
}
|
|
6173
6288
|
} else {
|
|
6174
6289
|
switch (__pyx_nargs) {
|
|
6175
6290
|
case 3:
|
|
6176
6291
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
6177
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
6292
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 468, __pyx_L3_error)
|
|
6178
6293
|
CYTHON_FALLTHROUGH;
|
|
6179
6294
|
case 2:
|
|
6180
6295
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
6181
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
6296
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 468, __pyx_L3_error)
|
|
6182
6297
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
6183
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
6298
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 468, __pyx_L3_error)
|
|
6184
6299
|
break;
|
|
6185
6300
|
default: goto __pyx_L5_argtuple_error;
|
|
6186
6301
|
}
|
|
6187
6302
|
}
|
|
6188
6303
|
__pyx_v_curve = values[0];
|
|
6189
|
-
__pyx_v_max_err = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_max_err == (double)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6304
|
+
__pyx_v_max_err = __Pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_max_err == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 471, __pyx_L3_error)
|
|
6190
6305
|
if (values[2]) {
|
|
6191
|
-
__pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6306
|
+
__pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 471, __pyx_L3_error)
|
|
6192
6307
|
} else {
|
|
6193
6308
|
|
|
6194
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6309
|
+
/* "fontTools/cu2qu/cu2qu.py":471
|
|
6195
6310
|
* @cython.locals(n=cython.int)
|
|
6196
6311
|
* @cython.locals(all_quadratic=cython.int)
|
|
6197
6312
|
* def curve_to_quadratic(curve, max_err, all_quadratic=True): # <<<<<<<<<<<<<<
|
|
@@ -6203,7 +6318,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6203
6318
|
}
|
|
6204
6319
|
goto __pyx_L6_skip;
|
|
6205
6320
|
__pyx_L5_argtuple_error:;
|
|
6206
|
-
__Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0,
|
|
6321
|
+
__Pyx_RaiseArgtupleInvalid("curve_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 468, __pyx_L3_error)
|
|
6207
6322
|
__pyx_L6_skip:;
|
|
6208
6323
|
goto __pyx_L4_argument_unpacking_done;
|
|
6209
6324
|
__pyx_L3_error:;
|
|
@@ -6216,7 +6331,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6216
6331
|
__pyx_L4_argument_unpacking_done:;
|
|
6217
6332
|
__pyx_r = __pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(__pyx_self, __pyx_v_curve, __pyx_v_max_err, __pyx_v_all_quadratic);
|
|
6218
6333
|
|
|
6219
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6334
|
+
/* "fontTools/cu2qu/cu2qu.py":468
|
|
6220
6335
|
*
|
|
6221
6336
|
*
|
|
6222
6337
|
* @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
|
|
@@ -6257,7 +6372,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6257
6372
|
__Pyx_RefNannySetupContext("curve_to_quadratic", 0);
|
|
6258
6373
|
__Pyx_INCREF(__pyx_v_curve);
|
|
6259
6374
|
|
|
6260
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6375
|
+
/* "fontTools/cu2qu/cu2qu.py":492
|
|
6261
6376
|
* """
|
|
6262
6377
|
*
|
|
6263
6378
|
* curve = [complex(*p) for p in curve] # <<<<<<<<<<<<<<
|
|
@@ -6265,16 +6380,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6265
6380
|
* for n in range(1, MAX_N + 1):
|
|
6266
6381
|
*/
|
|
6267
6382
|
{ /* enter inner scope */
|
|
6268
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6383
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6269
6384
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6270
6385
|
if (likely(PyList_CheckExact(__pyx_v_curve)) || PyTuple_CheckExact(__pyx_v_curve)) {
|
|
6271
6386
|
__pyx_t_2 = __pyx_v_curve; __Pyx_INCREF(__pyx_t_2);
|
|
6272
6387
|
__pyx_t_3 = 0;
|
|
6273
6388
|
__pyx_t_4 = NULL;
|
|
6274
6389
|
} else {
|
|
6275
|
-
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curve); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6390
|
+
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curve); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6276
6391
|
__Pyx_GOTREF(__pyx_t_2);
|
|
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,
|
|
6392
|
+
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6278
6393
|
}
|
|
6279
6394
|
for (;;) {
|
|
6280
6395
|
if (likely(!__pyx_t_4)) {
|
|
@@ -6282,7 +6397,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6282
6397
|
{
|
|
6283
6398
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
|
|
6284
6399
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6285
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6400
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6286
6401
|
#endif
|
|
6287
6402
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6288
6403
|
}
|
|
@@ -6292,7 +6407,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6292
6407
|
{
|
|
6293
6408
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
|
|
6294
6409
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6295
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6410
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6296
6411
|
#endif
|
|
6297
6412
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6298
6413
|
}
|
|
@@ -6303,13 +6418,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6303
6418
|
#endif
|
|
6304
6419
|
++__pyx_t_3;
|
|
6305
6420
|
}
|
|
6306
|
-
if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6421
|
+
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6307
6422
|
} else {
|
|
6308
6423
|
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
|
|
6309
6424
|
if (unlikely(!__pyx_t_5)) {
|
|
6310
6425
|
PyObject* exc_type = PyErr_Occurred();
|
|
6311
6426
|
if (exc_type) {
|
|
6312
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
6427
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6313
6428
|
PyErr_Clear();
|
|
6314
6429
|
}
|
|
6315
6430
|
break;
|
|
@@ -6318,12 +6433,12 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6318
6433
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6319
6434
|
__Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_p, __pyx_t_5);
|
|
6320
6435
|
__pyx_t_5 = 0;
|
|
6321
|
-
__pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_7genexpr__pyx_v_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6436
|
+
__pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_7genexpr__pyx_v_p); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6322
6437
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6323
|
-
__pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
6438
|
+
__pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6324
6439
|
__Pyx_GOTREF(__pyx_t_6);
|
|
6325
6440
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
6326
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0,
|
|
6441
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 492, __pyx_L5_error)
|
|
6327
6442
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
6328
6443
|
}
|
|
6329
6444
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -6337,37 +6452,37 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6337
6452
|
__Pyx_DECREF_SET(__pyx_v_curve, __pyx_t_1);
|
|
6338
6453
|
__pyx_t_1 = 0;
|
|
6339
6454
|
|
|
6340
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6455
|
+
/* "fontTools/cu2qu/cu2qu.py":494
|
|
6341
6456
|
* curve = [complex(*p) for p in curve]
|
|
6342
6457
|
*
|
|
6343
6458
|
* for n in range(1, MAX_N + 1): # <<<<<<<<<<<<<<
|
|
6344
6459
|
* spline = cubic_approx_spline(curve, n, max_err, all_quadratic)
|
|
6345
6460
|
* if spline is not None:
|
|
6346
6461
|
*/
|
|
6347
|
-
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6462
|
+
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
|
|
6348
6463
|
__Pyx_GOTREF(__pyx_t_1);
|
|
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,
|
|
6464
|
+
__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, 494, __pyx_L1_error)
|
|
6350
6465
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6351
6466
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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,
|
|
6467
|
+
__pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L1_error)
|
|
6353
6468
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6354
6469
|
__pyx_t_7 = __pyx_t_3;
|
|
6355
6470
|
for (__pyx_t_8 = 1; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
|
|
6356
6471
|
__pyx_v_n = __pyx_t_8;
|
|
6357
6472
|
|
|
6358
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6473
|
+
/* "fontTools/cu2qu/cu2qu.py":495
|
|
6359
6474
|
*
|
|
6360
6475
|
* for n in range(1, MAX_N + 1):
|
|
6361
6476
|
* spline = cubic_approx_spline(curve, n, max_err, all_quadratic) # <<<<<<<<<<<<<<
|
|
6362
6477
|
* if spline is not None:
|
|
6363
6478
|
* # done. go home
|
|
6364
6479
|
*/
|
|
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,
|
|
6480
|
+
__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, 495, __pyx_L1_error)
|
|
6366
6481
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6367
6482
|
__Pyx_XDECREF_SET(__pyx_v_spline, __pyx_t_2);
|
|
6368
6483
|
__pyx_t_2 = 0;
|
|
6369
6484
|
|
|
6370
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6485
|
+
/* "fontTools/cu2qu/cu2qu.py":496
|
|
6371
6486
|
* for n in range(1, MAX_N + 1):
|
|
6372
6487
|
* spline = cubic_approx_spline(curve, n, max_err, all_quadratic)
|
|
6373
6488
|
* if spline is not None: # <<<<<<<<<<<<<<
|
|
@@ -6377,7 +6492,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6377
6492
|
__pyx_t_9 = (__pyx_v_spline != Py_None);
|
|
6378
6493
|
if (__pyx_t_9) {
|
|
6379
6494
|
|
|
6380
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6495
|
+
/* "fontTools/cu2qu/cu2qu.py":498
|
|
6381
6496
|
* if spline is not None:
|
|
6382
6497
|
* # done. go home
|
|
6383
6498
|
* return [(s.real, s.imag) for s in spline] # <<<<<<<<<<<<<<
|
|
@@ -6386,16 +6501,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6386
6501
|
*/
|
|
6387
6502
|
__Pyx_XDECREF(__pyx_r);
|
|
6388
6503
|
{ /* enter inner scope */
|
|
6389
|
-
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6504
|
+
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L15_error)
|
|
6390
6505
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6391
6506
|
if (likely(PyList_CheckExact(__pyx_v_spline)) || PyTuple_CheckExact(__pyx_v_spline)) {
|
|
6392
6507
|
__pyx_t_1 = __pyx_v_spline; __Pyx_INCREF(__pyx_t_1);
|
|
6393
6508
|
__pyx_t_10 = 0;
|
|
6394
6509
|
__pyx_t_4 = NULL;
|
|
6395
6510
|
} else {
|
|
6396
|
-
__pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_spline); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6511
|
+
__pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_spline); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L15_error)
|
|
6397
6512
|
__Pyx_GOTREF(__pyx_t_1);
|
|
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,
|
|
6513
|
+
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 498, __pyx_L15_error)
|
|
6399
6514
|
}
|
|
6400
6515
|
for (;;) {
|
|
6401
6516
|
if (likely(!__pyx_t_4)) {
|
|
@@ -6403,7 +6518,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6403
6518
|
{
|
|
6404
6519
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
|
|
6405
6520
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6406
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6521
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 498, __pyx_L15_error)
|
|
6407
6522
|
#endif
|
|
6408
6523
|
if (__pyx_t_10 >= __pyx_temp) break;
|
|
6409
6524
|
}
|
|
@@ -6413,7 +6528,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6413
6528
|
{
|
|
6414
6529
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
|
|
6415
6530
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6416
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6531
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 498, __pyx_L15_error)
|
|
6417
6532
|
#endif
|
|
6418
6533
|
if (__pyx_t_10 >= __pyx_temp) break;
|
|
6419
6534
|
}
|
|
@@ -6424,13 +6539,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6424
6539
|
#endif
|
|
6425
6540
|
++__pyx_t_10;
|
|
6426
6541
|
}
|
|
6427
|
-
if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
6542
|
+
if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 498, __pyx_L15_error)
|
|
6428
6543
|
} else {
|
|
6429
6544
|
__pyx_t_6 = __pyx_t_4(__pyx_t_1);
|
|
6430
6545
|
if (unlikely(!__pyx_t_6)) {
|
|
6431
6546
|
PyObject* exc_type = PyErr_Occurred();
|
|
6432
6547
|
if (exc_type) {
|
|
6433
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
6548
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 498, __pyx_L15_error)
|
|
6434
6549
|
PyErr_Clear();
|
|
6435
6550
|
}
|
|
6436
6551
|
break;
|
|
@@ -6439,19 +6554,19 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6439
6554
|
__Pyx_GOTREF(__pyx_t_6);
|
|
6440
6555
|
__Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_s, __pyx_t_6);
|
|
6441
6556
|
__pyx_t_6 = 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,
|
|
6557
|
+
__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, 498, __pyx_L15_error)
|
|
6443
6558
|
__Pyx_GOTREF(__pyx_t_6);
|
|
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,
|
|
6559
|
+
__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, 498, __pyx_L15_error)
|
|
6445
6560
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6446
|
-
__pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0,
|
|
6561
|
+
__pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 498, __pyx_L15_error)
|
|
6447
6562
|
__Pyx_GOTREF(__pyx_t_11);
|
|
6448
6563
|
__Pyx_GIVEREF(__pyx_t_6);
|
|
6449
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6) != (0)) __PYX_ERR(0,
|
|
6564
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 498, __pyx_L15_error);
|
|
6450
6565
|
__Pyx_GIVEREF(__pyx_t_5);
|
|
6451
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5) != (0)) __PYX_ERR(0,
|
|
6566
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5) != (0)) __PYX_ERR(0, 498, __pyx_L15_error);
|
|
6452
6567
|
__pyx_t_6 = 0;
|
|
6453
6568
|
__pyx_t_5 = 0;
|
|
6454
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0,
|
|
6569
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 498, __pyx_L15_error)
|
|
6455
6570
|
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
6456
6571
|
}
|
|
6457
6572
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
@@ -6466,7 +6581,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6466
6581
|
__pyx_t_2 = 0;
|
|
6467
6582
|
goto __pyx_L0;
|
|
6468
6583
|
|
|
6469
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6584
|
+
/* "fontTools/cu2qu/cu2qu.py":496
|
|
6470
6585
|
* for n in range(1, MAX_N + 1):
|
|
6471
6586
|
* spline = cubic_approx_spline(curve, n, max_err, all_quadratic)
|
|
6472
6587
|
* if spline is not None: # <<<<<<<<<<<<<<
|
|
@@ -6476,7 +6591,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6476
6591
|
}
|
|
6477
6592
|
}
|
|
6478
6593
|
|
|
6479
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6594
|
+
/* "fontTools/cu2qu/cu2qu.py":500
|
|
6480
6595
|
* return [(s.real, s.imag) for s in spline]
|
|
6481
6596
|
*
|
|
6482
6597
|
* raise ApproxNotFoundError(curve) # <<<<<<<<<<<<<<
|
|
@@ -6484,7 +6599,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6484
6599
|
*
|
|
6485
6600
|
*/
|
|
6486
6601
|
__pyx_t_1 = NULL;
|
|
6487
|
-
__Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0,
|
|
6602
|
+
__Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 500, __pyx_L1_error)
|
|
6488
6603
|
__Pyx_GOTREF(__pyx_t_11);
|
|
6489
6604
|
__pyx_t_12 = 1;
|
|
6490
6605
|
#if CYTHON_UNPACK_METHODS
|
|
@@ -6503,14 +6618,14 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6503
6618
|
__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));
|
|
6504
6619
|
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
6505
6620
|
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
|
|
6506
|
-
if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6621
|
+
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
|
|
6507
6622
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6508
6623
|
}
|
|
6509
6624
|
__Pyx_Raise(__pyx_t_2, 0, 0, 0);
|
|
6510
6625
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6511
|
-
__PYX_ERR(0,
|
|
6626
|
+
__PYX_ERR(0, 500, __pyx_L1_error)
|
|
6512
6627
|
|
|
6513
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6628
|
+
/* "fontTools/cu2qu/cu2qu.py":468
|
|
6514
6629
|
*
|
|
6515
6630
|
*
|
|
6516
6631
|
* @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
|
|
@@ -6537,7 +6652,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_3curve_to_quadratic(CYTHON_UN
|
|
|
6537
6652
|
return __pyx_r;
|
|
6538
6653
|
}
|
|
6539
6654
|
|
|
6540
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6655
|
+
/* "fontTools/cu2qu/cu2qu.py":503
|
|
6541
6656
|
*
|
|
6542
6657
|
*
|
|
6543
6658
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
|
|
@@ -6587,40 +6702,40 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6587
6702
|
{
|
|
6588
6703
|
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};
|
|
6589
6704
|
const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
|
|
6590
|
-
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0,
|
|
6705
|
+
if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 503, __pyx_L3_error)
|
|
6591
6706
|
if (__pyx_kwds_len > 0) {
|
|
6592
6707
|
switch (__pyx_nargs) {
|
|
6593
6708
|
case 3:
|
|
6594
6709
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
6595
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
6710
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 503, __pyx_L3_error)
|
|
6596
6711
|
CYTHON_FALLTHROUGH;
|
|
6597
6712
|
case 2:
|
|
6598
6713
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
6599
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
6714
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 503, __pyx_L3_error)
|
|
6600
6715
|
CYTHON_FALLTHROUGH;
|
|
6601
6716
|
case 1:
|
|
6602
6717
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
6603
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
6718
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 503, __pyx_L3_error)
|
|
6604
6719
|
CYTHON_FALLTHROUGH;
|
|
6605
6720
|
case 0: break;
|
|
6606
6721
|
default: goto __pyx_L5_argtuple_error;
|
|
6607
6722
|
}
|
|
6608
6723
|
const Py_ssize_t kwd_pos_args = __pyx_nargs;
|
|
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,
|
|
6724
|
+
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, 503, __pyx_L3_error)
|
|
6610
6725
|
for (Py_ssize_t i = __pyx_nargs; i < 2; i++) {
|
|
6611
|
-
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, i); __PYX_ERR(0,
|
|
6726
|
+
if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, i); __PYX_ERR(0, 503, __pyx_L3_error) }
|
|
6612
6727
|
}
|
|
6613
6728
|
} else {
|
|
6614
6729
|
switch (__pyx_nargs) {
|
|
6615
6730
|
case 3:
|
|
6616
6731
|
values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
|
|
6617
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0,
|
|
6732
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 503, __pyx_L3_error)
|
|
6618
6733
|
CYTHON_FALLTHROUGH;
|
|
6619
6734
|
case 2:
|
|
6620
6735
|
values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
|
|
6621
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0,
|
|
6736
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 503, __pyx_L3_error)
|
|
6622
6737
|
values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
|
|
6623
|
-
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0,
|
|
6738
|
+
if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 503, __pyx_L3_error)
|
|
6624
6739
|
break;
|
|
6625
6740
|
default: goto __pyx_L5_argtuple_error;
|
|
6626
6741
|
}
|
|
@@ -6628,10 +6743,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6628
6743
|
__pyx_v_curves = values[0];
|
|
6629
6744
|
__pyx_v_max_errors = values[1];
|
|
6630
6745
|
if (values[2]) {
|
|
6631
|
-
__pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
6746
|
+
__pyx_v_all_quadratic = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_all_quadratic == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L3_error)
|
|
6632
6747
|
} else {
|
|
6633
6748
|
|
|
6634
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6749
|
+
/* "fontTools/cu2qu/cu2qu.py":505
|
|
6635
6750
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int)
|
|
6636
6751
|
* @cython.locals(all_quadratic=cython.int)
|
|
6637
6752
|
* def curves_to_quadratic(curves, max_errors, all_quadratic=True): # <<<<<<<<<<<<<<
|
|
@@ -6643,7 +6758,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6643
6758
|
}
|
|
6644
6759
|
goto __pyx_L6_skip;
|
|
6645
6760
|
__pyx_L5_argtuple_error:;
|
|
6646
|
-
__Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0,
|
|
6761
|
+
__Pyx_RaiseArgtupleInvalid("curves_to_quadratic", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 503, __pyx_L3_error)
|
|
6647
6762
|
__pyx_L6_skip:;
|
|
6648
6763
|
goto __pyx_L4_argument_unpacking_done;
|
|
6649
6764
|
__pyx_L3_error:;
|
|
@@ -6656,7 +6771,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
|
|
|
6656
6771
|
__pyx_L4_argument_unpacking_done:;
|
|
6657
6772
|
__pyx_r = __pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(__pyx_self, __pyx_v_curves, __pyx_v_max_errors, __pyx_v_all_quadratic);
|
|
6658
6773
|
|
|
6659
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6774
|
+
/* "fontTools/cu2qu/cu2qu.py":503
|
|
6660
6775
|
*
|
|
6661
6776
|
*
|
|
6662
6777
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
|
|
@@ -6707,7 +6822,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6707
6822
|
__Pyx_RefNannySetupContext("curves_to_quadratic", 0);
|
|
6708
6823
|
__Pyx_INCREF(__pyx_v_curves);
|
|
6709
6824
|
|
|
6710
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6825
|
+
/* "fontTools/cu2qu/cu2qu.py":542
|
|
6711
6826
|
* """
|
|
6712
6827
|
*
|
|
6713
6828
|
* curves = [[complex(*p) for p in curve] for curve in curves] # <<<<<<<<<<<<<<
|
|
@@ -6715,16 +6830,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6715
6830
|
*
|
|
6716
6831
|
*/
|
|
6717
6832
|
{ /* enter inner scope */
|
|
6718
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
6833
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L5_error)
|
|
6719
6834
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6720
6835
|
if (likely(PyList_CheckExact(__pyx_v_curves)) || PyTuple_CheckExact(__pyx_v_curves)) {
|
|
6721
6836
|
__pyx_t_2 = __pyx_v_curves; __Pyx_INCREF(__pyx_t_2);
|
|
6722
6837
|
__pyx_t_3 = 0;
|
|
6723
6838
|
__pyx_t_4 = NULL;
|
|
6724
6839
|
} else {
|
|
6725
|
-
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
6840
|
+
__pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_curves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L5_error)
|
|
6726
6841
|
__Pyx_GOTREF(__pyx_t_2);
|
|
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,
|
|
6842
|
+
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L5_error)
|
|
6728
6843
|
}
|
|
6729
6844
|
for (;;) {
|
|
6730
6845
|
if (likely(!__pyx_t_4)) {
|
|
@@ -6732,7 +6847,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6732
6847
|
{
|
|
6733
6848
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
|
|
6734
6849
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6735
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6850
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L5_error)
|
|
6736
6851
|
#endif
|
|
6737
6852
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6738
6853
|
}
|
|
@@ -6742,7 +6857,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6742
6857
|
{
|
|
6743
6858
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
|
|
6744
6859
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6745
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6860
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L5_error)
|
|
6746
6861
|
#endif
|
|
6747
6862
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
6748
6863
|
}
|
|
@@ -6753,13 +6868,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6753
6868
|
#endif
|
|
6754
6869
|
++__pyx_t_3;
|
|
6755
6870
|
}
|
|
6756
|
-
if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6871
|
+
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L5_error)
|
|
6757
6872
|
} else {
|
|
6758
6873
|
__pyx_t_5 = __pyx_t_4(__pyx_t_2);
|
|
6759
6874
|
if (unlikely(!__pyx_t_5)) {
|
|
6760
6875
|
PyObject* exc_type = PyErr_Occurred();
|
|
6761
6876
|
if (exc_type) {
|
|
6762
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
6877
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 542, __pyx_L5_error)
|
|
6763
6878
|
PyErr_Clear();
|
|
6764
6879
|
}
|
|
6765
6880
|
break;
|
|
@@ -6769,16 +6884,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6769
6884
|
__Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_curve, __pyx_t_5);
|
|
6770
6885
|
__pyx_t_5 = 0;
|
|
6771
6886
|
{ /* enter inner scope */
|
|
6772
|
-
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
6887
|
+
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6773
6888
|
__Pyx_GOTREF(__pyx_t_5);
|
|
6774
6889
|
if (likely(PyList_CheckExact(__pyx_8genexpr2__pyx_v_curve)) || PyTuple_CheckExact(__pyx_8genexpr2__pyx_v_curve)) {
|
|
6775
6890
|
__pyx_t_6 = __pyx_8genexpr2__pyx_v_curve; __Pyx_INCREF(__pyx_t_6);
|
|
6776
6891
|
__pyx_t_7 = 0;
|
|
6777
6892
|
__pyx_t_8 = NULL;
|
|
6778
6893
|
} else {
|
|
6779
|
-
__pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr2__pyx_v_curve); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
6894
|
+
__pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr2__pyx_v_curve); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6780
6895
|
__Pyx_GOTREF(__pyx_t_6);
|
|
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,
|
|
6896
|
+
__pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6782
6897
|
}
|
|
6783
6898
|
for (;;) {
|
|
6784
6899
|
if (likely(!__pyx_t_8)) {
|
|
@@ -6786,7 +6901,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6786
6901
|
{
|
|
6787
6902
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
|
|
6788
6903
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6789
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6904
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6790
6905
|
#endif
|
|
6791
6906
|
if (__pyx_t_7 >= __pyx_temp) break;
|
|
6792
6907
|
}
|
|
@@ -6796,7 +6911,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6796
6911
|
{
|
|
6797
6912
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
|
|
6798
6913
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
6799
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
6914
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6800
6915
|
#endif
|
|
6801
6916
|
if (__pyx_t_7 >= __pyx_temp) break;
|
|
6802
6917
|
}
|
|
@@ -6807,13 +6922,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6807
6922
|
#endif
|
|
6808
6923
|
++__pyx_t_7;
|
|
6809
6924
|
}
|
|
6810
|
-
if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
6925
|
+
if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6811
6926
|
} else {
|
|
6812
6927
|
__pyx_t_9 = __pyx_t_8(__pyx_t_6);
|
|
6813
6928
|
if (unlikely(!__pyx_t_9)) {
|
|
6814
6929
|
PyObject* exc_type = PyErr_Occurred();
|
|
6815
6930
|
if (exc_type) {
|
|
6816
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
6931
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6817
6932
|
PyErr_Clear();
|
|
6818
6933
|
}
|
|
6819
6934
|
break;
|
|
@@ -6822,12 +6937,12 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6822
6937
|
__Pyx_GOTREF(__pyx_t_9);
|
|
6823
6938
|
__Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_p, __pyx_t_9);
|
|
6824
6939
|
__pyx_t_9 = 0;
|
|
6825
|
-
__pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_8genexpr3__pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0,
|
|
6940
|
+
__pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_8genexpr3__pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6826
6941
|
__Pyx_GOTREF(__pyx_t_9);
|
|
6827
|
-
__pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
6942
|
+
__pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6828
6943
|
__Pyx_GOTREF(__pyx_t_10);
|
|
6829
6944
|
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
|
|
6830
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0,
|
|
6945
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 542, __pyx_L10_error)
|
|
6831
6946
|
__Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
|
|
6832
6947
|
}
|
|
6833
6948
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
@@ -6838,7 +6953,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6838
6953
|
goto __pyx_L5_error;
|
|
6839
6954
|
__pyx_L14_exit_scope:;
|
|
6840
6955
|
} /* exit inner scope */
|
|
6841
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0,
|
|
6956
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 542, __pyx_L5_error)
|
|
6842
6957
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
6843
6958
|
}
|
|
6844
6959
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -6852,7 +6967,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6852
6967
|
__Pyx_DECREF_SET(__pyx_v_curves, __pyx_t_1);
|
|
6853
6968
|
__pyx_t_1 = 0;
|
|
6854
6969
|
|
|
6855
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6970
|
+
/* "fontTools/cu2qu/cu2qu.py":543
|
|
6856
6971
|
*
|
|
6857
6972
|
* curves = [[complex(*p) for p in curve] for curve in curves]
|
|
6858
6973
|
* assert len(max_errors) == len(curves) # <<<<<<<<<<<<<<
|
|
@@ -6861,48 +6976,48 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6861
6976
|
*/
|
|
6862
6977
|
#ifndef CYTHON_WITHOUT_ASSERTIONS
|
|
6863
6978
|
if (unlikely(__pyx_assertions_enabled())) {
|
|
6864
|
-
__pyx_t_3 = PyObject_Length(__pyx_v_max_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0,
|
|
6865
|
-
__pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0,
|
|
6979
|
+
__pyx_t_3 = PyObject_Length(__pyx_v_max_errors); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 543, __pyx_L1_error)
|
|
6980
|
+
__pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 543, __pyx_L1_error)
|
|
6866
6981
|
__pyx_t_11 = (__pyx_t_3 == __pyx_t_7);
|
|
6867
6982
|
if (unlikely(!__pyx_t_11)) {
|
|
6868
6983
|
__Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
|
|
6869
|
-
__PYX_ERR(0,
|
|
6984
|
+
__PYX_ERR(0, 543, __pyx_L1_error)
|
|
6870
6985
|
}
|
|
6871
6986
|
}
|
|
6872
6987
|
#else
|
|
6873
|
-
if ((1)); else __PYX_ERR(0,
|
|
6988
|
+
if ((1)); else __PYX_ERR(0, 543, __pyx_L1_error)
|
|
6874
6989
|
#endif
|
|
6875
6990
|
|
|
6876
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
6991
|
+
/* "fontTools/cu2qu/cu2qu.py":545
|
|
6877
6992
|
* assert len(max_errors) == len(curves)
|
|
6878
6993
|
*
|
|
6879
6994
|
* l = len(curves) # <<<<<<<<<<<<<<
|
|
6880
6995
|
* splines = [None] * l
|
|
6881
6996
|
* last_i = i = 0
|
|
6882
6997
|
*/
|
|
6883
|
-
__pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0,
|
|
6998
|
+
__pyx_t_7 = PyObject_Length(__pyx_v_curves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 545, __pyx_L1_error)
|
|
6884
6999
|
__pyx_v_l = __pyx_t_7;
|
|
6885
7000
|
|
|
6886
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7001
|
+
/* "fontTools/cu2qu/cu2qu.py":546
|
|
6887
7002
|
*
|
|
6888
7003
|
* l = len(curves)
|
|
6889
7004
|
* splines = [None] * l # <<<<<<<<<<<<<<
|
|
6890
7005
|
* last_i = i = 0
|
|
6891
7006
|
* n = 1
|
|
6892
7007
|
*/
|
|
6893
|
-
__pyx_t_1 = PyList_New(1 * ((__pyx_v_l<0) ? 0:__pyx_v_l)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
7008
|
+
__pyx_t_1 = PyList_New(1 * ((__pyx_v_l<0) ? 0:__pyx_v_l)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
|
|
6894
7009
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6895
7010
|
{ Py_ssize_t __pyx_temp;
|
|
6896
7011
|
for (__pyx_temp=0; __pyx_temp < __pyx_v_l; __pyx_temp++) {
|
|
6897
7012
|
__Pyx_INCREF(Py_None);
|
|
6898
7013
|
__Pyx_GIVEREF(Py_None);
|
|
6899
|
-
if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0,
|
|
7014
|
+
if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None) != (0)) __PYX_ERR(0, 546, __pyx_L1_error);
|
|
6900
7015
|
}
|
|
6901
7016
|
}
|
|
6902
7017
|
__pyx_v_splines = ((PyObject*)__pyx_t_1);
|
|
6903
7018
|
__pyx_t_1 = 0;
|
|
6904
7019
|
|
|
6905
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7020
|
+
/* "fontTools/cu2qu/cu2qu.py":547
|
|
6906
7021
|
* l = len(curves)
|
|
6907
7022
|
* splines = [None] * l
|
|
6908
7023
|
* last_i = i = 0 # <<<<<<<<<<<<<<
|
|
@@ -6912,7 +7027,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6912
7027
|
__pyx_v_last_i = 0;
|
|
6913
7028
|
__pyx_v_i = 0;
|
|
6914
7029
|
|
|
6915
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7030
|
+
/* "fontTools/cu2qu/cu2qu.py":548
|
|
6916
7031
|
* splines = [None] * l
|
|
6917
7032
|
* last_i = i = 0
|
|
6918
7033
|
* n = 1 # <<<<<<<<<<<<<<
|
|
@@ -6922,7 +7037,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6922
7037
|
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_1);
|
|
6923
7038
|
__pyx_v_n = __pyx_mstate_global->__pyx_int_1;
|
|
6924
7039
|
|
|
6925
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7040
|
+
/* "fontTools/cu2qu/cu2qu.py":549
|
|
6926
7041
|
* last_i = i = 0
|
|
6927
7042
|
* n = 1
|
|
6928
7043
|
* while True: # <<<<<<<<<<<<<<
|
|
@@ -6931,27 +7046,27 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6931
7046
|
*/
|
|
6932
7047
|
while (1) {
|
|
6933
7048
|
|
|
6934
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7049
|
+
/* "fontTools/cu2qu/cu2qu.py":550
|
|
6935
7050
|
* n = 1
|
|
6936
7051
|
* while True:
|
|
6937
7052
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic) # <<<<<<<<<<<<<<
|
|
6938
7053
|
* if spline is None:
|
|
6939
7054
|
* if n == MAX_N:
|
|
6940
7055
|
*/
|
|
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,
|
|
7056
|
+
__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, 550, __pyx_L1_error)
|
|
6942
7057
|
__Pyx_GOTREF(__pyx_t_1);
|
|
6943
|
-
__pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_n); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
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,
|
|
7058
|
+
__pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_n); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 550, __pyx_L1_error)
|
|
7059
|
+
__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, 550, __pyx_L1_error)
|
|
6945
7060
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6946
|
-
__pyx_t_13 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0,
|
|
7061
|
+
__pyx_t_13 = __Pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 550, __pyx_L1_error)
|
|
6947
7062
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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,
|
|
7063
|
+
__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, 550, __pyx_L1_error)
|
|
6949
7064
|
__Pyx_GOTREF(__pyx_t_2);
|
|
6950
7065
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
6951
7066
|
__Pyx_XDECREF_SET(__pyx_v_spline, __pyx_t_2);
|
|
6952
7067
|
__pyx_t_2 = 0;
|
|
6953
7068
|
|
|
6954
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7069
|
+
/* "fontTools/cu2qu/cu2qu.py":551
|
|
6955
7070
|
* while True:
|
|
6956
7071
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
|
|
6957
7072
|
* if spline is None: # <<<<<<<<<<<<<<
|
|
@@ -6961,22 +7076,22 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6961
7076
|
__pyx_t_11 = (__pyx_v_spline == Py_None);
|
|
6962
7077
|
if (__pyx_t_11) {
|
|
6963
7078
|
|
|
6964
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7079
|
+
/* "fontTools/cu2qu/cu2qu.py":552
|
|
6965
7080
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
|
|
6966
7081
|
* if spline is None:
|
|
6967
7082
|
* if n == MAX_N: # <<<<<<<<<<<<<<
|
|
6968
7083
|
* break
|
|
6969
7084
|
* n += 1
|
|
6970
7085
|
*/
|
|
6971
|
-
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0,
|
|
7086
|
+
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MAX_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
|
|
6972
7087
|
__Pyx_GOTREF(__pyx_t_2);
|
|
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,
|
|
7088
|
+
__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, 552, __pyx_L1_error)
|
|
6974
7089
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
6975
|
-
__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0,
|
|
7090
|
+
__pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 552, __pyx_L1_error)
|
|
6976
7091
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
6977
7092
|
if (__pyx_t_11) {
|
|
6978
7093
|
|
|
6979
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7094
|
+
/* "fontTools/cu2qu/cu2qu.py":553
|
|
6980
7095
|
* if spline is None:
|
|
6981
7096
|
* if n == MAX_N:
|
|
6982
7097
|
* break # <<<<<<<<<<<<<<
|
|
@@ -6985,7 +7100,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6985
7100
|
*/
|
|
6986
7101
|
goto __pyx_L18_break;
|
|
6987
7102
|
|
|
6988
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7103
|
+
/* "fontTools/cu2qu/cu2qu.py":552
|
|
6989
7104
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
|
|
6990
7105
|
* if spline is None:
|
|
6991
7106
|
* if n == MAX_N: # <<<<<<<<<<<<<<
|
|
@@ -6994,19 +7109,19 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
6994
7109
|
*/
|
|
6995
7110
|
}
|
|
6996
7111
|
|
|
6997
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7112
|
+
/* "fontTools/cu2qu/cu2qu.py":554
|
|
6998
7113
|
* if n == MAX_N:
|
|
6999
7114
|
* break
|
|
7000
7115
|
* n += 1 # <<<<<<<<<<<<<<
|
|
7001
7116
|
* last_i = i
|
|
7002
7117
|
* continue
|
|
7003
7118
|
*/
|
|
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,
|
|
7119
|
+
__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, 554, __pyx_L1_error)
|
|
7005
7120
|
__Pyx_GOTREF(__pyx_t_1);
|
|
7006
7121
|
__Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1);
|
|
7007
7122
|
__pyx_t_1 = 0;
|
|
7008
7123
|
|
|
7009
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7124
|
+
/* "fontTools/cu2qu/cu2qu.py":555
|
|
7010
7125
|
* break
|
|
7011
7126
|
* n += 1
|
|
7012
7127
|
* last_i = i # <<<<<<<<<<<<<<
|
|
@@ -7015,7 +7130,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7015
7130
|
*/
|
|
7016
7131
|
__pyx_v_last_i = __pyx_v_i;
|
|
7017
7132
|
|
|
7018
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7133
|
+
/* "fontTools/cu2qu/cu2qu.py":556
|
|
7019
7134
|
* n += 1
|
|
7020
7135
|
* last_i = i
|
|
7021
7136
|
* continue # <<<<<<<<<<<<<<
|
|
@@ -7024,7 +7139,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7024
7139
|
*/
|
|
7025
7140
|
goto __pyx_L17_continue;
|
|
7026
7141
|
|
|
7027
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7142
|
+
/* "fontTools/cu2qu/cu2qu.py":551
|
|
7028
7143
|
* while True:
|
|
7029
7144
|
* spline = cubic_approx_spline(curves[i], n, max_errors[i], all_quadratic)
|
|
7030
7145
|
* if spline is None: # <<<<<<<<<<<<<<
|
|
@@ -7033,16 +7148,16 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7033
7148
|
*/
|
|
7034
7149
|
}
|
|
7035
7150
|
|
|
7036
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7151
|
+
/* "fontTools/cu2qu/cu2qu.py":557
|
|
7037
7152
|
* last_i = i
|
|
7038
7153
|
* continue
|
|
7039
7154
|
* splines[i] = spline # <<<<<<<<<<<<<<
|
|
7040
7155
|
* i = (i + 1) % l
|
|
7041
7156
|
* if i == last_i:
|
|
7042
7157
|
*/
|
|
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,
|
|
7158
|
+
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, 557, __pyx_L1_error)
|
|
7044
7159
|
|
|
7045
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7160
|
+
/* "fontTools/cu2qu/cu2qu.py":558
|
|
7046
7161
|
* continue
|
|
7047
7162
|
* splines[i] = spline
|
|
7048
7163
|
* i = (i + 1) % l # <<<<<<<<<<<<<<
|
|
@@ -7052,11 +7167,11 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7052
7167
|
__pyx_t_14 = (__pyx_v_i + 1);
|
|
7053
7168
|
if (unlikely(__pyx_v_l == 0)) {
|
|
7054
7169
|
PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
|
|
7055
|
-
__PYX_ERR(0,
|
|
7170
|
+
__PYX_ERR(0, 558, __pyx_L1_error)
|
|
7056
7171
|
}
|
|
7057
7172
|
__pyx_v_i = __Pyx_mod_long(__pyx_t_14, __pyx_v_l, 0);
|
|
7058
7173
|
|
|
7059
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7174
|
+
/* "fontTools/cu2qu/cu2qu.py":559
|
|
7060
7175
|
* splines[i] = spline
|
|
7061
7176
|
* i = (i + 1) % l
|
|
7062
7177
|
* if i == last_i: # <<<<<<<<<<<<<<
|
|
@@ -7066,7 +7181,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7066
7181
|
__pyx_t_11 = (__pyx_v_i == __pyx_v_last_i);
|
|
7067
7182
|
if (__pyx_t_11) {
|
|
7068
7183
|
|
|
7069
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7184
|
+
/* "fontTools/cu2qu/cu2qu.py":561
|
|
7070
7185
|
* if i == last_i:
|
|
7071
7186
|
* # done. go home
|
|
7072
7187
|
* return [[(s.real, s.imag) for s in spline] for spline in splines] # <<<<<<<<<<<<<<
|
|
@@ -7075,7 +7190,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7075
7190
|
*/
|
|
7076
7191
|
__Pyx_XDECREF(__pyx_r);
|
|
7077
7192
|
{ /* enter inner scope */
|
|
7078
|
-
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
7193
|
+
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L24_error)
|
|
7079
7194
|
__Pyx_GOTREF(__pyx_t_1);
|
|
7080
7195
|
__pyx_t_2 = __pyx_v_splines; __Pyx_INCREF(__pyx_t_2);
|
|
7081
7196
|
__pyx_t_7 = 0;
|
|
@@ -7083,27 +7198,27 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7083
7198
|
{
|
|
7084
7199
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
|
|
7085
7200
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
7086
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
7201
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 561, __pyx_L24_error)
|
|
7087
7202
|
#endif
|
|
7088
7203
|
if (__pyx_t_7 >= __pyx_temp) break;
|
|
7089
7204
|
}
|
|
7090
7205
|
__pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_7);
|
|
7091
7206
|
++__pyx_t_7;
|
|
7092
|
-
if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7207
|
+
if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L24_error)
|
|
7093
7208
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7094
7209
|
__Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_spline, __pyx_t_5);
|
|
7095
7210
|
__pyx_t_5 = 0;
|
|
7096
7211
|
{ /* enter inner scope */
|
|
7097
|
-
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7212
|
+
__pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 561, __pyx_L29_error)
|
|
7098
7213
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7099
7214
|
if (likely(PyList_CheckExact(__pyx_8genexpr4__pyx_v_spline)) || PyTuple_CheckExact(__pyx_8genexpr4__pyx_v_spline)) {
|
|
7100
7215
|
__pyx_t_6 = __pyx_8genexpr4__pyx_v_spline; __Pyx_INCREF(__pyx_t_6);
|
|
7101
7216
|
__pyx_t_3 = 0;
|
|
7102
7217
|
__pyx_t_4 = NULL;
|
|
7103
7218
|
} else {
|
|
7104
|
-
__pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr4__pyx_v_spline); if (unlikely(!__pyx_t_6)) __PYX_ERR(0,
|
|
7219
|
+
__pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr4__pyx_v_spline); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L29_error)
|
|
7105
7220
|
__Pyx_GOTREF(__pyx_t_6);
|
|
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,
|
|
7221
|
+
__pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L29_error)
|
|
7107
7222
|
}
|
|
7108
7223
|
for (;;) {
|
|
7109
7224
|
if (likely(!__pyx_t_4)) {
|
|
@@ -7111,7 +7226,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7111
7226
|
{
|
|
7112
7227
|
Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
|
|
7113
7228
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
7114
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
7229
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 561, __pyx_L29_error)
|
|
7115
7230
|
#endif
|
|
7116
7231
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
7117
7232
|
}
|
|
@@ -7121,7 +7236,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7121
7236
|
{
|
|
7122
7237
|
Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
|
|
7123
7238
|
#if !CYTHON_ASSUME_SAFE_SIZE
|
|
7124
|
-
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0,
|
|
7239
|
+
if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 561, __pyx_L29_error)
|
|
7125
7240
|
#endif
|
|
7126
7241
|
if (__pyx_t_3 >= __pyx_temp) break;
|
|
7127
7242
|
}
|
|
@@ -7132,13 +7247,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7132
7247
|
#endif
|
|
7133
7248
|
++__pyx_t_3;
|
|
7134
7249
|
}
|
|
7135
|
-
if (unlikely(!__pyx_t_10)) __PYX_ERR(0,
|
|
7250
|
+
if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 561, __pyx_L29_error)
|
|
7136
7251
|
} else {
|
|
7137
7252
|
__pyx_t_10 = __pyx_t_4(__pyx_t_6);
|
|
7138
7253
|
if (unlikely(!__pyx_t_10)) {
|
|
7139
7254
|
PyObject* exc_type = PyErr_Occurred();
|
|
7140
7255
|
if (exc_type) {
|
|
7141
|
-
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0,
|
|
7256
|
+
if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 561, __pyx_L29_error)
|
|
7142
7257
|
PyErr_Clear();
|
|
7143
7258
|
}
|
|
7144
7259
|
break;
|
|
@@ -7147,19 +7262,19 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7147
7262
|
__Pyx_GOTREF(__pyx_t_10);
|
|
7148
7263
|
__Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_s, __pyx_t_10);
|
|
7149
7264
|
__pyx_t_10 = 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,
|
|
7265
|
+
__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, 561, __pyx_L29_error)
|
|
7151
7266
|
__Pyx_GOTREF(__pyx_t_10);
|
|
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,
|
|
7267
|
+
__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, 561, __pyx_L29_error)
|
|
7153
7268
|
__Pyx_GOTREF(__pyx_t_9);
|
|
7154
|
-
__pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0,
|
|
7269
|
+
__pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 561, __pyx_L29_error)
|
|
7155
7270
|
__Pyx_GOTREF(__pyx_t_15);
|
|
7156
7271
|
__Pyx_GIVEREF(__pyx_t_10);
|
|
7157
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10) != (0)) __PYX_ERR(0,
|
|
7272
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_10) != (0)) __PYX_ERR(0, 561, __pyx_L29_error);
|
|
7158
7273
|
__Pyx_GIVEREF(__pyx_t_9);
|
|
7159
|
-
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_9) != (0)) __PYX_ERR(0,
|
|
7274
|
+
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_9) != (0)) __PYX_ERR(0, 561, __pyx_L29_error);
|
|
7160
7275
|
__pyx_t_10 = 0;
|
|
7161
7276
|
__pyx_t_9 = 0;
|
|
7162
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_15))) __PYX_ERR(0,
|
|
7277
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_15))) __PYX_ERR(0, 561, __pyx_L29_error)
|
|
7163
7278
|
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
|
|
7164
7279
|
}
|
|
7165
7280
|
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
|
|
@@ -7170,7 +7285,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7170
7285
|
goto __pyx_L24_error;
|
|
7171
7286
|
__pyx_L33_exit_scope:;
|
|
7172
7287
|
} /* exit inner scope */
|
|
7173
|
-
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0,
|
|
7288
|
+
if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 561, __pyx_L24_error)
|
|
7174
7289
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7175
7290
|
}
|
|
7176
7291
|
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
@@ -7185,7 +7300,7 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7185
7300
|
__pyx_t_1 = 0;
|
|
7186
7301
|
goto __pyx_L0;
|
|
7187
7302
|
|
|
7188
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7303
|
+
/* "fontTools/cu2qu/cu2qu.py":559
|
|
7189
7304
|
* splines[i] = spline
|
|
7190
7305
|
* i = (i + 1) % l
|
|
7191
7306
|
* if i == last_i: # <<<<<<<<<<<<<<
|
|
@@ -7197,13 +7312,13 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7197
7312
|
}
|
|
7198
7313
|
__pyx_L18_break:;
|
|
7199
7314
|
|
|
7200
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7315
|
+
/* "fontTools/cu2qu/cu2qu.py":563
|
|
7201
7316
|
* return [[(s.real, s.imag) for s in spline] for spline in splines]
|
|
7202
7317
|
*
|
|
7203
7318
|
* raise ApproxNotFoundError(curves) # <<<<<<<<<<<<<<
|
|
7204
7319
|
*/
|
|
7205
7320
|
__pyx_t_2 = NULL;
|
|
7206
|
-
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
7321
|
+
__Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ApproxNotFoundError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error)
|
|
7207
7322
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7208
7323
|
__pyx_t_16 = 1;
|
|
7209
7324
|
#if CYTHON_UNPACK_METHODS
|
|
@@ -7222,14 +7337,14 @@ static PyObject *__pyx_pf_9fontTools_5cu2qu_5cu2qu_5curves_to_quadratic(CYTHON_U
|
|
|
7222
7337
|
__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));
|
|
7223
7338
|
__Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
|
|
7224
7339
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7225
|
-
if (unlikely(!__pyx_t_1)) __PYX_ERR(0,
|
|
7340
|
+
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
|
|
7226
7341
|
__Pyx_GOTREF(__pyx_t_1);
|
|
7227
7342
|
}
|
|
7228
7343
|
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
|
|
7229
7344
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
7230
|
-
__PYX_ERR(0,
|
|
7345
|
+
__PYX_ERR(0, 563, __pyx_L1_error)
|
|
7231
7346
|
|
|
7232
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
7347
|
+
/* "fontTools/cu2qu/cu2qu.py":503
|
|
7233
7348
|
*
|
|
7234
7349
|
*
|
|
7235
7350
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
|
|
@@ -7455,15 +7570,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
7455
7570
|
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
|
|
7456
7571
|
/*--- Type init code ---*/
|
|
7457
7572
|
#if CYTHON_USE_TYPE_SPECS
|
|
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,
|
|
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,
|
|
7573
|
+
__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, 150, __pyx_L1_error)
|
|
7574
|
+
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, 150, __pyx_L1_error)
|
|
7460
7575
|
#else
|
|
7461
7576
|
__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;
|
|
7462
7577
|
#endif
|
|
7463
7578
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
7464
7579
|
#endif
|
|
7465
7580
|
#if !CYTHON_USE_TYPE_SPECS
|
|
7466
|
-
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0,
|
|
7581
|
+
if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9fontTools_5cu2qu_5cu2qu___pyx_scope_struct___split_cubic_into_n_gen) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
|
|
7467
7582
|
#endif
|
|
7468
7583
|
#if !CYTHON_COMPILING_IN_LIMITED_API
|
|
7469
7584
|
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)) {
|
|
@@ -7888,70 +8003,70 @@ __Pyx_RefNannySetupContext("PyInit_cu2qu", 0);
|
|
|
7888
8003
|
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)
|
|
7889
8004
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7890
8005
|
|
|
7891
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
8006
|
+
/* "fontTools/cu2qu/cu2qu.py":150
|
|
7892
8007
|
*
|
|
7893
8008
|
*
|
|
7894
8009
|
* @cython.locals( # <<<<<<<<<<<<<<
|
|
7895
8010
|
* p0=cython.complex,
|
|
7896
8011
|
* p1=cython.complex,
|
|
7897
8012
|
*/
|
|
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,
|
|
8013
|
+
__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, 150, __pyx_L1_error)
|
|
7899
8014
|
__Pyx_GOTREF(__pyx_t_5);
|
|
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,
|
|
8015
|
+
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, 150, __pyx_L1_error)
|
|
7901
8016
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7902
8017
|
|
|
7903
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
8018
|
+
/* "fontTools/cu2qu/cu2qu.py":471
|
|
7904
8019
|
* @cython.locals(n=cython.int)
|
|
7905
8020
|
* @cython.locals(all_quadratic=cython.int)
|
|
7906
8021
|
* def curve_to_quadratic(curve, max_err, all_quadratic=True): # <<<<<<<<<<<<<<
|
|
7907
8022
|
* """Approximate a cubic Bezier curve with a spline of n quadratics.
|
|
7908
8023
|
*
|
|
7909
8024
|
*/
|
|
7910
|
-
__pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
8025
|
+
__pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error)
|
|
7911
8026
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7912
8027
|
|
|
7913
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
8028
|
+
/* "fontTools/cu2qu/cu2qu.py":468
|
|
7914
8029
|
*
|
|
7915
8030
|
*
|
|
7916
8031
|
* @cython.locals(max_err=cython.double) # <<<<<<<<<<<<<<
|
|
7917
8032
|
* @cython.locals(n=cython.int)
|
|
7918
8033
|
* @cython.locals(all_quadratic=cython.int)
|
|
7919
8034
|
*/
|
|
7920
|
-
__pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
8035
|
+
__pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L1_error)
|
|
7921
8036
|
__Pyx_GOTREF(__pyx_t_4);
|
|
7922
8037
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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,
|
|
8038
|
+
__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, 468, __pyx_L1_error)
|
|
7924
8039
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7925
8040
|
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4);
|
|
7926
8041
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
8042
|
+
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curve_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
|
|
7928
8043
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7929
8044
|
|
|
7930
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
8045
|
+
/* "fontTools/cu2qu/cu2qu.py":505
|
|
7931
8046
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int)
|
|
7932
8047
|
* @cython.locals(all_quadratic=cython.int)
|
|
7933
8048
|
* def curves_to_quadratic(curves, max_errors, all_quadratic=True): # <<<<<<<<<<<<<<
|
|
7934
8049
|
* """Return quadratic Bezier splines approximating the input cubic Beziers.
|
|
7935
8050
|
*
|
|
7936
8051
|
*/
|
|
7937
|
-
__pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0,
|
|
8052
|
+
__pyx_t_5 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 505, __pyx_L1_error)
|
|
7938
8053
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7939
8054
|
|
|
7940
|
-
/* "fontTools/cu2qu/cu2qu.py":
|
|
8055
|
+
/* "fontTools/cu2qu/cu2qu.py":503
|
|
7941
8056
|
*
|
|
7942
8057
|
*
|
|
7943
8058
|
* @cython.locals(l=cython.int, last_i=cython.int, i=cython.int) # <<<<<<<<<<<<<<
|
|
7944
8059
|
* @cython.locals(all_quadratic=cython.int)
|
|
7945
8060
|
* def curves_to_quadratic(curves, max_errors, all_quadratic=True):
|
|
7946
8061
|
*/
|
|
7947
|
-
__pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0,
|
|
8062
|
+
__pyx_t_4 = PyTuple_Pack(1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 503, __pyx_L1_error)
|
|
7948
8063
|
__Pyx_GOTREF(__pyx_t_4);
|
|
7949
8064
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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,
|
|
8065
|
+
__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, 503, __pyx_L1_error)
|
|
7951
8066
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7952
8067
|
__Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4);
|
|
7953
8068
|
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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,
|
|
8069
|
+
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_curves_to_quadratic, __pyx_t_5) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
|
|
7955
8070
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7956
8071
|
|
|
7957
8072
|
/* "fontTools/cu2qu/cu2qu.py":1
|
|
@@ -7961,7 +8076,7 @@ __Pyx_RefNannySetupContext("PyInit_cu2qu", 0);
|
|
|
7961
8076
|
*/
|
|
7962
8077
|
__pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7963
8078
|
__Pyx_GOTREF(__pyx_t_5);
|
|
7964
|
-
if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->
|
|
8079
|
+
if (PyDict_SetItem(__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_curves_to_quadratic_line_503, __pyx_mstate_global->__pyx_kp_u_Return_quadratic_Bezier_splines) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
7965
8080
|
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)
|
|
7966
8081
|
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
|
|
7967
8082
|
|
|
@@ -8054,7 +8169,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = {
|
|
|
8054
8169
|
{__pyx_k_curve_to_quadratic, sizeof(__pyx_k_curve_to_quadratic), 0, 1, 1}, /* PyObject cname: __pyx_n_u_curve_to_quadratic */
|
|
8055
8170
|
{__pyx_k_curves, sizeof(__pyx_k_curves), 0, 1, 1}, /* PyObject cname: __pyx_n_u_curves */
|
|
8056
8171
|
{__pyx_k_curves_to_quadratic, sizeof(__pyx_k_curves_to_quadratic), 0, 1, 1}, /* PyObject cname: __pyx_n_u_curves_to_quadratic */
|
|
8057
|
-
{
|
|
8172
|
+
{__pyx_k_curves_to_quadratic_line_503, sizeof(__pyx_k_curves_to_quadratic_line_503), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_curves_to_quadratic_line_503 */
|
|
8058
8173
|
{__pyx_k_d, sizeof(__pyx_k_d), 0, 1, 1}, /* PyObject cname: __pyx_n_u_d */
|
|
8059
8174
|
{__pyx_k_d1, sizeof(__pyx_k_d1), 0, 1, 1}, /* PyObject cname: __pyx_n_u_d1 */
|
|
8060
8175
|
{__pyx_k_delta_2, sizeof(__pyx_k_delta_2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_delta_2 */
|
|
@@ -8114,9 +8229,9 @@ static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) {
|
|
|
8114
8229
|
CYTHON_UNUSED_VAR(__pyx_mstate);
|
|
8115
8230
|
__pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 20, __pyx_L1_error)
|
|
8116
8231
|
__pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 20, __pyx_L1_error)
|
|
8117
|
-
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0,
|
|
8118
|
-
__pyx_builtin_ZeroDivisionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ZeroDivisionError); if (!__pyx_builtin_ZeroDivisionError) __PYX_ERR(0,
|
|
8119
|
-
__pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0,
|
|
8232
|
+
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 169, __pyx_L1_error)
|
|
8233
|
+
__pyx_builtin_ZeroDivisionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ZeroDivisionError); if (!__pyx_builtin_ZeroDivisionError) __PYX_ERR(0, 301, __pyx_L1_error)
|
|
8234
|
+
__pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 543, __pyx_L1_error)
|
|
8120
8235
|
return 0;
|
|
8121
8236
|
__pyx_L1_error:;
|
|
8122
8237
|
return -1;
|
|
@@ -8173,17 +8288,17 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) {
|
|
|
8173
8288
|
PyObject* tuple_dedup_map = PyDict_New();
|
|
8174
8289
|
if (unlikely(!tuple_dedup_map)) return -1;
|
|
8175
8290
|
{
|
|
8176
|
-
const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 19, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR),
|
|
8291
|
+
const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 19, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 150, 2};
|
|
8177
8292
|
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};
|
|
8178
8293
|
__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;
|
|
8179
8294
|
}
|
|
8180
8295
|
{
|
|
8181
|
-
const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS),
|
|
8296
|
+
const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 468, 97};
|
|
8182
8297
|
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};
|
|
8183
8298
|
__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;
|
|
8184
8299
|
}
|
|
8185
8300
|
{
|
|
8186
|
-
const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS),
|
|
8301
|
+
const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 13, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 503, 211};
|
|
8187
8302
|
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};
|
|
8188
8303
|
__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;
|
|
8189
8304
|
}
|
|
@@ -8405,7 +8520,250 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
|
|
|
8405
8520
|
PyErr_Format(PyExc_NameError,
|
|
8406
8521
|
"name '%U' is not defined", name);
|
|
8407
8522
|
}
|
|
8408
|
-
return result;
|
|
8523
|
+
return result;
|
|
8524
|
+
}
|
|
8525
|
+
|
|
8526
|
+
/* PyFunctionFastCall */
|
|
8527
|
+
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
|
|
8528
|
+
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na,
|
|
8529
|
+
PyObject *globals) {
|
|
8530
|
+
PyFrameObject *f;
|
|
8531
|
+
PyThreadState *tstate = __Pyx_PyThreadState_Current;
|
|
8532
|
+
PyObject **fastlocals;
|
|
8533
|
+
Py_ssize_t i;
|
|
8534
|
+
PyObject *result;
|
|
8535
|
+
assert(globals != NULL);
|
|
8536
|
+
/* XXX Perhaps we should create a specialized
|
|
8537
|
+
PyFrame_New() that doesn't take locals, but does
|
|
8538
|
+
take builtins without sanity checking them.
|
|
8539
|
+
*/
|
|
8540
|
+
assert(tstate != NULL);
|
|
8541
|
+
f = PyFrame_New(tstate, co, globals, NULL);
|
|
8542
|
+
if (f == NULL) {
|
|
8543
|
+
return NULL;
|
|
8544
|
+
}
|
|
8545
|
+
fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
|
|
8546
|
+
for (i = 0; i < na; i++) {
|
|
8547
|
+
Py_INCREF(*args);
|
|
8548
|
+
fastlocals[i] = *args++;
|
|
8549
|
+
}
|
|
8550
|
+
result = PyEval_EvalFrameEx(f,0);
|
|
8551
|
+
++tstate->recursion_depth;
|
|
8552
|
+
Py_DECREF(f);
|
|
8553
|
+
--tstate->recursion_depth;
|
|
8554
|
+
return result;
|
|
8555
|
+
}
|
|
8556
|
+
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) {
|
|
8557
|
+
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
|
|
8558
|
+
PyObject *globals = PyFunction_GET_GLOBALS(func);
|
|
8559
|
+
PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
|
|
8560
|
+
PyObject *closure;
|
|
8561
|
+
PyObject *kwdefs;
|
|
8562
|
+
PyObject *kwtuple, **k;
|
|
8563
|
+
PyObject **d;
|
|
8564
|
+
Py_ssize_t nd;
|
|
8565
|
+
Py_ssize_t nk;
|
|
8566
|
+
PyObject *result;
|
|
8567
|
+
assert(kwargs == NULL || PyDict_Check(kwargs));
|
|
8568
|
+
nk = kwargs ? PyDict_Size(kwargs) : 0;
|
|
8569
|
+
if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
|
|
8570
|
+
return NULL;
|
|
8571
|
+
}
|
|
8572
|
+
if (
|
|
8573
|
+
co->co_kwonlyargcount == 0 &&
|
|
8574
|
+
likely(kwargs == NULL || nk == 0) &&
|
|
8575
|
+
co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
|
|
8576
|
+
if (argdefs == NULL && co->co_argcount == nargs) {
|
|
8577
|
+
result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
|
|
8578
|
+
goto done;
|
|
8579
|
+
}
|
|
8580
|
+
else if (nargs == 0 && argdefs != NULL
|
|
8581
|
+
&& co->co_argcount == Py_SIZE(argdefs)) {
|
|
8582
|
+
/* function called with no arguments, but all parameters have
|
|
8583
|
+
a default value: use default values as arguments .*/
|
|
8584
|
+
args = &PyTuple_GET_ITEM(argdefs, 0);
|
|
8585
|
+
result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
|
|
8586
|
+
goto done;
|
|
8587
|
+
}
|
|
8588
|
+
}
|
|
8589
|
+
if (kwargs != NULL) {
|
|
8590
|
+
Py_ssize_t pos, i;
|
|
8591
|
+
kwtuple = PyTuple_New(2 * nk);
|
|
8592
|
+
if (kwtuple == NULL) {
|
|
8593
|
+
result = NULL;
|
|
8594
|
+
goto done;
|
|
8595
|
+
}
|
|
8596
|
+
k = &PyTuple_GET_ITEM(kwtuple, 0);
|
|
8597
|
+
pos = i = 0;
|
|
8598
|
+
while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
|
|
8599
|
+
Py_INCREF(k[i]);
|
|
8600
|
+
Py_INCREF(k[i+1]);
|
|
8601
|
+
i += 2;
|
|
8602
|
+
}
|
|
8603
|
+
nk = i / 2;
|
|
8604
|
+
}
|
|
8605
|
+
else {
|
|
8606
|
+
kwtuple = NULL;
|
|
8607
|
+
k = NULL;
|
|
8608
|
+
}
|
|
8609
|
+
closure = PyFunction_GET_CLOSURE(func);
|
|
8610
|
+
kwdefs = PyFunction_GET_KW_DEFAULTS(func);
|
|
8611
|
+
if (argdefs != NULL) {
|
|
8612
|
+
d = &PyTuple_GET_ITEM(argdefs, 0);
|
|
8613
|
+
nd = Py_SIZE(argdefs);
|
|
8614
|
+
}
|
|
8615
|
+
else {
|
|
8616
|
+
d = NULL;
|
|
8617
|
+
nd = 0;
|
|
8618
|
+
}
|
|
8619
|
+
result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
|
|
8620
|
+
args, (int)nargs,
|
|
8621
|
+
k, (int)nk,
|
|
8622
|
+
d, (int)nd, kwdefs, closure);
|
|
8623
|
+
Py_XDECREF(kwtuple);
|
|
8624
|
+
done:
|
|
8625
|
+
Py_LeaveRecursiveCall();
|
|
8626
|
+
return result;
|
|
8627
|
+
}
|
|
8628
|
+
#endif
|
|
8629
|
+
|
|
8630
|
+
/* PyObjectCall */
|
|
8631
|
+
#if CYTHON_COMPILING_IN_CPYTHON
|
|
8632
|
+
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
|
|
8633
|
+
PyObject *result;
|
|
8634
|
+
ternaryfunc call = Py_TYPE(func)->tp_call;
|
|
8635
|
+
if (unlikely(!call))
|
|
8636
|
+
return PyObject_Call(func, arg, kw);
|
|
8637
|
+
if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
|
|
8638
|
+
return NULL;
|
|
8639
|
+
result = (*call)(func, arg, kw);
|
|
8640
|
+
Py_LeaveRecursiveCall();
|
|
8641
|
+
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
|
|
8642
|
+
PyErr_SetString(
|
|
8643
|
+
PyExc_SystemError,
|
|
8644
|
+
"NULL result without error in PyObject_Call");
|
|
8645
|
+
}
|
|
8646
|
+
return result;
|
|
8647
|
+
}
|
|
8648
|
+
#endif
|
|
8649
|
+
|
|
8650
|
+
/* PyObjectCallMethO */
|
|
8651
|
+
#if CYTHON_COMPILING_IN_CPYTHON
|
|
8652
|
+
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
|
|
8653
|
+
PyObject *self, *result;
|
|
8654
|
+
PyCFunction cfunc;
|
|
8655
|
+
cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
|
|
8656
|
+
self = __Pyx_CyOrPyCFunction_GET_SELF(func);
|
|
8657
|
+
if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
|
|
8658
|
+
return NULL;
|
|
8659
|
+
result = cfunc(self, arg);
|
|
8660
|
+
Py_LeaveRecursiveCall();
|
|
8661
|
+
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
|
|
8662
|
+
PyErr_SetString(
|
|
8663
|
+
PyExc_SystemError,
|
|
8664
|
+
"NULL result without error in PyObject_Call");
|
|
8665
|
+
}
|
|
8666
|
+
return result;
|
|
8667
|
+
}
|
|
8668
|
+
#endif
|
|
8669
|
+
|
|
8670
|
+
/* PyObjectFastCall */
|
|
8671
|
+
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
|
|
8672
|
+
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
|
|
8673
|
+
PyObject *argstuple;
|
|
8674
|
+
PyObject *result = 0;
|
|
8675
|
+
size_t i;
|
|
8676
|
+
argstuple = PyTuple_New((Py_ssize_t)nargs);
|
|
8677
|
+
if (unlikely(!argstuple)) return NULL;
|
|
8678
|
+
for (i = 0; i < nargs; i++) {
|
|
8679
|
+
Py_INCREF(args[i]);
|
|
8680
|
+
if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
|
|
8681
|
+
}
|
|
8682
|
+
result = __Pyx_PyObject_Call(func, argstuple, kwargs);
|
|
8683
|
+
bad:
|
|
8684
|
+
Py_DECREF(argstuple);
|
|
8685
|
+
return result;
|
|
8686
|
+
}
|
|
8687
|
+
#endif
|
|
8688
|
+
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
|
|
8689
|
+
#if PY_VERSION_HEX < 0x03090000
|
|
8690
|
+
#define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
|
|
8691
|
+
#elif CYTHON_COMPILING_IN_CPYTHON
|
|
8692
|
+
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
|
|
8693
|
+
PyTypeObject *tp = Py_TYPE(callable);
|
|
8694
|
+
#if defined(__Pyx_CyFunction_USED)
|
|
8695
|
+
if (__Pyx_CyFunction_CheckExact(callable)) {
|
|
8696
|
+
return __Pyx_CyFunction_func_vectorcall(callable);
|
|
8697
|
+
}
|
|
8698
|
+
#endif
|
|
8699
|
+
if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
|
|
8700
|
+
return NULL;
|
|
8701
|
+
}
|
|
8702
|
+
assert(PyCallable_Check(callable));
|
|
8703
|
+
Py_ssize_t offset = tp->tp_vectorcall_offset;
|
|
8704
|
+
assert(offset > 0);
|
|
8705
|
+
vectorcallfunc ptr;
|
|
8706
|
+
memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
|
|
8707
|
+
return ptr;
|
|
8708
|
+
}
|
|
8709
|
+
#else
|
|
8710
|
+
#define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
|
|
8711
|
+
#endif
|
|
8712
|
+
#endif
|
|
8713
|
+
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
|
|
8714
|
+
Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
|
|
8715
|
+
#if CYTHON_COMPILING_IN_CPYTHON
|
|
8716
|
+
if (nargs == 0 && kwargs == NULL) {
|
|
8717
|
+
if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
|
|
8718
|
+
return __Pyx_PyObject_CallMethO(func, NULL);
|
|
8719
|
+
}
|
|
8720
|
+
else if (nargs == 1 && kwargs == NULL) {
|
|
8721
|
+
if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
|
|
8722
|
+
return __Pyx_PyObject_CallMethO(func, args[0]);
|
|
8723
|
+
}
|
|
8724
|
+
#endif
|
|
8725
|
+
#if PY_VERSION_HEX < 0x030800B1
|
|
8726
|
+
#if CYTHON_FAST_PYCCALL
|
|
8727
|
+
if (PyCFunction_Check(func)) {
|
|
8728
|
+
if (kwargs) {
|
|
8729
|
+
return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
|
|
8730
|
+
} else {
|
|
8731
|
+
return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
|
|
8732
|
+
}
|
|
8733
|
+
}
|
|
8734
|
+
if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
|
|
8735
|
+
return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
|
|
8736
|
+
}
|
|
8737
|
+
#endif
|
|
8738
|
+
#if CYTHON_FAST_PYCALL
|
|
8739
|
+
if (PyFunction_Check(func)) {
|
|
8740
|
+
return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
|
|
8741
|
+
}
|
|
8742
|
+
#endif
|
|
8743
|
+
#endif
|
|
8744
|
+
if (kwargs == NULL) {
|
|
8745
|
+
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
|
|
8746
|
+
vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
|
|
8747
|
+
if (f) {
|
|
8748
|
+
return f(func, args, _nargs, NULL);
|
|
8749
|
+
}
|
|
8750
|
+
#elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
|
|
8751
|
+
if (__Pyx_CyFunction_CheckExact(func)) {
|
|
8752
|
+
__pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
|
|
8753
|
+
if (f) return f(func, args, _nargs, NULL);
|
|
8754
|
+
}
|
|
8755
|
+
#elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL
|
|
8756
|
+
return PyObject_Vectorcall(func, args, _nargs, NULL);
|
|
8757
|
+
#endif
|
|
8758
|
+
}
|
|
8759
|
+
if (nargs == 0) {
|
|
8760
|
+
return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
|
|
8761
|
+
}
|
|
8762
|
+
#if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
|
|
8763
|
+
return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
|
|
8764
|
+
#else
|
|
8765
|
+
return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
|
|
8766
|
+
#endif
|
|
8409
8767
|
}
|
|
8410
8768
|
|
|
8411
8769
|
/* PyLongCompare */
|
|
@@ -8662,249 +9020,6 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
|
|
|
8662
9020
|
return __Pyx_GetBuiltinName(name);
|
|
8663
9021
|
}
|
|
8664
9022
|
|
|
8665
|
-
/* PyFunctionFastCall */
|
|
8666
|
-
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
|
|
8667
|
-
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject *const *args, Py_ssize_t na,
|
|
8668
|
-
PyObject *globals) {
|
|
8669
|
-
PyFrameObject *f;
|
|
8670
|
-
PyThreadState *tstate = __Pyx_PyThreadState_Current;
|
|
8671
|
-
PyObject **fastlocals;
|
|
8672
|
-
Py_ssize_t i;
|
|
8673
|
-
PyObject *result;
|
|
8674
|
-
assert(globals != NULL);
|
|
8675
|
-
/* XXX Perhaps we should create a specialized
|
|
8676
|
-
PyFrame_New() that doesn't take locals, but does
|
|
8677
|
-
take builtins without sanity checking them.
|
|
8678
|
-
*/
|
|
8679
|
-
assert(tstate != NULL);
|
|
8680
|
-
f = PyFrame_New(tstate, co, globals, NULL);
|
|
8681
|
-
if (f == NULL) {
|
|
8682
|
-
return NULL;
|
|
8683
|
-
}
|
|
8684
|
-
fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
|
|
8685
|
-
for (i = 0; i < na; i++) {
|
|
8686
|
-
Py_INCREF(*args);
|
|
8687
|
-
fastlocals[i] = *args++;
|
|
8688
|
-
}
|
|
8689
|
-
result = PyEval_EvalFrameEx(f,0);
|
|
8690
|
-
++tstate->recursion_depth;
|
|
8691
|
-
Py_DECREF(f);
|
|
8692
|
-
--tstate->recursion_depth;
|
|
8693
|
-
return result;
|
|
8694
|
-
}
|
|
8695
|
-
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs) {
|
|
8696
|
-
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
|
|
8697
|
-
PyObject *globals = PyFunction_GET_GLOBALS(func);
|
|
8698
|
-
PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
|
|
8699
|
-
PyObject *closure;
|
|
8700
|
-
PyObject *kwdefs;
|
|
8701
|
-
PyObject *kwtuple, **k;
|
|
8702
|
-
PyObject **d;
|
|
8703
|
-
Py_ssize_t nd;
|
|
8704
|
-
Py_ssize_t nk;
|
|
8705
|
-
PyObject *result;
|
|
8706
|
-
assert(kwargs == NULL || PyDict_Check(kwargs));
|
|
8707
|
-
nk = kwargs ? PyDict_Size(kwargs) : 0;
|
|
8708
|
-
if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
|
|
8709
|
-
return NULL;
|
|
8710
|
-
}
|
|
8711
|
-
if (
|
|
8712
|
-
co->co_kwonlyargcount == 0 &&
|
|
8713
|
-
likely(kwargs == NULL || nk == 0) &&
|
|
8714
|
-
co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
|
|
8715
|
-
if (argdefs == NULL && co->co_argcount == nargs) {
|
|
8716
|
-
result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
|
|
8717
|
-
goto done;
|
|
8718
|
-
}
|
|
8719
|
-
else if (nargs == 0 && argdefs != NULL
|
|
8720
|
-
&& co->co_argcount == Py_SIZE(argdefs)) {
|
|
8721
|
-
/* function called with no arguments, but all parameters have
|
|
8722
|
-
a default value: use default values as arguments .*/
|
|
8723
|
-
args = &PyTuple_GET_ITEM(argdefs, 0);
|
|
8724
|
-
result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
|
|
8725
|
-
goto done;
|
|
8726
|
-
}
|
|
8727
|
-
}
|
|
8728
|
-
if (kwargs != NULL) {
|
|
8729
|
-
Py_ssize_t pos, i;
|
|
8730
|
-
kwtuple = PyTuple_New(2 * nk);
|
|
8731
|
-
if (kwtuple == NULL) {
|
|
8732
|
-
result = NULL;
|
|
8733
|
-
goto done;
|
|
8734
|
-
}
|
|
8735
|
-
k = &PyTuple_GET_ITEM(kwtuple, 0);
|
|
8736
|
-
pos = i = 0;
|
|
8737
|
-
while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
|
|
8738
|
-
Py_INCREF(k[i]);
|
|
8739
|
-
Py_INCREF(k[i+1]);
|
|
8740
|
-
i += 2;
|
|
8741
|
-
}
|
|
8742
|
-
nk = i / 2;
|
|
8743
|
-
}
|
|
8744
|
-
else {
|
|
8745
|
-
kwtuple = NULL;
|
|
8746
|
-
k = NULL;
|
|
8747
|
-
}
|
|
8748
|
-
closure = PyFunction_GET_CLOSURE(func);
|
|
8749
|
-
kwdefs = PyFunction_GET_KW_DEFAULTS(func);
|
|
8750
|
-
if (argdefs != NULL) {
|
|
8751
|
-
d = &PyTuple_GET_ITEM(argdefs, 0);
|
|
8752
|
-
nd = Py_SIZE(argdefs);
|
|
8753
|
-
}
|
|
8754
|
-
else {
|
|
8755
|
-
d = NULL;
|
|
8756
|
-
nd = 0;
|
|
8757
|
-
}
|
|
8758
|
-
result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
|
|
8759
|
-
args, (int)nargs,
|
|
8760
|
-
k, (int)nk,
|
|
8761
|
-
d, (int)nd, kwdefs, closure);
|
|
8762
|
-
Py_XDECREF(kwtuple);
|
|
8763
|
-
done:
|
|
8764
|
-
Py_LeaveRecursiveCall();
|
|
8765
|
-
return result;
|
|
8766
|
-
}
|
|
8767
|
-
#endif
|
|
8768
|
-
|
|
8769
|
-
/* PyObjectCall */
|
|
8770
|
-
#if CYTHON_COMPILING_IN_CPYTHON
|
|
8771
|
-
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
|
|
8772
|
-
PyObject *result;
|
|
8773
|
-
ternaryfunc call = Py_TYPE(func)->tp_call;
|
|
8774
|
-
if (unlikely(!call))
|
|
8775
|
-
return PyObject_Call(func, arg, kw);
|
|
8776
|
-
if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
|
|
8777
|
-
return NULL;
|
|
8778
|
-
result = (*call)(func, arg, kw);
|
|
8779
|
-
Py_LeaveRecursiveCall();
|
|
8780
|
-
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
|
|
8781
|
-
PyErr_SetString(
|
|
8782
|
-
PyExc_SystemError,
|
|
8783
|
-
"NULL result without error in PyObject_Call");
|
|
8784
|
-
}
|
|
8785
|
-
return result;
|
|
8786
|
-
}
|
|
8787
|
-
#endif
|
|
8788
|
-
|
|
8789
|
-
/* PyObjectCallMethO */
|
|
8790
|
-
#if CYTHON_COMPILING_IN_CPYTHON
|
|
8791
|
-
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
|
|
8792
|
-
PyObject *self, *result;
|
|
8793
|
-
PyCFunction cfunc;
|
|
8794
|
-
cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
|
|
8795
|
-
self = __Pyx_CyOrPyCFunction_GET_SELF(func);
|
|
8796
|
-
if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
|
|
8797
|
-
return NULL;
|
|
8798
|
-
result = cfunc(self, arg);
|
|
8799
|
-
Py_LeaveRecursiveCall();
|
|
8800
|
-
if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
|
|
8801
|
-
PyErr_SetString(
|
|
8802
|
-
PyExc_SystemError,
|
|
8803
|
-
"NULL result without error in PyObject_Call");
|
|
8804
|
-
}
|
|
8805
|
-
return result;
|
|
8806
|
-
}
|
|
8807
|
-
#endif
|
|
8808
|
-
|
|
8809
|
-
/* PyObjectFastCall */
|
|
8810
|
-
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
|
|
8811
|
-
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) {
|
|
8812
|
-
PyObject *argstuple;
|
|
8813
|
-
PyObject *result = 0;
|
|
8814
|
-
size_t i;
|
|
8815
|
-
argstuple = PyTuple_New((Py_ssize_t)nargs);
|
|
8816
|
-
if (unlikely(!argstuple)) return NULL;
|
|
8817
|
-
for (i = 0; i < nargs; i++) {
|
|
8818
|
-
Py_INCREF(args[i]);
|
|
8819
|
-
if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad;
|
|
8820
|
-
}
|
|
8821
|
-
result = __Pyx_PyObject_Call(func, argstuple, kwargs);
|
|
8822
|
-
bad:
|
|
8823
|
-
Py_DECREF(argstuple);
|
|
8824
|
-
return result;
|
|
8825
|
-
}
|
|
8826
|
-
#endif
|
|
8827
|
-
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
|
|
8828
|
-
#if PY_VERSION_HEX < 0x03090000
|
|
8829
|
-
#define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable)
|
|
8830
|
-
#elif CYTHON_COMPILING_IN_CPYTHON
|
|
8831
|
-
static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) {
|
|
8832
|
-
PyTypeObject *tp = Py_TYPE(callable);
|
|
8833
|
-
#if defined(__Pyx_CyFunction_USED)
|
|
8834
|
-
if (__Pyx_CyFunction_CheckExact(callable)) {
|
|
8835
|
-
return __Pyx_CyFunction_func_vectorcall(callable);
|
|
8836
|
-
}
|
|
8837
|
-
#endif
|
|
8838
|
-
if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
|
|
8839
|
-
return NULL;
|
|
8840
|
-
}
|
|
8841
|
-
assert(PyCallable_Check(callable));
|
|
8842
|
-
Py_ssize_t offset = tp->tp_vectorcall_offset;
|
|
8843
|
-
assert(offset > 0);
|
|
8844
|
-
vectorcallfunc ptr;
|
|
8845
|
-
memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
|
|
8846
|
-
return ptr;
|
|
8847
|
-
}
|
|
8848
|
-
#else
|
|
8849
|
-
#define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable)
|
|
8850
|
-
#endif
|
|
8851
|
-
#endif
|
|
8852
|
-
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) {
|
|
8853
|
-
Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
|
|
8854
|
-
#if CYTHON_COMPILING_IN_CPYTHON
|
|
8855
|
-
if (nargs == 0 && kwargs == NULL) {
|
|
8856
|
-
if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
|
|
8857
|
-
return __Pyx_PyObject_CallMethO(func, NULL);
|
|
8858
|
-
}
|
|
8859
|
-
else if (nargs == 1 && kwargs == NULL) {
|
|
8860
|
-
if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
|
|
8861
|
-
return __Pyx_PyObject_CallMethO(func, args[0]);
|
|
8862
|
-
}
|
|
8863
|
-
#endif
|
|
8864
|
-
#if PY_VERSION_HEX < 0x030800B1
|
|
8865
|
-
#if CYTHON_FAST_PYCCALL
|
|
8866
|
-
if (PyCFunction_Check(func)) {
|
|
8867
|
-
if (kwargs) {
|
|
8868
|
-
return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
|
|
8869
|
-
} else {
|
|
8870
|
-
return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
|
|
8871
|
-
}
|
|
8872
|
-
}
|
|
8873
|
-
if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
|
|
8874
|
-
return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
|
|
8875
|
-
}
|
|
8876
|
-
#endif
|
|
8877
|
-
#if CYTHON_FAST_PYCALL
|
|
8878
|
-
if (PyFunction_Check(func)) {
|
|
8879
|
-
return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
|
|
8880
|
-
}
|
|
8881
|
-
#endif
|
|
8882
|
-
#endif
|
|
8883
|
-
if (kwargs == NULL) {
|
|
8884
|
-
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API
|
|
8885
|
-
vectorcallfunc f = __Pyx_PyVectorcall_Function(func);
|
|
8886
|
-
if (f) {
|
|
8887
|
-
return f(func, args, _nargs, NULL);
|
|
8888
|
-
}
|
|
8889
|
-
#elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
|
|
8890
|
-
if (__Pyx_CyFunction_CheckExact(func)) {
|
|
8891
|
-
__pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
|
|
8892
|
-
if (f) return f(func, args, _nargs, NULL);
|
|
8893
|
-
}
|
|
8894
|
-
#elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL
|
|
8895
|
-
return PyObject_Vectorcall(func, args, _nargs, NULL);
|
|
8896
|
-
#endif
|
|
8897
|
-
}
|
|
8898
|
-
if (nargs == 0) {
|
|
8899
|
-
return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs);
|
|
8900
|
-
}
|
|
8901
|
-
#if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
|
|
8902
|
-
return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
|
|
8903
|
-
#else
|
|
8904
|
-
return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
|
|
8905
|
-
#endif
|
|
8906
|
-
}
|
|
8907
|
-
|
|
8908
9023
|
/* TupleAndListFromArray */
|
|
8909
9024
|
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL
|
|
8910
9025
|
static CYTHON_INLINE PyObject *
|
|
@@ -11225,6 +11340,7 @@ static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
|
|
|
11225
11340
|
return -1;
|
|
11226
11341
|
}
|
|
11227
11342
|
mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
|
|
11343
|
+
Py_DECREF(bases);
|
|
11228
11344
|
if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
|
|
11229
11345
|
return -1;
|
|
11230
11346
|
}
|
|
@@ -14998,6 +15114,10 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt
|
|
|
14998
15114
|
PyCode_NewWithPosOnlyArgs
|
|
14999
15115
|
#endif
|
|
15000
15116
|
(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
|
|
15117
|
+
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
|
|
15118
|
+
if (likely(result))
|
|
15119
|
+
result->_co_firsttraceable = 0;
|
|
15120
|
+
#endif
|
|
15001
15121
|
return result;
|
|
15002
15122
|
}
|
|
15003
15123
|
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
|