diff --git a/wx/svg/_nanosvg.c b/wx/svg/_nanosvg.c index cdba2718..c8b1fd5e 100644 --- a/wx/svg/_nanosvg.c +++ b/wx/svg/_nanosvg.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.15 */ +/* Generated by Cython 0.29.20 */ /* BEGIN: Cython Metadata { @@ -40,8 +40,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_15" -#define CYTHON_HEX_VERSION 0x001D0FF0 +#define CYTHON_ABI "0_29_20" +#define CYTHON_HEX_VERSION 0x001D14F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -517,8 +517,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -529,6 +531,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else @@ -609,11 +618,10 @@ static CYTHON_INLINE float __PYX_NAN() { #define __Pyx_truncl truncl #endif - +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ -{ \ - __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ -} + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus @@ -1004,7 +1012,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase { }; -/* "wx/svg/_nanosvg.pyx":280 +/* "wx/svg/_nanosvg.pyx":297 * #---------------------------------------------------------------------------- * * cdef class SVGshape: # <<<<<<<<<<<<<< @@ -1018,7 +1026,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape { }; -/* "wx/svg/_nanosvg.pyx":419 +/* "wx/svg/_nanosvg.pyx":436 * * #---------------------------------------------------------------------------- * cdef class SVGpath: # <<<<<<<<<<<<<< @@ -1032,7 +1040,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath { }; -/* "wx/svg/_nanosvg.pyx":505 +/* "wx/svg/_nanosvg.pyx":522 * * #---------------------------------------------------------------------------- * cdef class SVGpaint: # <<<<<<<<<<<<<< @@ -1046,7 +1054,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint { }; -/* "wx/svg/_nanosvg.pyx":557 +/* "wx/svg/_nanosvg.pyx":574 * * #---------------------------------------------------------------------------- * cdef class SVGgradient: # <<<<<<<<<<<<<< @@ -1060,7 +1068,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient { }; -/* "wx/svg/_nanosvg.pyx":609 +/* "wx/svg/_nanosvg.pyx":626 * * #---------------------------------------------------------------------------- * cdef class SVGgradientStop: # <<<<<<<<<<<<<< @@ -1074,7 +1082,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop { }; -/* "wx/svg/_nanosvg.pyx":267 +/* "wx/svg/_nanosvg.pyx":284 * * @property * def shapes(self): # <<<<<<<<<<<<<< @@ -1088,7 +1096,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ { }; -/* "wx/svg/_nanosvg.pyx":407 +/* "wx/svg/_nanosvg.pyx":424 * * @property * def paths(self): # <<<<<<<<<<<<<< @@ -1102,7 +1110,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ { }; -/* "wx/svg/_nanosvg.pyx":599 +/* "wx/svg/_nanosvg.pyx":616 * * @property * def stops(self): # <<<<<<<<<<<<<< @@ -1148,7 +1156,7 @@ struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase { static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_vtabptr_2wx_3svg_8_nanosvg_SVGimageBase; -/* "wx/svg/_nanosvg.pyx":280 +/* "wx/svg/_nanosvg.pyx":297 * #---------------------------------------------------------------------------- * * cdef class SVGshape: # <<<<<<<<<<<<<< @@ -1162,7 +1170,7 @@ struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGshape { static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGshape *__pyx_vtabptr_2wx_3svg_8_nanosvg_SVGshape; -/* "wx/svg/_nanosvg.pyx":419 +/* "wx/svg/_nanosvg.pyx":436 * * #---------------------------------------------------------------------------- * cdef class SVGpath: # <<<<<<<<<<<<<< @@ -1176,7 +1184,7 @@ struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGpath { static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGpath *__pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpath; -/* "wx/svg/_nanosvg.pyx":505 +/* "wx/svg/_nanosvg.pyx":522 * * #---------------------------------------------------------------------------- * cdef class SVGpaint: # <<<<<<<<<<<<<< @@ -1190,7 +1198,7 @@ struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGpaint { static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGpaint *__pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpaint; -/* "wx/svg/_nanosvg.pyx":557 +/* "wx/svg/_nanosvg.pyx":574 * * #---------------------------------------------------------------------------- * cdef class SVGgradient: # <<<<<<<<<<<<<< @@ -1204,7 +1212,7 @@ struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGgradient { static struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGgradient *__pyx_vtabptr_2wx_3svg_8_nanosvg_SVGgradient; -/* "wx/svg/_nanosvg.pyx":609 +/* "wx/svg/_nanosvg.pyx":626 * * #---------------------------------------------------------------------------- * cdef class SVGgradientStop: # <<<<<<<<<<<<<< @@ -1481,7 +1489,7 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); - Py_SIZE(list) = len+1; + __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); @@ -1595,6 +1603,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); @@ -1626,7 +1637,7 @@ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bas /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); -/* CythonFunction.proto */ +/* CythonFunctionShared.proto */ #define __Pyx_CyFunction_USED 1 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 @@ -1654,6 +1665,7 @@ typedef struct { PyObject *func_classobj; void *defaults; int defaults_pyobjects; + size_t defaults_size; // used by FusedFunction for copying defaults int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; @@ -1662,9 +1674,7 @@ typedef struct { } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) -#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ - __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) -static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, @@ -1680,6 +1690,13 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); +/* CythonFunction.proto */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); @@ -1970,6 +1987,7 @@ static const char __pyx_k_update[] = "update"; static const char __pyx_k_values[] = "values"; static const char __pyx_k_IntEnum[] = "IntEnum"; static const char __pyx_k_SVGpath[] = "SVGpath"; +static const char __pyx_k_do_copy[] = "do_copy"; static const char __pyx_k_members[] = "__members__"; static const char __pyx_k_parents[] = "parents"; static const char __pyx_k_prepare[] = "__prepare__"; @@ -2142,6 +2160,7 @@ static PyObject *__pyx_n_s_color; static PyObject *__pyx_n_s_dct; static PyObject *__pyx_n_s_decode; static PyObject *__pyx_n_s_dict; +static PyObject *__pyx_n_s_do_copy; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_dpi; static PyObject *__pyx_n_s_encode; @@ -2209,7 +2228,7 @@ static PyObject *__pyx_n_s_wx_svg__nanosvg; static int __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase___cinit__(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_v_self); /* proto */ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_filename, PyObject *__pyx_v_units, float __pyx_v_dpi); /* proto */ -static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_buffer, PyObject *__pyx_v_units, float __pyx_v_dpi); /* proto */ +static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_buffer, PyObject *__pyx_v_units, float __pyx_v_dpi, int __pyx_v_do_copy); /* proto */ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_v_self, PyObject *__pyx_v_buf, float __pyx_v_tx, float __pyx_v_ty, float __pyx_v_scale, int __pyx_v_width, int __pyx_v_height, int __pyx_v_stride); /* proto */ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_v_self, float __pyx_v_tx, float __pyx_v_ty, float __pyx_v_scale, int __pyx_v_width, int __pyx_v_height, int __pyx_v_stride); /* proto */ @@ -2507,6 +2526,9 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__check_ptr(struct __p __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_ptr", 0); /* "wx/svg/_nanosvg.pyx":112 @@ -2576,6 +2598,9 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_ptr", 0); if (__pyx_optional_args) { if (__pyx_optional_args->__pyx_n > 0) { @@ -2723,6 +2748,9 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_f_2wx_3svg_8_nano struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ptr", 0); /* "wx/svg/_nanosvg.pyx":128 @@ -2793,6 +2821,9 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_5CreateFromFile(PyOb PyObject *__pyx_v_filename = 0; PyObject *__pyx_v_units = 0; float __pyx_v_dpi; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("CreateFromFile (wrapper)", 0); @@ -2886,6 +2917,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy char const *__pyx_t_4; char const *__pyx_t_5; struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("CreateFromFile", 0); /* "wx/svg/_nanosvg.pyx":144 @@ -3035,29 +3069,35 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy /* "wx/svg/_nanosvg.pyx":153 * * @classmethod - * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96): # <<<<<<<<<<<<<< + * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96, bint do_copy=True): # <<<<<<<<<<<<<< * """ * Loads an SVG image from a bytes object. */ /* Python wrapper */ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_7CreateFromBytes(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes[] = "SVGimageBase.CreateFromBytes(type cls, bytes buffer, str units='px', float dpi=96)\n\n Loads an SVG image from a bytes object.\n\n :param bytes `buffer`: object containing the SVG data\n :param str `units`: One of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'\n :param float `dpi`: controls how the unit conversion is done\n\n :rtype: An instance of ``cls`` (usually a :class:`SVGimage`)\n "; +static char __pyx_doc_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes[] = "SVGimageBase.CreateFromBytes(type cls, bytes buffer, str units='px', float dpi=96, bool do_copy=True)\n\n Loads an SVG image from a bytes object.\n\n :param bytes `buffer`: object containing the SVG data\n :param str `units`: One of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'\n :param float `dpi`: controls how the unit conversion is done\n :param bool `do_copy`: indicates if the given bytes object should be\n copied to avoid in-place modification. This should be set to True\n if the given `buffer` object may ever be reused in any capacity.\n If the given `buffer` will only be used once, and the cost of copying\n it is problematic, then `do_copy` can be set to False.\n\n :rtype: An instance of ``cls`` (usually a :class:`SVGimage`)\n "; static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_7CreateFromBytes(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_buffer = 0; PyObject *__pyx_v_units = 0; float __pyx_v_dpi; + int __pyx_v_do_copy; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("CreateFromBytes (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buffer,&__pyx_n_s_units,&__pyx_n_s_dpi,0}; - PyObject* values[3] = {0,0,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buffer,&__pyx_n_s_units,&__pyx_n_s_dpi,&__pyx_n_s_do_copy,0}; + PyObject* values[4] = {0,0,0,0}; values[1] = ((PyObject*)__pyx_n_s_px); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); @@ -3084,12 +3124,20 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_7CreateFromBytes(PyO PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dpi); if (value) { values[2] = value; kw_args--; } } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_do_copy); + if (value) { values[3] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "CreateFromBytes") < 0)) __PYX_ERR(0, 153, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); @@ -3106,10 +3154,15 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_7CreateFromBytes(PyO } else { __pyx_v_dpi = ((float)96.0); } + if (values[3]) { + __pyx_v_do_copy = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_do_copy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L3_error) + } else { + __pyx_v_do_copy = ((int)1); + } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("CreateFromBytes", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 153, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("CreateFromBytes", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 153, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.CreateFromBytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3117,7 +3170,7 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_7CreateFromBytes(PyO __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), (&PyBytes_Type), 1, "buffer", 1))) __PYX_ERR(0, 153, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_units), (&PyString_Type), 1, "units", 1))) __PYX_ERR(0, 153, __pyx_L1_error) - __pyx_r = __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(((PyTypeObject*)__pyx_v_cls), __pyx_v_buffer, __pyx_v_units, __pyx_v_dpi); + __pyx_r = __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(((PyTypeObject*)__pyx_v_cls), __pyx_v_buffer, __pyx_v_units, __pyx_v_dpi, __pyx_v_do_copy); /* function exit code */ goto __pyx_L0; @@ -3128,43 +3181,83 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_7CreateFromBytes(PyO return __pyx_r; } -static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_buffer, PyObject *__pyx_v_units, float __pyx_v_dpi) { +static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_buffer, PyObject *__pyx_v_units, float __pyx_v_dpi, int __pyx_v_do_copy) { PyObject *__pyx_v_units_b = NULL; struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_v_img = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - char *__pyx_t_2; - char const *__pyx_t_3; - struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr __pyx_t_4; + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char const *__pyx_t_5; + struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("CreateFromBytes", 0); + __Pyx_INCREF(__pyx_v_buffer); - /* "wx/svg/_nanosvg.pyx":163 - * :rtype: An instance of ``cls`` (usually a :class:`SVGimage`) + /* "wx/svg/_nanosvg.pyx":169 * """ + * + * if do_copy: # <<<<<<<<<<<<<< + * # `nsvgParse` will end up modifying the char-array passed to it in-place + * # which will violate the immutability of python `bytes` objects. + */ + __pyx_t_1 = (__pyx_v_do_copy != 0); + if (__pyx_t_1) { + + /* "wx/svg/_nanosvg.pyx":178 + * # get a different byte string we'll copy it via converting to a bytearray + * # and back: + * buffer = bytes(bytearray(buffer)) # <<<<<<<<<<<<<< + * + * units_b = units.encode('utf-8') + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_v_buffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_buffer, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + + /* "wx/svg/_nanosvg.pyx":169 + * """ + * + * if do_copy: # <<<<<<<<<<<<<< + * # `nsvgParse` will end up modifying the char-array passed to it in-place + * # which will violate the immutability of python `bytes` objects. + */ + } + + /* "wx/svg/_nanosvg.pyx":180 + * buffer = bytes(bytearray(buffer)) + * * units_b = units.encode('utf-8') # <<<<<<<<<<<<<< * cdef SVGimageBase img = cls() * img._set_ptr(nsvgParse(buffer, units_b, dpi), */ - __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_units, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_units_b = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_units, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_units_b = __pyx_t_3; + __pyx_t_3 = 0; - /* "wx/svg/_nanosvg.pyx":164 - * """ + /* "wx/svg/_nanosvg.pyx":181 + * * units_b = units.encode('utf-8') * cdef SVGimageBase img = cls() # <<<<<<<<<<<<<< * img._set_ptr(nsvgParse(buffer, units_b, dpi), * 'Unable to parse SVG buffer') */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase))))) __PYX_ERR(0, 164, __pyx_L1_error) - __pyx_v_img = ((struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase))))) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_v_img = ((struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_t_3); + __pyx_t_3 = 0; - /* "wx/svg/_nanosvg.pyx":165 + /* "wx/svg/_nanosvg.pyx":182 * units_b = units.encode('utf-8') * cdef SVGimageBase img = cls() * img._set_ptr(nsvgParse(buffer, units_b, dpi), # <<<<<<<<<<<<<< @@ -3173,17 +3266,17 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyT */ if (unlikely(__pyx_v_buffer == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 165, __pyx_L1_error) + __PYX_ERR(0, 182, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_buffer); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_units_b); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error) - __pyx_t_4.__pyx_n = 1; - __pyx_t_4.errmsg = __pyx_kp_s_Unable_to_parse_SVG_buffer; - __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_img->__pyx_vtab)->_set_ptr(__pyx_v_img, nsvgParse(__pyx_t_2, __pyx_t_3, __pyx_v_dpi), &__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_buffer); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_units_b); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_6.__pyx_n = 1; + __pyx_t_6.errmsg = __pyx_kp_s_Unable_to_parse_SVG_buffer; + __pyx_t_3 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_img->__pyx_vtab)->_set_ptr(__pyx_v_img, nsvgParse(__pyx_t_4, __pyx_t_5, __pyx_v_dpi), &__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "wx/svg/_nanosvg.pyx":167 + /* "wx/svg/_nanosvg.pyx":184 * img._set_ptr(nsvgParse(buffer, units_b, dpi), * 'Unable to parse SVG buffer') * return img # <<<<<<<<<<<<<< @@ -3198,25 +3291,27 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyT /* "wx/svg/_nanosvg.pyx":153 * * @classmethod - * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96): # <<<<<<<<<<<<<< + * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96, bint do_copy=True): # <<<<<<<<<<<<<< * """ * Loads an SVG image from a bytes object. */ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.CreateFromBytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_units_b); __Pyx_XDECREF((PyObject *)__pyx_v_img); + __Pyx_XDECREF(__pyx_v_buffer); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":170 +/* "wx/svg/_nanosvg.pyx":187 * * * def __repr__(self) -> str: # <<<<<<<<<<<<<< @@ -3248,9 +3343,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "wx/svg/_nanosvg.pyx":171 + /* "wx/svg/_nanosvg.pyx":188 * * def __repr__(self) -> str: * if self._ptr: # <<<<<<<<<<<<<< @@ -3260,7 +3358,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p __pyx_t_1 = (__pyx_v_self->_ptr != 0); if (__pyx_t_1) { - /* "wx/svg/_nanosvg.pyx":172 + /* "wx/svg/_nanosvg.pyx":189 * def __repr__(self) -> str: * if self._ptr: * return "SVGimageBase: size ({}, {})".format(self.width, self.height) # <<<<<<<<<<<<<< @@ -3268,11 +3366,11 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p * return "SVGimageBase: " */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_SVGimageBase_size, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_SVGimageBase_size, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -3289,7 +3387,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -3299,7 +3397,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -3307,7 +3405,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -3318,7 +3416,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -3327,7 +3425,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p __pyx_t_2 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":171 + /* "wx/svg/_nanosvg.pyx":188 * * def __repr__(self) -> str: * if self._ptr: # <<<<<<<<<<<<<< @@ -3336,7 +3434,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p */ } - /* "wx/svg/_nanosvg.pyx":174 + /* "wx/svg/_nanosvg.pyx":191 * return "SVGimageBase: size ({}, {})".format(self.width, self.height) * else: * return "SVGimageBase: " # <<<<<<<<<<<<<< @@ -3350,7 +3448,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p goto __pyx_L0; } - /* "wx/svg/_nanosvg.pyx":170 + /* "wx/svg/_nanosvg.pyx":187 * * * def __repr__(self) -> str: # <<<<<<<<<<<<<< @@ -3374,7 +3472,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":177 +/* "wx/svg/_nanosvg.pyx":194 * * * def RasterizeToBuffer(self, object buf, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< @@ -3393,6 +3491,9 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_11RasterizeToBuffer( int __pyx_v_width; int __pyx_v_height; int __pyx_v_stride; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("RasterizeToBuffer (wrapper)", 0); @@ -3463,7 +3564,7 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_11RasterizeToBuffer( } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "RasterizeToBuffer") < 0)) __PYX_ERR(0, 177, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "RasterizeToBuffer") < 0)) __PYX_ERR(0, 194, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3486,39 +3587,39 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_11RasterizeToBuffer( } __pyx_v_buf = values[0]; if (values[1]) { - __pyx_v_tx = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_tx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L3_error) + __pyx_v_tx = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_tx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error) } else { __pyx_v_tx = ((float)0.0); } if (values[2]) { - __pyx_v_ty = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_ty == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L3_error) + __pyx_v_ty = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_ty == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error) } else { __pyx_v_ty = ((float)0.0); } if (values[3]) { - __pyx_v_scale = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_scale == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __pyx_L3_error) + __pyx_v_scale = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_scale == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L3_error) } else { __pyx_v_scale = ((float)1.0); } if (values[4]) { - __pyx_v_width = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error) + __pyx_v_width = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L3_error) } else { __pyx_v_width = ((int)-1); } if (values[5]) { - __pyx_v_height = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error) + __pyx_v_height = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L3_error) } else { __pyx_v_height = ((int)-1); } if (values[6]) { - __pyx_v_stride = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_stride == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error) + __pyx_v_stride = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_stride == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L3_error) } else { __pyx_v_stride = ((int)-1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("RasterizeToBuffer", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 177, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("RasterizeToBuffer", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 194, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.RasterizeToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3538,20 +3639,23 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("RasterizeToBuffer", 0); - /* "wx/svg/_nanosvg.pyx":194 + /* "wx/svg/_nanosvg.pyx":211 * :param int `stride`: number of bytes per scan line in the destination buffer, typically ``width * 4`` * """ * self._check_ptr() # <<<<<<<<<<<<<< * if self._rasterizer == NULL: * self._rasterizer = nsvgCreateRasterizer() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":195 + /* "wx/svg/_nanosvg.pyx":212 * """ * self._check_ptr() * if self._rasterizer == NULL: # <<<<<<<<<<<<<< @@ -3561,7 +3665,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( __pyx_t_2 = ((__pyx_v_self->_rasterizer == NULL) != 0); if (__pyx_t_2) { - /* "wx/svg/_nanosvg.pyx":196 + /* "wx/svg/_nanosvg.pyx":213 * self._check_ptr() * if self._rasterizer == NULL: * self._rasterizer = nsvgCreateRasterizer() # <<<<<<<<<<<<<< @@ -3570,7 +3674,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ __pyx_v_self->_rasterizer = nsvgCreateRasterizer(); - /* "wx/svg/_nanosvg.pyx":195 + /* "wx/svg/_nanosvg.pyx":212 * """ * self._check_ptr() * if self._rasterizer == NULL: # <<<<<<<<<<<<<< @@ -3579,7 +3683,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":198 + /* "wx/svg/_nanosvg.pyx":215 * self._rasterizer = nsvgCreateRasterizer() * * if width == -1: # <<<<<<<<<<<<<< @@ -3589,20 +3693,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( __pyx_t_2 = ((__pyx_v_width == -1L) != 0); if (__pyx_t_2) { - /* "wx/svg/_nanosvg.pyx":199 + /* "wx/svg/_nanosvg.pyx":216 * * if width == -1: * width = self.width # <<<<<<<<<<<<<< * if height == -1: * height = self.height */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_width = __pyx_t_3; - /* "wx/svg/_nanosvg.pyx":198 + /* "wx/svg/_nanosvg.pyx":215 * self._rasterizer = nsvgCreateRasterizer() * * if width == -1: # <<<<<<<<<<<<<< @@ -3611,7 +3715,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":200 + /* "wx/svg/_nanosvg.pyx":217 * if width == -1: * width = self.width * if height == -1: # <<<<<<<<<<<<<< @@ -3621,20 +3725,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( __pyx_t_2 = ((__pyx_v_height == -1L) != 0); if (__pyx_t_2) { - /* "wx/svg/_nanosvg.pyx":201 + /* "wx/svg/_nanosvg.pyx":218 * width = self.width * if height == -1: * height = self.height # <<<<<<<<<<<<<< * if stride == -1: * stride = width * 4; */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_height = __pyx_t_3; - /* "wx/svg/_nanosvg.pyx":200 + /* "wx/svg/_nanosvg.pyx":217 * if width == -1: * width = self.width * if height == -1: # <<<<<<<<<<<<<< @@ -3643,7 +3747,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":202 + /* "wx/svg/_nanosvg.pyx":219 * if height == -1: * height = self.height * if stride == -1: # <<<<<<<<<<<<<< @@ -3653,7 +3757,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( __pyx_t_2 = ((__pyx_v_stride == -1L) != 0); if (__pyx_t_2) { - /* "wx/svg/_nanosvg.pyx":203 + /* "wx/svg/_nanosvg.pyx":220 * height = self.height * if stride == -1: * stride = width * 4; # <<<<<<<<<<<<<< @@ -3662,7 +3766,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ __pyx_v_stride = (__pyx_v_width * 4); - /* "wx/svg/_nanosvg.pyx":202 + /* "wx/svg/_nanosvg.pyx":219 * if height == -1: * height = self.height * if stride == -1: # <<<<<<<<<<<<<< @@ -3671,7 +3775,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":205 + /* "wx/svg/_nanosvg.pyx":222 * stride = width * 4; * * if not PyObject_CheckBuffer(buf): # <<<<<<<<<<<<<< @@ -3681,20 +3785,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( __pyx_t_2 = ((!(PyObject_CheckBuffer(__pyx_v_buf) != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "wx/svg/_nanosvg.pyx":206 + /* "wx/svg/_nanosvg.pyx":223 * * if not PyObject_CheckBuffer(buf): * raise ValueError("Object does not support the python buffer protocol") # <<<<<<<<<<<<<< * * cdef Py_buffer view */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 206, __pyx_L1_error) + __PYX_ERR(0, 223, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":205 + /* "wx/svg/_nanosvg.pyx":222 * stride = width * 4; * * if not PyObject_CheckBuffer(buf): # <<<<<<<<<<<<<< @@ -3703,31 +3807,31 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":209 + /* "wx/svg/_nanosvg.pyx":226 * * cdef Py_buffer view * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: # <<<<<<<<<<<<<< * raise ValueError("PyObject_GetBuffer failed") * if view.len < height * stride: */ - __pyx_t_3 = PyObject_GetBuffer(__pyx_v_buf, (&__pyx_v_view), PyBUF_SIMPLE); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_3 = PyObject_GetBuffer(__pyx_v_buf, (&__pyx_v_view), PyBUF_SIMPLE); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 226, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_3 != 0) != 0); if (unlikely(__pyx_t_2)) { - /* "wx/svg/_nanosvg.pyx":210 + /* "wx/svg/_nanosvg.pyx":227 * cdef Py_buffer view * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: * raise ValueError("PyObject_GetBuffer failed") # <<<<<<<<<<<<<< * if view.len < height * stride: * PyBuffer_Release(&view) */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 210, __pyx_L1_error) + __PYX_ERR(0, 227, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":209 + /* "wx/svg/_nanosvg.pyx":226 * * cdef Py_buffer view * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: # <<<<<<<<<<<<<< @@ -3736,7 +3840,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":211 + /* "wx/svg/_nanosvg.pyx":228 * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: * raise ValueError("PyObject_GetBuffer failed") * if view.len < height * stride: # <<<<<<<<<<<<<< @@ -3746,7 +3850,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( __pyx_t_2 = ((__pyx_v_view.len < (__pyx_v_height * __pyx_v_stride)) != 0); if (unlikely(__pyx_t_2)) { - /* "wx/svg/_nanosvg.pyx":212 + /* "wx/svg/_nanosvg.pyx":229 * raise ValueError("PyObject_GetBuffer failed") * if view.len < height * stride: * PyBuffer_Release(&view) # <<<<<<<<<<<<<< @@ -3755,20 +3859,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ PyBuffer_Release((&__pyx_v_view)); - /* "wx/svg/_nanosvg.pyx":213 + /* "wx/svg/_nanosvg.pyx":230 * if view.len < height * stride: * PyBuffer_Release(&view) * raise ValueError("Buffer object is smaller than height * stride") # <<<<<<<<<<<<<< * * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, view.buf, */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 213, __pyx_L1_error) + __PYX_ERR(0, 230, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":211 + /* "wx/svg/_nanosvg.pyx":228 * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: * raise ValueError("PyObject_GetBuffer failed") * if view.len < height * stride: # <<<<<<<<<<<<<< @@ -3777,7 +3881,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":215 + /* "wx/svg/_nanosvg.pyx":232 * raise ValueError("Buffer object is smaller than height * stride") * * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, view.buf, # <<<<<<<<<<<<<< @@ -3786,7 +3890,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ nsvgRasterize(__pyx_v_self->_rasterizer, __pyx_v_self->_ptr, __pyx_v_tx, __pyx_v_ty, __pyx_v_scale, ((unsigned char *)__pyx_v_view.buf), __pyx_v_width, __pyx_v_height, __pyx_v_stride); - /* "wx/svg/_nanosvg.pyx":217 + /* "wx/svg/_nanosvg.pyx":234 * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, view.buf, * width, height, stride) * PyBuffer_Release(&view) # <<<<<<<<<<<<<< @@ -3795,7 +3899,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ PyBuffer_Release((&__pyx_v_view)); - /* "wx/svg/_nanosvg.pyx":177 + /* "wx/svg/_nanosvg.pyx":194 * * * def RasterizeToBuffer(self, object buf, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< @@ -3816,7 +3920,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":220 +/* "wx/svg/_nanosvg.pyx":237 * * * def Rasterize(self, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< @@ -3834,6 +3938,9 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_13Rasterize(PyObject int __pyx_v_width; int __pyx_v_height; int __pyx_v_stride; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("Rasterize (wrapper)", 0); @@ -3898,7 +4005,7 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_13Rasterize(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Rasterize") < 0)) __PYX_ERR(0, 220, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Rasterize") < 0)) __PYX_ERR(0, 237, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3919,39 +4026,39 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_13Rasterize(PyObject } } if (values[0]) { - __pyx_v_tx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_tx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L3_error) + __pyx_v_tx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_tx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L3_error) } else { __pyx_v_tx = ((float)0.0); } if (values[1]) { - __pyx_v_ty = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_ty == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L3_error) + __pyx_v_ty = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_ty == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L3_error) } else { __pyx_v_ty = ((float)0.0); } if (values[2]) { - __pyx_v_scale = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_scale == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L3_error) + __pyx_v_scale = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_scale == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L3_error) } else { __pyx_v_scale = ((float)1.0); } if (values[3]) { - __pyx_v_width = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 221, __pyx_L3_error) + __pyx_v_width = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L3_error) } else { __pyx_v_width = ((int)-1); } if (values[4]) { - __pyx_v_height = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 221, __pyx_L3_error) + __pyx_v_height = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L3_error) } else { __pyx_v_height = ((int)-1); } if (values[5]) { - __pyx_v_stride = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_stride == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 221, __pyx_L3_error) + __pyx_v_stride = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_stride == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 238, __pyx_L3_error) } else { __pyx_v_stride = ((int)-1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("Rasterize", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 220, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("Rasterize", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 237, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.Rasterize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3973,20 +4080,23 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ int __pyx_t_3; PyObject *__pyx_t_4 = NULL; unsigned char *__pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("Rasterize", 0); - /* "wx/svg/_nanosvg.pyx":234 + /* "wx/svg/_nanosvg.pyx":251 * :returns: A bytearray object containing the raw RGBA pixel color values * """ * self._check_ptr() # <<<<<<<<<<<<<< * if self._rasterizer == NULL: * self._rasterizer = nsvgCreateRasterizer() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":235 + /* "wx/svg/_nanosvg.pyx":252 * """ * self._check_ptr() * if self._rasterizer == NULL: # <<<<<<<<<<<<<< @@ -3996,7 +4106,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ __pyx_t_2 = ((__pyx_v_self->_rasterizer == NULL) != 0); if (__pyx_t_2) { - /* "wx/svg/_nanosvg.pyx":236 + /* "wx/svg/_nanosvg.pyx":253 * self._check_ptr() * if self._rasterizer == NULL: * self._rasterizer = nsvgCreateRasterizer() # <<<<<<<<<<<<<< @@ -4005,7 +4115,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ __pyx_v_self->_rasterizer = nsvgCreateRasterizer(); - /* "wx/svg/_nanosvg.pyx":235 + /* "wx/svg/_nanosvg.pyx":252 * """ * self._check_ptr() * if self._rasterizer == NULL: # <<<<<<<<<<<<<< @@ -4014,7 +4124,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ } - /* "wx/svg/_nanosvg.pyx":238 + /* "wx/svg/_nanosvg.pyx":255 * self._rasterizer = nsvgCreateRasterizer() * * if width == -1: # <<<<<<<<<<<<<< @@ -4024,20 +4134,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ __pyx_t_2 = ((__pyx_v_width == -1L) != 0); if (__pyx_t_2) { - /* "wx/svg/_nanosvg.pyx":239 + /* "wx/svg/_nanosvg.pyx":256 * * if width == -1: * width = self.width # <<<<<<<<<<<<<< * if height == -1: * height = self.height */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_width = __pyx_t_3; - /* "wx/svg/_nanosvg.pyx":238 + /* "wx/svg/_nanosvg.pyx":255 * self._rasterizer = nsvgCreateRasterizer() * * if width == -1: # <<<<<<<<<<<<<< @@ -4046,7 +4156,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ } - /* "wx/svg/_nanosvg.pyx":240 + /* "wx/svg/_nanosvg.pyx":257 * if width == -1: * width = self.width * if height == -1: # <<<<<<<<<<<<<< @@ -4056,20 +4166,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ __pyx_t_2 = ((__pyx_v_height == -1L) != 0); if (__pyx_t_2) { - /* "wx/svg/_nanosvg.pyx":241 + /* "wx/svg/_nanosvg.pyx":258 * width = self.width * if height == -1: * height = self.height # <<<<<<<<<<<<<< * if stride == -1: * stride = width * 4; */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_height = __pyx_t_3; - /* "wx/svg/_nanosvg.pyx":240 + /* "wx/svg/_nanosvg.pyx":257 * if width == -1: * width = self.width * if height == -1: # <<<<<<<<<<<<<< @@ -4078,7 +4188,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ } - /* "wx/svg/_nanosvg.pyx":242 + /* "wx/svg/_nanosvg.pyx":259 * if height == -1: * height = self.height * if stride == -1: # <<<<<<<<<<<<<< @@ -4088,7 +4198,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ __pyx_t_2 = ((__pyx_v_stride == -1L) != 0); if (__pyx_t_2) { - /* "wx/svg/_nanosvg.pyx":243 + /* "wx/svg/_nanosvg.pyx":260 * height = self.height * if stride == -1: * stride = width * 4; # <<<<<<<<<<<<<< @@ -4097,7 +4207,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ __pyx_v_stride = (__pyx_v_width * 4); - /* "wx/svg/_nanosvg.pyx":242 + /* "wx/svg/_nanosvg.pyx":259 * if height == -1: * height = self.height * if stride == -1: # <<<<<<<<<<<<<< @@ -4106,34 +4216,34 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ } - /* "wx/svg/_nanosvg.pyx":245 + /* "wx/svg/_nanosvg.pyx":262 * stride = width * 4; * * buf = bytes(bytearray(height * stride)) # <<<<<<<<<<<<<< * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, * width, height, stride) */ - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_height * __pyx_v_stride)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_height * __pyx_v_stride)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_buf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":246 + /* "wx/svg/_nanosvg.pyx":263 * * buf = bytes(bytearray(height * stride)) * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, # <<<<<<<<<<<<<< * width, height, stride) * return buf */ - __pyx_t_5 = __Pyx_PyBytes_AsWritableUString(__pyx_v_buf); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableUString(__pyx_v_buf); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 263, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":247 + /* "wx/svg/_nanosvg.pyx":264 * buf = bytes(bytearray(height * stride)) * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, * width, height, stride) # <<<<<<<<<<<<<< @@ -4142,7 +4252,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ nsvgRasterize(__pyx_v_self->_rasterizer, __pyx_v_self->_ptr, __pyx_v_tx, __pyx_v_ty, __pyx_v_scale, __pyx_t_5, __pyx_v_width, __pyx_v_height, __pyx_v_stride); - /* "wx/svg/_nanosvg.pyx":248 + /* "wx/svg/_nanosvg.pyx":265 * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, * width, height, stride) * return buf # <<<<<<<<<<<<<< @@ -4154,7 +4264,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ __pyx_r = __pyx_v_buf; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":220 + /* "wx/svg/_nanosvg.pyx":237 * * * def Rasterize(self, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< @@ -4175,7 +4285,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":251 +/* "wx/svg/_nanosvg.pyx":268 * * @property * def width(self) -> float: # <<<<<<<<<<<<<< @@ -4200,20 +4310,23 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_5width___get__(struc PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":255 + /* "wx/svg/_nanosvg.pyx":272 * Returns the width of the SVG image * """ * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.width * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":256 + /* "wx/svg/_nanosvg.pyx":273 * """ * self._check_ptr() * return self._ptr.width # <<<<<<<<<<<<<< @@ -4221,13 +4334,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_5width___get__(struc * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":251 + /* "wx/svg/_nanosvg.pyx":268 * * @property * def width(self) -> float: # <<<<<<<<<<<<<< @@ -4246,7 +4359,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_5width___get__(struc return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":259 +/* "wx/svg/_nanosvg.pyx":276 * * @property * def height(self) -> float: # <<<<<<<<<<<<<< @@ -4271,20 +4384,23 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6height___get__(stru PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":263 + /* "wx/svg/_nanosvg.pyx":280 * Returns the height of the SVG image * """ * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.height * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":264 + /* "wx/svg/_nanosvg.pyx":281 * """ * self._check_ptr() * return self._ptr.height # <<<<<<<<<<<<<< @@ -4292,13 +4408,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6height___get__(stru * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":259 + /* "wx/svg/_nanosvg.pyx":276 * * @property * def height(self) -> float: # <<<<<<<<<<<<<< @@ -4318,7 +4434,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6height___get__(stru } static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "wx/svg/_nanosvg.pyx":267 +/* "wx/svg/_nanosvg.pyx":284 * * @property * def shapes(self): # <<<<<<<<<<<<<< @@ -4343,12 +4459,15 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes___get__(stru struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __pyx_cur_scope = (struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ *)__pyx_tp_new_2wx_3svg_8_nanosvg___pyx_scope_struct____get__(__pyx_ptype_2wx_3svg_8_nanosvg___pyx_scope_struct____get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 267, __pyx_L1_error) + __PYX_ERR(0, 284, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -4356,7 +4475,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes___get__(stru __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get, __pyx_n_s_SVGimageBase___get, __pyx_n_s_wx_svg__nanosvg); if (unlikely(!gen)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get, __pyx_n_s_SVGimageBase___get, __pyx_n_s_wx_svg__nanosvg); if (unlikely(!gen)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4379,6 +4498,9 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator(_ PyObject *__pyx_t_1 = NULL; NSVGshape *__pyx_t_2; int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("shapes", 0); switch (__pyx_generator->resume_label) { @@ -4389,20 +4511,20 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator(_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 267, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 284, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":271 + /* "wx/svg/_nanosvg.pyx":288 * A generator that iterates over the :class:`SVGshape` objects that comprise the SVG image * """ * self._check_ptr() # <<<<<<<<<<<<<< * cdef NSVGshape *shape = self._ptr.shapes * while shape != NULL: */ - __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_check_ptr(__pyx_cur_scope->__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":272 + /* "wx/svg/_nanosvg.pyx":289 * """ * self._check_ptr() * cdef NSVGshape *shape = self._ptr.shapes # <<<<<<<<<<<<<< @@ -4412,7 +4534,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator(_ __pyx_t_2 = __pyx_cur_scope->__pyx_v_self->_ptr->shapes; __pyx_cur_scope->__pyx_v_shape = __pyx_t_2; - /* "wx/svg/_nanosvg.pyx":273 + /* "wx/svg/_nanosvg.pyx":290 * self._check_ptr() * cdef NSVGshape *shape = self._ptr.shapes * while shape != NULL: # <<<<<<<<<<<<<< @@ -4423,14 +4545,14 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator(_ __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_shape != NULL) != 0); if (!__pyx_t_3) break; - /* "wx/svg/_nanosvg.pyx":274 + /* "wx/svg/_nanosvg.pyx":291 * cdef NSVGshape *shape = self._ptr.shapes * while shape != NULL: * yield SVGshape.from_ptr(shape) # <<<<<<<<<<<<<< * shape = shape.next * */ - __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_8SVGshape_from_ptr(__pyx_cur_scope->__pyx_v_shape)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_8SVGshape_from_ptr(__pyx_cur_scope->__pyx_v_shape)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -4441,9 +4563,9 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator(_ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 274, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 291, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":275 + /* "wx/svg/_nanosvg.pyx":292 * while shape != NULL: * yield SVGshape.from_ptr(shape) * shape = shape.next # <<<<<<<<<<<<<< @@ -4455,7 +4577,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator(_ } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "wx/svg/_nanosvg.pyx":267 + /* "wx/svg/_nanosvg.pyx":284 * * @property * def shapes(self): # <<<<<<<<<<<<<< @@ -4504,6 +4626,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_14__reduce_cython__( PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -4559,6 +4684,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_16__setstate_cython_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -4589,7 +4717,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_16__setstate_cython_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":288 +/* "wx/svg/_nanosvg.pyx":305 * cdef NSVGshape *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -4618,7 +4746,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGshape___cinit__(struct __pyx_obj_2wx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "wx/svg/_nanosvg.pyx":289 + /* "wx/svg/_nanosvg.pyx":306 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -4627,7 +4755,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGshape___cinit__(struct __pyx_obj_2wx_ */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":288 + /* "wx/svg/_nanosvg.pyx":305 * cdef NSVGshape *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -4641,7 +4769,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGshape___cinit__(struct __pyx_obj_2wx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":291 +/* "wx/svg/_nanosvg.pyx":308 * self._ptr = NULL * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -4668,9 +4796,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":292 + /* "wx/svg/_nanosvg.pyx":309 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -4680,20 +4811,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ __pyx_t_1 = ((__pyx_v_self->_ptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "wx/svg/_nanosvg.pyx":293 + /* "wx/svg/_nanosvg.pyx":310 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGshape") # <<<<<<<<<<<<<< * * @staticmethod */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 293, __pyx_L1_error) + __PYX_ERR(0, 310, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":292 + /* "wx/svg/_nanosvg.pyx":309 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -4702,7 +4833,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ */ } - /* "wx/svg/_nanosvg.pyx":291 + /* "wx/svg/_nanosvg.pyx":308 * self._ptr = NULL * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -4723,7 +4854,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":296 +/* "wx/svg/_nanosvg.pyx":313 * * @staticmethod * cdef SVGshape from_ptr(NSVGshape *ptr): # <<<<<<<<<<<<<< @@ -4736,21 +4867,24 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *__pyx_f_2wx_3svg_8_nanosvg_ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":297 + /* "wx/svg/_nanosvg.pyx":314 * @staticmethod * cdef SVGshape from_ptr(NSVGshape *ptr): * obj = SVGshape() # <<<<<<<<<<<<<< * obj._ptr = ptr * return obj */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGshape)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGshape)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_obj = ((struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *)__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":298 + /* "wx/svg/_nanosvg.pyx":315 * cdef SVGshape from_ptr(NSVGshape *ptr): * obj = SVGshape() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -4759,7 +4893,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *__pyx_f_2wx_3svg_8_nanosvg_ */ __pyx_v_obj->_ptr = __pyx_v_ptr; - /* "wx/svg/_nanosvg.pyx":299 + /* "wx/svg/_nanosvg.pyx":316 * obj = SVGshape() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -4771,7 +4905,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *__pyx_f_2wx_3svg_8_nanosvg_ __pyx_r = __pyx_v_obj; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":296 + /* "wx/svg/_nanosvg.pyx":313 * * @staticmethod * cdef SVGshape from_ptr(NSVGshape *ptr): # <<<<<<<<<<<<<< @@ -4791,7 +4925,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *__pyx_f_2wx_3svg_8_nanosvg_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":301 +/* "wx/svg/_nanosvg.pyx":318 * return obj * * def __repr__(self): # <<<<<<<<<<<<<< @@ -4823,9 +4957,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "wx/svg/_nanosvg.pyx":302 + /* "wx/svg/_nanosvg.pyx":319 * * def __repr__(self): * if self._ptr: # <<<<<<<<<<<<<< @@ -4835,7 +4972,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob __pyx_t_1 = (__pyx_v_self->_ptr != 0); if (__pyx_t_1) { - /* "wx/svg/_nanosvg.pyx":303 + /* "wx/svg/_nanosvg.pyx":320 * def __repr__(self): * if self._ptr: * return "SVGshape: id:{} bounds:{}".format(self.id.decode('utf-8'), self.bounds) # <<<<<<<<<<<<<< @@ -4843,11 +4980,11 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob * return "SVGshape: " */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_SVGshape_id_bounds, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_SVGshape_id_bounds, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -4862,10 +4999,10 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob } __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_s_utf_8); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bounds); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bounds); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -4882,7 +5019,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4892,7 +5029,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4900,7 +5037,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -4911,7 +5048,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_6 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -4920,7 +5057,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob __pyx_t_2 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":302 + /* "wx/svg/_nanosvg.pyx":319 * * def __repr__(self): * if self._ptr: # <<<<<<<<<<<<<< @@ -4929,7 +5066,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob */ } - /* "wx/svg/_nanosvg.pyx":305 + /* "wx/svg/_nanosvg.pyx":322 * return "SVGshape: id:{} bounds:{}".format(self.id.decode('utf-8'), self.bounds) * else: * return "SVGshape: " # <<<<<<<<<<<<<< @@ -4943,7 +5080,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob goto __pyx_L0; } - /* "wx/svg/_nanosvg.pyx":301 + /* "wx/svg/_nanosvg.pyx":318 * return obj * * def __repr__(self): # <<<<<<<<<<<<<< @@ -4967,7 +5104,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":308 +/* "wx/svg/_nanosvg.pyx":325 * * @property * def id(self): # <<<<<<<<<<<<<< @@ -4994,16 +5131,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2id___get__(struct __pyx_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":310 + /* "wx/svg/_nanosvg.pyx":327 * def id(self): * """Optional 'id' attr of the shape or its group""" * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.id * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5017,12 +5157,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2id___get__(struct __pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":311 + /* "wx/svg/_nanosvg.pyx":328 * """Optional 'id' attr of the shape or its group""" * self._check_ptr() * return self._ptr.id # <<<<<<<<<<<<<< @@ -5030,13 +5170,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2id___get__(struct __pyx_ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->_ptr->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->_ptr->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":308 + /* "wx/svg/_nanosvg.pyx":325 * * @property * def id(self): # <<<<<<<<<<<<<< @@ -5057,7 +5197,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2id___get__(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":314 +/* "wx/svg/_nanosvg.pyx":331 * * @property * def fill(self) -> SVGpaint: # <<<<<<<<<<<<<< @@ -5084,16 +5224,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4fill___get__(struct __py PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":316 + /* "wx/svg/_nanosvg.pyx":333 * def fill(self) -> SVGpaint: * """:class:`SVGpaint` for the fill""" * self._check_ptr() # <<<<<<<<<<<<<< * return SVGpaint.from_ptr(&self._ptr.fill) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5107,12 +5250,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4fill___get__(struct __py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":317 + /* "wx/svg/_nanosvg.pyx":334 * """:class:`SVGpaint` for the fill""" * self._check_ptr() * return SVGpaint.from_ptr(&self._ptr.fill) # <<<<<<<<<<<<<< @@ -5120,13 +5263,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4fill___get__(struct __py * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_8SVGpaint_from_ptr((&__pyx_v_self->_ptr->fill))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_8SVGpaint_from_ptr((&__pyx_v_self->_ptr->fill))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":314 + /* "wx/svg/_nanosvg.pyx":331 * * @property * def fill(self) -> SVGpaint: # <<<<<<<<<<<<<< @@ -5147,7 +5290,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4fill___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":320 +/* "wx/svg/_nanosvg.pyx":337 * * @property * def stroke(self) -> SVGpaint: # <<<<<<<<<<<<<< @@ -5174,16 +5317,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6stroke___get__(struct __ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":322 + /* "wx/svg/_nanosvg.pyx":339 * def stroke(self) -> SVGpaint: * """:class:`SVGpaint` for the stroke""" * self._check_ptr() # <<<<<<<<<<<<<< * return SVGpaint.from_ptr(&self._ptr.stroke) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5197,12 +5343,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6stroke___get__(struct __ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":323 + /* "wx/svg/_nanosvg.pyx":340 * """:class:`SVGpaint` for the stroke""" * self._check_ptr() * return SVGpaint.from_ptr(&self._ptr.stroke) # <<<<<<<<<<<<<< @@ -5210,13 +5356,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6stroke___get__(struct __ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_8SVGpaint_from_ptr((&__pyx_v_self->_ptr->stroke))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_8SVGpaint_from_ptr((&__pyx_v_self->_ptr->stroke))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":320 + /* "wx/svg/_nanosvg.pyx":337 * * @property * def stroke(self) -> SVGpaint: # <<<<<<<<<<<<<< @@ -5237,7 +5383,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6stroke___get__(struct __ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":326 +/* "wx/svg/_nanosvg.pyx":343 * * @property * def opacity(self) -> float: # <<<<<<<<<<<<<< @@ -5264,16 +5410,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_7opacity___get__(struct _ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":328 + /* "wx/svg/_nanosvg.pyx":345 * def opacity(self) -> float: * """Opacity of the shape""" * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.opacity * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5287,12 +5436,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_7opacity___get__(struct _ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":329 + /* "wx/svg/_nanosvg.pyx":346 * """Opacity of the shape""" * self._check_ptr() * return self._ptr.opacity # <<<<<<<<<<<<<< @@ -5300,13 +5449,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_7opacity___get__(struct _ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->opacity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->opacity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":326 + /* "wx/svg/_nanosvg.pyx":343 * * @property * def opacity(self) -> float: # <<<<<<<<<<<<<< @@ -5327,7 +5476,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_7opacity___get__(struct _ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":332 +/* "wx/svg/_nanosvg.pyx":349 * * @property * def strokeWidth(self) -> float: # <<<<<<<<<<<<<< @@ -5354,16 +5503,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_11strokeWidth___get__(str PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":334 + /* "wx/svg/_nanosvg.pyx":351 * def strokeWidth(self) -> float: * """Stroke width (scaled)""" * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.strokeWidth * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5377,12 +5529,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_11strokeWidth___get__(str } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":335 + /* "wx/svg/_nanosvg.pyx":352 * """Stroke width (scaled)""" * self._check_ptr() * return self._ptr.strokeWidth # <<<<<<<<<<<<<< @@ -5390,13 +5542,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_11strokeWidth___get__(str * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->strokeWidth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->strokeWidth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":332 + /* "wx/svg/_nanosvg.pyx":349 * * @property * def strokeWidth(self) -> float: # <<<<<<<<<<<<<< @@ -5417,7 +5569,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_11strokeWidth___get__(str return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":338 +/* "wx/svg/_nanosvg.pyx":355 * * @property * def strokeDashOffset(self) -> float: # <<<<<<<<<<<<<< @@ -5444,16 +5596,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_16strokeDashOffset___get_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":340 + /* "wx/svg/_nanosvg.pyx":357 * def strokeDashOffset(self) -> float: * """Stroke dash offset (scaled)""" * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.strokeDashOffset * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5467,12 +5622,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_16strokeDashOffset___get_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":341 + /* "wx/svg/_nanosvg.pyx":358 * """Stroke dash offset (scaled)""" * self._check_ptr() * return self._ptr.strokeDashOffset # <<<<<<<<<<<<<< @@ -5480,13 +5635,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_16strokeDashOffset___get_ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->strokeDashOffset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->strokeDashOffset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":338 + /* "wx/svg/_nanosvg.pyx":355 * * @property * def strokeDashOffset(self) -> float: # <<<<<<<<<<<<<< @@ -5507,7 +5662,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_16strokeDashOffset___get_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":344 +/* "wx/svg/_nanosvg.pyx":361 * * @property * def strokeDashArray(self) -> list: # <<<<<<<<<<<<<< @@ -5538,16 +5693,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_15strokeDashArray___get__ char __pyx_t_4; char __pyx_t_5; char __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":346 + /* "wx/svg/_nanosvg.pyx":363 * def strokeDashArray(self) -> list: * """Stroke dash array (scaled)""" * self._check_ptr() # <<<<<<<<<<<<<< * return [self._ptr.strokeDashArray[i] * for i in range(self._ptr.strokeDashCount)] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5561,12 +5719,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_15strokeDashArray___get__ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":347 + /* "wx/svg/_nanosvg.pyx":364 * """Stroke dash array (scaled)""" * self._check_ptr() * return [self._ptr.strokeDashArray[i] # <<<<<<<<<<<<<< @@ -5574,10 +5732,10 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_15strokeDashArray___get__ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "wx/svg/_nanosvg.pyx":348 + /* "wx/svg/_nanosvg.pyx":365 * self._check_ptr() * return [self._ptr.strokeDashArray[i] * for i in range(self._ptr.strokeDashCount)] # <<<<<<<<<<<<<< @@ -5589,23 +5747,23 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_15strokeDashArray___get__ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "wx/svg/_nanosvg.pyx":347 + /* "wx/svg/_nanosvg.pyx":364 * """Stroke dash array (scaled)""" * self._check_ptr() * return [self._ptr.strokeDashArray[i] # <<<<<<<<<<<<<< * for i in range(self._ptr.strokeDashCount)] * */ - __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->strokeDashArray[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->strokeDashArray[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 347, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":344 + /* "wx/svg/_nanosvg.pyx":361 * * @property * def strokeDashArray(self) -> list: # <<<<<<<<<<<<<< @@ -5626,7 +5784,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_15strokeDashArray___get__ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":351 +/* "wx/svg/_nanosvg.pyx":368 * * @property * def strokeLineJoin(self) -> SVGlineJoin: # <<<<<<<<<<<<<< @@ -5654,16 +5812,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_14strokeLineJoin___get__( PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":353 + /* "wx/svg/_nanosvg.pyx":370 * def strokeLineJoin(self) -> SVGlineJoin: * """Stroke join type""" * self._check_ptr() # <<<<<<<<<<<<<< * return SVGlineJoin(self._ptr.strokeLineJoin) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5677,12 +5838,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_14strokeLineJoin___get__( } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":354 + /* "wx/svg/_nanosvg.pyx":371 * """Stroke join type""" * self._check_ptr() * return SVGlineJoin(self._ptr.strokeLineJoin) # <<<<<<<<<<<<<< @@ -5690,9 +5851,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_14strokeLineJoin___get__( * @property */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->strokeLineJoin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->strokeLineJoin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -5707,14 +5868,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_14strokeLineJoin___get__( __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":351 + /* "wx/svg/_nanosvg.pyx":368 * * @property * def strokeLineJoin(self) -> SVGlineJoin: # <<<<<<<<<<<<<< @@ -5736,7 +5897,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_14strokeLineJoin___get__( return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":357 +/* "wx/svg/_nanosvg.pyx":374 * * @property * def strokeLineCap(self) -> SVGlineCap: # <<<<<<<<<<<<<< @@ -5764,16 +5925,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_13strokeLineCap___get__(s PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":359 + /* "wx/svg/_nanosvg.pyx":376 * def strokeLineCap(self) -> SVGlineCap: * """Stroke cap type""" * self._check_ptr() # <<<<<<<<<<<<<< * return SVGlineCap(self._ptr.strokeLineCap) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5787,12 +5951,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_13strokeLineCap___get__(s } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":360 + /* "wx/svg/_nanosvg.pyx":377 * """Stroke cap type""" * self._check_ptr() * return SVGlineCap(self._ptr.strokeLineCap) # <<<<<<<<<<<<<< @@ -5800,9 +5964,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_13strokeLineCap___get__(s * @property */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineCap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineCap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->strokeLineCap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->strokeLineCap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -5817,14 +5981,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_13strokeLineCap___get__(s __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":357 + /* "wx/svg/_nanosvg.pyx":374 * * @property * def strokeLineCap(self) -> SVGlineCap: # <<<<<<<<<<<<<< @@ -5846,7 +6010,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_13strokeLineCap___get__(s return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":363 +/* "wx/svg/_nanosvg.pyx":380 * * @property * def fillRule(self) -> SVGfillRule: # <<<<<<<<<<<<<< @@ -5874,16 +6038,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8fillRule___get__(struct PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":365 + /* "wx/svg/_nanosvg.pyx":382 * def fillRule(self) -> SVGfillRule: * """Fill rule""" * self._check_ptr() # <<<<<<<<<<<<<< * return SVGfillRule(self._ptr.fillRule) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5897,12 +6064,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8fillRule___get__(struct } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":366 + /* "wx/svg/_nanosvg.pyx":383 * """Fill rule""" * self._check_ptr() * return SVGfillRule(self._ptr.fillRule) # <<<<<<<<<<<<<< @@ -5910,9 +6077,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8fillRule___get__(struct * @property */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->fillRule); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->fillRule); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -5927,14 +6094,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8fillRule___get__(struct __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":363 + /* "wx/svg/_nanosvg.pyx":380 * * @property * def fillRule(self) -> SVGfillRule: # <<<<<<<<<<<<<< @@ -5956,7 +6123,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8fillRule___get__(struct return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":369 +/* "wx/svg/_nanosvg.pyx":386 * * @property * def miterLimit(self) -> float: # <<<<<<<<<<<<<< @@ -5983,16 +6150,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_10miterLimit___get__(stru PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":371 + /* "wx/svg/_nanosvg.pyx":388 * def miterLimit(self) -> float: * """Miter limit""" * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.miterLimit * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6006,12 +6176,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_10miterLimit___get__(stru } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":372 + /* "wx/svg/_nanosvg.pyx":389 * """Miter limit""" * self._check_ptr() * return self._ptr.miterLimit # <<<<<<<<<<<<<< @@ -6019,13 +6189,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_10miterLimit___get__(stru * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->miterLimit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->miterLimit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":369 + /* "wx/svg/_nanosvg.pyx":386 * * @property * def miterLimit(self) -> float: # <<<<<<<<<<<<<< @@ -6046,7 +6216,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_10miterLimit___get__(stru return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":375 +/* "wx/svg/_nanosvg.pyx":392 * * @property * def flags(self) -> int: # <<<<<<<<<<<<<< @@ -6073,16 +6243,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5flags___get__(struct __p PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":377 + /* "wx/svg/_nanosvg.pyx":394 * def flags(self) -> int: * """Logical OR of SVG_FLAGS_* flags""" * self._check_ptr() # <<<<<<<<<<<<<< * return int(self._ptr.flags) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6096,12 +6269,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5flags___get__(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":378 + /* "wx/svg/_nanosvg.pyx":395 * """Logical OR of SVG_FLAGS_* flags""" * self._check_ptr() * return int(self._ptr.flags) # <<<<<<<<<<<<<< @@ -6109,16 +6282,16 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5flags___get__(struct __p * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_char(__pyx_v_self->_ptr->flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_char(__pyx_v_self->_ptr->flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":375 + /* "wx/svg/_nanosvg.pyx":392 * * @property * def flags(self) -> int: # <<<<<<<<<<<<<< @@ -6139,7 +6312,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5flags___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":381 +/* "wx/svg/_nanosvg.pyx":398 * * @property * def bounds(self) -> list: # <<<<<<<<<<<<<< @@ -6168,16 +6341,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6bounds___get__(struct __ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; long __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":383 + /* "wx/svg/_nanosvg.pyx":400 * def bounds(self) -> list: * """Tight bounding box of the shape [minx,miny,maxx,maxy]""" * self._check_ptr() # <<<<<<<<<<<<<< * return [self._ptr.bounds[i] for i in range(4)] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6191,12 +6367,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6bounds___get__(struct __ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":384 + /* "wx/svg/_nanosvg.pyx":401 * """Tight bounding box of the shape [minx,miny,maxx,maxy]""" * self._check_ptr() * return [self._ptr.bounds[i] for i in range(4)] # <<<<<<<<<<<<<< @@ -6204,20 +6380,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6bounds___get__(struct __ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_4 = 0; __pyx_t_4 < 4; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 384, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":381 + /* "wx/svg/_nanosvg.pyx":398 * * @property * def bounds(self) -> list: # <<<<<<<<<<<<<< @@ -6238,7 +6414,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6bounds___get__(struct __ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":387 +/* "wx/svg/_nanosvg.pyx":404 * * @property * def minx(self) -> float: # <<<<<<<<<<<<<< @@ -6265,16 +6441,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4minx___get__(struct __py PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":388 + /* "wx/svg/_nanosvg.pyx":405 * @property * def minx(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.bounds[0] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6288,12 +6467,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4minx___get__(struct __py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":389 + /* "wx/svg/_nanosvg.pyx":406 * def minx(self) -> float: * self._check_ptr() * return self._ptr.bounds[0] # <<<<<<<<<<<<<< @@ -6301,13 +6480,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4minx___get__(struct __py * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":387 + /* "wx/svg/_nanosvg.pyx":404 * * @property * def minx(self) -> float: # <<<<<<<<<<<<<< @@ -6328,7 +6507,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4minx___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":392 +/* "wx/svg/_nanosvg.pyx":409 * * @property * def miny(self) -> float: # <<<<<<<<<<<<<< @@ -6355,16 +6534,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4miny___get__(struct __py PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":393 + /* "wx/svg/_nanosvg.pyx":410 * @property * def miny(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.bounds[1] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6378,12 +6560,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4miny___get__(struct __py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":394 + /* "wx/svg/_nanosvg.pyx":411 * def miny(self) -> float: * self._check_ptr() * return self._ptr.bounds[1] # <<<<<<<<<<<<<< @@ -6391,13 +6573,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4miny___get__(struct __py * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[1])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[1])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":392 + /* "wx/svg/_nanosvg.pyx":409 * * @property * def miny(self) -> float: # <<<<<<<<<<<<<< @@ -6418,7 +6600,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4miny___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":397 +/* "wx/svg/_nanosvg.pyx":414 * * @property * def maxx(self) -> float: # <<<<<<<<<<<<<< @@ -6445,16 +6627,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxx___get__(struct __py PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":398 + /* "wx/svg/_nanosvg.pyx":415 * @property * def maxx(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.bounds[2] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6468,12 +6653,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxx___get__(struct __py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":399 + /* "wx/svg/_nanosvg.pyx":416 * def maxx(self) -> float: * self._check_ptr() * return self._ptr.bounds[2] # <<<<<<<<<<<<<< @@ -6481,13 +6666,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxx___get__(struct __py * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":397 + /* "wx/svg/_nanosvg.pyx":414 * * @property * def maxx(self) -> float: # <<<<<<<<<<<<<< @@ -6508,7 +6693,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxx___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":402 +/* "wx/svg/_nanosvg.pyx":419 * * @property * def maxy(self) -> float: # <<<<<<<<<<<<<< @@ -6535,16 +6720,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxy___get__(struct __py PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":403 + /* "wx/svg/_nanosvg.pyx":420 * @property * def maxy(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.bounds[3] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6558,12 +6746,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxy___get__(struct __py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":404 + /* "wx/svg/_nanosvg.pyx":421 * def maxy(self) -> float: * self._check_ptr() * return self._ptr.bounds[3] # <<<<<<<<<<<<<< @@ -6571,13 +6759,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxy___get__(struct __py * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":402 + /* "wx/svg/_nanosvg.pyx":419 * * @property * def maxy(self) -> float: # <<<<<<<<<<<<<< @@ -6599,7 +6787,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxy___get__(struct __py } static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "wx/svg/_nanosvg.pyx":407 +/* "wx/svg/_nanosvg.pyx":424 * * @property * def paths(self): # <<<<<<<<<<<<<< @@ -6624,12 +6812,15 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5paths___get__(struct __p struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __pyx_cur_scope = (struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ *)__pyx_tp_new_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__(__pyx_ptype_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 407, __pyx_L1_error) + __PYX_ERR(0, 424, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -6637,7 +6828,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5paths___get__(struct __p __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get, __pyx_n_s_SVGshape___get, __pyx_n_s_wx_svg__nanosvg); if (unlikely(!gen)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get, __pyx_n_s_SVGshape___get, __pyx_n_s_wx_svg__nanosvg); if (unlikely(!gen)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6662,6 +6853,9 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_ PyObject *__pyx_t_3 = NULL; NSVGpath *__pyx_t_4; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("paths", 0); switch (__pyx_generator->resume_label) { @@ -6672,16 +6866,16 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 407, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 424, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":411 + /* "wx/svg/_nanosvg.pyx":428 * A generator that iterates over the :class:`SVGpath` objects contained in the SVGshape * """ * self._check_ptr() # <<<<<<<<<<<<<< * cdef NSVGpath *path = self._ptr.paths * while path != NULL: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6695,12 +6889,12 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":412 + /* "wx/svg/_nanosvg.pyx":429 * """ * self._check_ptr() * cdef NSVGpath *path = self._ptr.paths # <<<<<<<<<<<<<< @@ -6710,7 +6904,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_ __pyx_t_4 = __pyx_cur_scope->__pyx_v_self->_ptr->paths; __pyx_cur_scope->__pyx_v_path = __pyx_t_4; - /* "wx/svg/_nanosvg.pyx":413 + /* "wx/svg/_nanosvg.pyx":430 * self._check_ptr() * cdef NSVGpath *path = self._ptr.paths * while path != NULL: # <<<<<<<<<<<<<< @@ -6721,14 +6915,14 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_ __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_path != NULL) != 0); if (!__pyx_t_5) break; - /* "wx/svg/_nanosvg.pyx":414 + /* "wx/svg/_nanosvg.pyx":431 * cdef NSVGpath *path = self._ptr.paths * while path != NULL: * yield SVGpath.from_ptr(path) # <<<<<<<<<<<<<< * path = path.next * */ - __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_7SVGpath_from_ptr(__pyx_cur_scope->__pyx_v_path)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_7SVGpath_from_ptr(__pyx_cur_scope->__pyx_v_path)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -6739,9 +6933,9 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 414, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 431, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":415 + /* "wx/svg/_nanosvg.pyx":432 * while path != NULL: * yield SVGpath.from_ptr(path) * path = path.next # <<<<<<<<<<<<<< @@ -6753,7 +6947,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_ } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "wx/svg/_nanosvg.pyx":407 + /* "wx/svg/_nanosvg.pyx":424 * * @property * def paths(self): # <<<<<<<<<<<<<< @@ -6804,6 +6998,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6__reduce_cython__(CYTHON PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -6859,6 +7056,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8__setstate_cython__(CYTH PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -6889,7 +7089,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8__setstate_cython__(CYTH return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":427 +/* "wx/svg/_nanosvg.pyx":444 * cdef NSVGpath *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -6918,7 +7118,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_7SVGpath___cinit__(struct __pyx_obj_2wx_3 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "wx/svg/_nanosvg.pyx":428 + /* "wx/svg/_nanosvg.pyx":445 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -6927,7 +7127,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_7SVGpath___cinit__(struct __pyx_obj_2wx_3 */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":427 + /* "wx/svg/_nanosvg.pyx":444 * cdef NSVGpath *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -6941,7 +7141,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_7SVGpath___cinit__(struct __pyx_obj_2wx_3 return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":431 +/* "wx/svg/_nanosvg.pyx":448 * * @staticmethod * cdef SVGpath from_ptr(NSVGpath *ptr): # <<<<<<<<<<<<<< @@ -6954,21 +7154,24 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *__pyx_f_2wx_3svg_8_nanosvg_7 struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":432 + /* "wx/svg/_nanosvg.pyx":449 * @staticmethod * cdef SVGpath from_ptr(NSVGpath *ptr): * obj = SVGpath() # <<<<<<<<<<<<<< * obj._ptr = ptr * return obj */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGpath)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGpath)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_obj = ((struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *)__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":433 + /* "wx/svg/_nanosvg.pyx":450 * cdef SVGpath from_ptr(NSVGpath *ptr): * obj = SVGpath() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -6977,7 +7180,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *__pyx_f_2wx_3svg_8_nanosvg_7 */ __pyx_v_obj->_ptr = __pyx_v_ptr; - /* "wx/svg/_nanosvg.pyx":434 + /* "wx/svg/_nanosvg.pyx":451 * obj = SVGpath() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -6989,7 +7192,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *__pyx_f_2wx_3svg_8_nanosvg_7 __pyx_r = __pyx_v_obj; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":431 + /* "wx/svg/_nanosvg.pyx":448 * * @staticmethod * cdef SVGpath from_ptr(NSVGpath *ptr): # <<<<<<<<<<<<<< @@ -7009,7 +7212,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *__pyx_f_2wx_3svg_8_nanosvg_7 return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":436 +/* "wx/svg/_nanosvg.pyx":453 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -7036,9 +7239,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":437 + /* "wx/svg/_nanosvg.pyx":454 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -7048,20 +7254,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o __pyx_t_1 = ((__pyx_v_self->_ptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "wx/svg/_nanosvg.pyx":438 + /* "wx/svg/_nanosvg.pyx":455 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGpath") # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 438, __pyx_L1_error) + __PYX_ERR(0, 455, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":437 + /* "wx/svg/_nanosvg.pyx":454 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -7070,7 +7276,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o */ } - /* "wx/svg/_nanosvg.pyx":436 + /* "wx/svg/_nanosvg.pyx":453 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -7091,7 +7297,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":440 +/* "wx/svg/_nanosvg.pyx":457 * raise ValueError("Invalid SVGpath") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -7120,9 +7326,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "wx/svg/_nanosvg.pyx":441 + /* "wx/svg/_nanosvg.pyx":458 * * def __repr__(self): * if self._ptr: # <<<<<<<<<<<<<< @@ -7132,7 +7341,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj __pyx_t_1 = (__pyx_v_self->_ptr != 0); if (__pyx_t_1) { - /* "wx/svg/_nanosvg.pyx":442 + /* "wx/svg/_nanosvg.pyx":459 * def __repr__(self): * if self._ptr: * return "SVGpath: bounds:{}".format(self.bounds) # <<<<<<<<<<<<<< @@ -7140,9 +7349,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj * return "SVGpath: " */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_SVGpath_bounds, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_SVGpath_bounds, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bounds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bounds); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -7157,14 +7366,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":441 + /* "wx/svg/_nanosvg.pyx":458 * * def __repr__(self): * if self._ptr: # <<<<<<<<<<<<<< @@ -7173,7 +7382,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj */ } - /* "wx/svg/_nanosvg.pyx":444 + /* "wx/svg/_nanosvg.pyx":461 * return "SVGpath: bounds:{}".format(self.bounds) * else: * return "SVGpath: " # <<<<<<<<<<<<<< @@ -7187,7 +7396,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj goto __pyx_L0; } - /* "wx/svg/_nanosvg.pyx":440 + /* "wx/svg/_nanosvg.pyx":457 * raise ValueError("Invalid SVGpath") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -7209,7 +7418,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":447 +/* "wx/svg/_nanosvg.pyx":464 * * @property * def pts(self) -> list: # <<<<<<<<<<<<<< @@ -7240,16 +7449,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_3pts___get__(struct __pyx_ long __pyx_t_4; long __pyx_t_5; long __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":452 + /* "wx/svg/_nanosvg.pyx":469 * The return value is a list of floats. * """ * self._check_ptr() # <<<<<<<<<<<<<< * return [self._ptr.pts[i] for i in range(self._ptr.npts*2)] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7263,12 +7475,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_3pts___get__(struct __pyx_ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":453 + /* "wx/svg/_nanosvg.pyx":470 * """ * self._check_ptr() * return [self._ptr.pts[i] for i in range(self._ptr.npts*2)] # <<<<<<<<<<<<<< @@ -7276,22 +7488,22 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_3pts___get__(struct __pyx_ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__pyx_v_self->_ptr->npts * 2); __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 453, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":447 + /* "wx/svg/_nanosvg.pyx":464 * * @property * def pts(self) -> list: # <<<<<<<<<<<<<< @@ -7312,7 +7524,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_3pts___get__(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":456 +/* "wx/svg/_nanosvg.pyx":473 * * @property * def npts(self) -> int: # <<<<<<<<<<<<<< @@ -7339,16 +7551,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4npts___get__(struct __pyx PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":458 + /* "wx/svg/_nanosvg.pyx":475 * def npts(self) -> int: * """Number of points""" * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.npts * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7362,12 +7577,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4npts___get__(struct __pyx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":459 + /* "wx/svg/_nanosvg.pyx":476 * """Number of points""" * self._check_ptr() * return self._ptr.npts # <<<<<<<<<<<<<< @@ -7375,13 +7590,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4npts___get__(struct __pyx * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_ptr->npts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_ptr->npts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":456 + /* "wx/svg/_nanosvg.pyx":473 * * @property * def npts(self) -> int: # <<<<<<<<<<<<<< @@ -7402,7 +7617,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4npts___get__(struct __pyx return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":462 +/* "wx/svg/_nanosvg.pyx":479 * * @property * def points(self) -> list: # <<<<<<<<<<<<<< @@ -7435,16 +7650,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":467 + /* "wx/svg/_nanosvg.pyx":484 * The return value is a list of tuples, each containing an x-y pair. * """ * self._check_ptr() # <<<<<<<<<<<<<< * return [(self._ptr.pts[i], self._ptr.pts[i+1]) * for i in range(0, self._ptr.npts*2, 2)] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7458,12 +7676,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":468 + /* "wx/svg/_nanosvg.pyx":485 * """ * self._check_ptr() * return [(self._ptr.pts[i], self._ptr.pts[i+1]) # <<<<<<<<<<<<<< @@ -7471,19 +7689,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "wx/svg/_nanosvg.pyx":469 + /* "wx/svg/_nanosvg.pyx":486 * self._check_ptr() * return [(self._ptr.pts[i], self._ptr.pts[i+1]) * for i in range(0, self._ptr.npts*2, 2)] # <<<<<<<<<<<<<< * * @property */ - __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_self->_ptr->npts * 2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_self->_ptr->npts * 2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); @@ -7494,16 +7712,16 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 486, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -7511,17 +7729,17 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 486, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 486, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -7531,7 +7749,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 469, __pyx_L1_error) + else __PYX_ERR(0, 486, __pyx_L1_error) } break; } @@ -7540,23 +7758,23 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":468 + /* "wx/svg/_nanosvg.pyx":485 * """ * self._check_ptr() * return [(self._ptr.pts[i], self._ptr.pts[i+1]) # <<<<<<<<<<<<<< * for i in range(0, self._ptr.npts*2, 2)] * */ - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 468, __pyx_L1_error) - __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_t_6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 485, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_t_6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_t_6])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_t_6])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 468, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); @@ -7564,10 +7782,10 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __pyx_t_2 = 0; __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 468, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 485, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "wx/svg/_nanosvg.pyx":469 + /* "wx/svg/_nanosvg.pyx":486 * self._check_ptr() * return [(self._ptr.pts[i], self._ptr.pts[i+1]) * for i in range(0, self._ptr.npts*2, 2)] # <<<<<<<<<<<<<< @@ -7580,7 +7798,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":462 + /* "wx/svg/_nanosvg.pyx":479 * * @property * def points(self) -> list: # <<<<<<<<<<<<<< @@ -7604,7 +7822,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":472 +/* "wx/svg/_nanosvg.pyx":489 * * @property * def closed(self) -> bool: # <<<<<<<<<<<<<< @@ -7632,16 +7850,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6closed___get__(struct __p PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":474 + /* "wx/svg/_nanosvg.pyx":491 * def closed(self) -> bool: * """Flag indicating if shapes should be treated as closed""" * self._check_ptr() # <<<<<<<<<<<<<< * return bool(self._ptr.closed) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7655,12 +7876,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6closed___get__(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":475 + /* "wx/svg/_nanosvg.pyx":492 * """Flag indicating if shapes should be treated as closed""" * self._check_ptr() * return bool(self._ptr.closed) # <<<<<<<<<<<<<< @@ -7668,17 +7889,17 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6closed___get__(struct __p * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":472 + /* "wx/svg/_nanosvg.pyx":489 * * @property * def closed(self) -> bool: # <<<<<<<<<<<<<< @@ -7699,7 +7920,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6closed___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":478 +/* "wx/svg/_nanosvg.pyx":495 * * @property * def bounds(self) -> list: # <<<<<<<<<<<<<< @@ -7728,16 +7949,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6bounds___get__(struct __p PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; long __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":480 + /* "wx/svg/_nanosvg.pyx":497 * def bounds(self) -> list: * """Tight bounding box of the shape [minx,miny,maxx,maxy]""" * self._check_ptr() # <<<<<<<<<<<<<< * return [self._ptr.bounds[i] for i in range(4)] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7751,12 +7975,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6bounds___get__(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":481 + /* "wx/svg/_nanosvg.pyx":498 * """Tight bounding box of the shape [minx,miny,maxx,maxy]""" * self._check_ptr() * return [self._ptr.bounds[i] for i in range(4)] # <<<<<<<<<<<<<< @@ -7764,20 +7988,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6bounds___get__(struct __p * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_4 = 0; __pyx_t_4 < 4; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 481, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":478 + /* "wx/svg/_nanosvg.pyx":495 * * @property * def bounds(self) -> list: # <<<<<<<<<<<<<< @@ -7798,7 +8022,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6bounds___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":484 +/* "wx/svg/_nanosvg.pyx":501 * * @property * def minx(self) -> float: # <<<<<<<<<<<<<< @@ -7825,16 +8049,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4minx___get__(struct __pyx PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":485 + /* "wx/svg/_nanosvg.pyx":502 * @property * def minx(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.bounds[0] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7848,12 +8075,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4minx___get__(struct __pyx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":486 + /* "wx/svg/_nanosvg.pyx":503 * def minx(self) -> float: * self._check_ptr() * return self._ptr.bounds[0] # <<<<<<<<<<<<<< @@ -7861,13 +8088,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4minx___get__(struct __pyx * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":484 + /* "wx/svg/_nanosvg.pyx":501 * * @property * def minx(self) -> float: # <<<<<<<<<<<<<< @@ -7888,7 +8115,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4minx___get__(struct __pyx return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":489 +/* "wx/svg/_nanosvg.pyx":506 * * @property * def miny(self) -> float: # <<<<<<<<<<<<<< @@ -7915,16 +8142,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4miny___get__(struct __pyx PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":490 + /* "wx/svg/_nanosvg.pyx":507 * @property * def miny(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.bounds[1] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7938,12 +8168,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4miny___get__(struct __pyx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":491 + /* "wx/svg/_nanosvg.pyx":508 * def miny(self) -> float: * self._check_ptr() * return self._ptr.bounds[1] # <<<<<<<<<<<<<< @@ -7951,13 +8181,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4miny___get__(struct __pyx * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[1])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[1])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":489 + /* "wx/svg/_nanosvg.pyx":506 * * @property * def miny(self) -> float: # <<<<<<<<<<<<<< @@ -7978,7 +8208,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4miny___get__(struct __pyx return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":494 +/* "wx/svg/_nanosvg.pyx":511 * * @property * def maxx(self) -> float: # <<<<<<<<<<<<<< @@ -8005,16 +8235,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxx___get__(struct __pyx PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":495 + /* "wx/svg/_nanosvg.pyx":512 * @property * def maxx(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.bounds[2] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 495, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8028,12 +8261,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxx___get__(struct __pyx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":496 + /* "wx/svg/_nanosvg.pyx":513 * def maxx(self) -> float: * self._check_ptr() * return self._ptr.bounds[2] # <<<<<<<<<<<<<< @@ -8041,13 +8274,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxx___get__(struct __pyx * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":494 + /* "wx/svg/_nanosvg.pyx":511 * * @property * def maxx(self) -> float: # <<<<<<<<<<<<<< @@ -8068,7 +8301,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxx___get__(struct __pyx return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":499 +/* "wx/svg/_nanosvg.pyx":516 * * @property * def maxy(self) -> float: # <<<<<<<<<<<<<< @@ -8095,16 +8328,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxy___get__(struct __pyx PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":500 + /* "wx/svg/_nanosvg.pyx":517 * @property * def maxy(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.bounds[3] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8118,12 +8354,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxy___get__(struct __pyx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":501 + /* "wx/svg/_nanosvg.pyx":518 * def maxy(self) -> float: * self._check_ptr() * return self._ptr.bounds[3] # <<<<<<<<<<<<<< @@ -8131,13 +8367,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxy___get__(struct __pyx * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":499 + /* "wx/svg/_nanosvg.pyx":516 * * @property * def maxy(self) -> float: # <<<<<<<<<<<<<< @@ -8182,6 +8418,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6__reduce_cython__(CYTHON_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -8237,6 +8476,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_8__setstate_cython__(CYTHO PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -8267,7 +8509,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_8__setstate_cython__(CYTHO return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":513 +/* "wx/svg/_nanosvg.pyx":530 * cdef NSVGpaint *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -8296,7 +8538,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint___cinit__(struct __pyx_obj_2wx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "wx/svg/_nanosvg.pyx":514 + /* "wx/svg/_nanosvg.pyx":531 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -8305,7 +8547,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint___cinit__(struct __pyx_obj_2wx_ */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":513 + /* "wx/svg/_nanosvg.pyx":530 * cdef NSVGpaint *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -8319,7 +8561,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint___cinit__(struct __pyx_obj_2wx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":517 +/* "wx/svg/_nanosvg.pyx":534 * * @staticmethod * cdef SVGpaint from_ptr(NSVGpaint *ptr): # <<<<<<<<<<<<<< @@ -8332,21 +8574,24 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *__pyx_f_2wx_3svg_8_nanosvg_ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":518 + /* "wx/svg/_nanosvg.pyx":535 * @staticmethod * cdef SVGpaint from_ptr(NSVGpaint *ptr): * obj = SVGpaint() # <<<<<<<<<<<<<< * obj._ptr = ptr * return obj */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGpaint)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGpaint)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_obj = ((struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *)__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":519 + /* "wx/svg/_nanosvg.pyx":536 * cdef SVGpaint from_ptr(NSVGpaint *ptr): * obj = SVGpaint() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -8355,7 +8600,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *__pyx_f_2wx_3svg_8_nanosvg_ */ __pyx_v_obj->_ptr = __pyx_v_ptr; - /* "wx/svg/_nanosvg.pyx":520 + /* "wx/svg/_nanosvg.pyx":537 * obj = SVGpaint() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -8367,7 +8612,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *__pyx_f_2wx_3svg_8_nanosvg_ __pyx_r = __pyx_v_obj; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":517 + /* "wx/svg/_nanosvg.pyx":534 * * @staticmethod * cdef SVGpaint from_ptr(NSVGpaint *ptr): # <<<<<<<<<<<<<< @@ -8387,7 +8632,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *__pyx_f_2wx_3svg_8_nanosvg_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":522 +/* "wx/svg/_nanosvg.pyx":539 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -8414,9 +8659,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":523 + /* "wx/svg/_nanosvg.pyx":540 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -8426,20 +8674,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ __pyx_t_1 = ((__pyx_v_self->_ptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "wx/svg/_nanosvg.pyx":524 + /* "wx/svg/_nanosvg.pyx":541 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGpaint") # <<<<<<<<<<<<<< * * @property */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 524, __pyx_L1_error) + __PYX_ERR(0, 541, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":523 + /* "wx/svg/_nanosvg.pyx":540 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -8448,7 +8696,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ */ } - /* "wx/svg/_nanosvg.pyx":522 + /* "wx/svg/_nanosvg.pyx":539 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -8469,7 +8717,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":527 +/* "wx/svg/_nanosvg.pyx":544 * * @property * def type(self) -> SVGpaintType: # <<<<<<<<<<<<<< @@ -8497,16 +8745,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4type___get__(struct __py PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":529 + /* "wx/svg/_nanosvg.pyx":546 * def type(self) -> SVGpaintType: * """Flag indicating the type of paint info, solid color or type of gradient""" * self._check_ptr() # <<<<<<<<<<<<<< * return SVGpaintType(self._ptr.type) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8520,12 +8771,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4type___get__(struct __py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":530 + /* "wx/svg/_nanosvg.pyx":547 * """Flag indicating the type of paint info, solid color or type of gradient""" * self._check_ptr() * return SVGpaintType(self._ptr.type) # <<<<<<<<<<<<<< @@ -8533,9 +8784,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4type___get__(struct __py * @property */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGpaintType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGpaintType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -8550,14 +8801,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4type___get__(struct __py __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":527 + /* "wx/svg/_nanosvg.pyx":544 * * @property * def type(self) -> SVGpaintType: # <<<<<<<<<<<<<< @@ -8579,7 +8830,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4type___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":533 +/* "wx/svg/_nanosvg.pyx":550 * * @property * def color(self) -> uint: # <<<<<<<<<<<<<< @@ -8607,16 +8858,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":534 + /* "wx/svg/_nanosvg.pyx":551 * @property * def color(self) -> uint: * self._check_ptr() # <<<<<<<<<<<<<< * if self.type != SVG_PAINT_COLOR: * raise ValueError("Color not valid in this paint object") */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8630,43 +8884,43 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":535 + /* "wx/svg/_nanosvg.pyx":552 * def color(self) -> uint: * self._check_ptr() * if self.type != SVG_PAINT_COLOR: # <<<<<<<<<<<<<< * raise ValueError("Color not valid in this paint object") * return self._ptr.color */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(__pyx_e_2wx_3svg_8_nanosvg_SVG_PAINT_COLOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 535, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(__pyx_e_2wx_3svg_8_nanosvg_SVG_PAINT_COLOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 535, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_4)) { - /* "wx/svg/_nanosvg.pyx":536 + /* "wx/svg/_nanosvg.pyx":553 * self._check_ptr() * if self.type != SVG_PAINT_COLOR: * raise ValueError("Color not valid in this paint object") # <<<<<<<<<<<<<< * return self._ptr.color * */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 536, __pyx_L1_error) + __PYX_ERR(0, 553, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":535 + /* "wx/svg/_nanosvg.pyx":552 * def color(self) -> uint: * self._check_ptr() * if self.type != SVG_PAINT_COLOR: # <<<<<<<<<<<<<< @@ -8675,7 +8929,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p */ } - /* "wx/svg/_nanosvg.pyx":537 + /* "wx/svg/_nanosvg.pyx":554 * if self.type != SVG_PAINT_COLOR: * raise ValueError("Color not valid in this paint object") * return self._ptr.color # <<<<<<<<<<<<<< @@ -8683,13 +8937,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_ptr->color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_ptr->color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":533 + /* "wx/svg/_nanosvg.pyx":550 * * @property * def color(self) -> uint: # <<<<<<<<<<<<<< @@ -8710,7 +8964,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":540 +/* "wx/svg/_nanosvg.pyx":557 * * @property * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< @@ -8740,21 +8994,24 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_10color_rgba___get__(stru PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":542 + /* "wx/svg/_nanosvg.pyx":559 * def color_rgba(self) -> tuple: * """Returns color as a RGBA tuple""" * c = self.color # <<<<<<<<<<<<<< * return ( c & 0xff, * (c >> 8) & 0xff, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_c = __pyx_t_1; __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":543 + /* "wx/svg/_nanosvg.pyx":560 * """Returns color as a RGBA tuple""" * c = self.color * return ( c & 0xff, # <<<<<<<<<<<<<< @@ -8762,56 +9019,56 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_10color_rgba___get__(stru * (c >> 16) & 0xff, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_AndObjC(__pyx_v_c, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_AndObjC(__pyx_v_c, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "wx/svg/_nanosvg.pyx":544 + /* "wx/svg/_nanosvg.pyx":561 * c = self.color * return ( c & 0xff, * (c >> 8) & 0xff, # <<<<<<<<<<<<<< * (c >> 16) & 0xff, * (c >> 24) & 0xff) */ - __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":545 + /* "wx/svg/_nanosvg.pyx":562 * return ( c & 0xff, * (c >> 8) & 0xff, * (c >> 16) & 0xff, # <<<<<<<<<<<<<< * (c >> 24) & 0xff) * */ - __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_16, 16, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_16, 16, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":546 + /* "wx/svg/_nanosvg.pyx":563 * (c >> 8) & 0xff, * (c >> 16) & 0xff, * (c >> 24) & 0xff) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_24, 24, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_24, 24, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":543 + /* "wx/svg/_nanosvg.pyx":560 * """Returns color as a RGBA tuple""" * c = self.color * return ( c & 0xff, # <<<<<<<<<<<<<< * (c >> 8) & 0xff, * (c >> 16) & 0xff, */ - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -8829,7 +9086,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_10color_rgba___get__(stru __pyx_t_2 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":540 + /* "wx/svg/_nanosvg.pyx":557 * * @property * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< @@ -8853,7 +9110,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_10color_rgba___get__(stru return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":549 +/* "wx/svg/_nanosvg.pyx":566 * * @property * def gradient(self) -> SVGgradient: # <<<<<<<<<<<<<< @@ -8882,16 +9139,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_8gradient___get__(struct PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":550 + /* "wx/svg/_nanosvg.pyx":567 * @property * def gradient(self) -> SVGgradient: * self._check_ptr() # <<<<<<<<<<<<<< * if self.type not in [SVG_PAINT_LINEAR_GRADIENT, SVG_PAINT_RADIAL_GRADIENT]: * raise ValueError("Gradient not valid in this paint object") */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8905,36 +9165,36 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_8gradient___get__(struct } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":551 + /* "wx/svg/_nanosvg.pyx":568 * def gradient(self) -> SVGgradient: * self._check_ptr() * if self.type not in [SVG_PAINT_LINEAR_GRADIENT, SVG_PAINT_RADIAL_GRADIENT]: # <<<<<<<<<<<<<< * raise ValueError("Gradient not valid in this paint object") * return SVGgradient.from_ptr(self._ptr.gradient) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(__pyx_e_2wx_3svg_8_nanosvg_SVG_PAINT_LINEAR_GRADIENT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(__pyx_e_2wx_3svg_8_nanosvg_SVG_PAINT_LINEAR_GRADIENT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { } else { __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(__pyx_e_2wx_3svg_8_nanosvg_SVG_PAINT_RADIAL_GRADIENT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(__pyx_e_2wx_3svg_8_nanosvg_SVG_PAINT_RADIAL_GRADIENT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_5; __pyx_L4_bool_binop_done:; @@ -8942,20 +9202,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_8gradient___get__(struct __pyx_t_5 = (__pyx_t_4 != 0); if (unlikely(__pyx_t_5)) { - /* "wx/svg/_nanosvg.pyx":552 + /* "wx/svg/_nanosvg.pyx":569 * self._check_ptr() * if self.type not in [SVG_PAINT_LINEAR_GRADIENT, SVG_PAINT_RADIAL_GRADIENT]: * raise ValueError("Gradient not valid in this paint object") # <<<<<<<<<<<<<< * return SVGgradient.from_ptr(self._ptr.gradient) * */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 552, __pyx_L1_error) + __PYX_ERR(0, 569, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":551 + /* "wx/svg/_nanosvg.pyx":568 * def gradient(self) -> SVGgradient: * self._check_ptr() * if self.type not in [SVG_PAINT_LINEAR_GRADIENT, SVG_PAINT_RADIAL_GRADIENT]: # <<<<<<<<<<<<<< @@ -8964,7 +9224,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_8gradient___get__(struct */ } - /* "wx/svg/_nanosvg.pyx":553 + /* "wx/svg/_nanosvg.pyx":570 * if self.type not in [SVG_PAINT_LINEAR_GRADIENT, SVG_PAINT_RADIAL_GRADIENT]: * raise ValueError("Gradient not valid in this paint object") * return SVGgradient.from_ptr(self._ptr.gradient) # <<<<<<<<<<<<<< @@ -8972,13 +9232,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_8gradient___get__(struct * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_11SVGgradient_from_ptr(__pyx_v_self->_ptr->gradient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_11SVGgradient_from_ptr(__pyx_v_self->_ptr->gradient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":549 + /* "wx/svg/_nanosvg.pyx":566 * * @property * def gradient(self) -> SVGgradient: # <<<<<<<<<<<<<< @@ -9023,6 +9283,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4__reduce_cython__(CYTHON PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -9078,6 +9341,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_6__setstate_cython__(CYTH PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -9108,7 +9374,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_6__setstate_cython__(CYTH return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":564 +/* "wx/svg/_nanosvg.pyx":581 * cdef NSVGgradient *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -9137,7 +9403,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient___cinit__(struct __pyx_obj_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "wx/svg/_nanosvg.pyx":565 + /* "wx/svg/_nanosvg.pyx":582 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -9146,7 +9412,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient___cinit__(struct __pyx_obj_ */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":564 + /* "wx/svg/_nanosvg.pyx":581 * cdef NSVGgradient *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -9160,7 +9426,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient___cinit__(struct __pyx_obj_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":568 +/* "wx/svg/_nanosvg.pyx":585 * * @staticmethod * cdef SVGgradient from_ptr(NSVGgradient *ptr): # <<<<<<<<<<<<<< @@ -9173,21 +9439,24 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *__pyx_f_2wx_3svg_8_nanos struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":569 + /* "wx/svg/_nanosvg.pyx":586 * @staticmethod * cdef SVGgradient from_ptr(NSVGgradient *ptr): * obj = SVGgradient() # <<<<<<<<<<<<<< * obj._ptr = ptr * return obj */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGgradient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGgradient)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_obj = ((struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *)__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":570 + /* "wx/svg/_nanosvg.pyx":587 * cdef SVGgradient from_ptr(NSVGgradient *ptr): * obj = SVGgradient() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -9196,7 +9465,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *__pyx_f_2wx_3svg_8_nanos */ __pyx_v_obj->_ptr = __pyx_v_ptr; - /* "wx/svg/_nanosvg.pyx":571 + /* "wx/svg/_nanosvg.pyx":588 * obj = SVGgradient() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -9208,7 +9477,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *__pyx_f_2wx_3svg_8_nanos __pyx_r = __pyx_v_obj; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":568 + /* "wx/svg/_nanosvg.pyx":585 * * @staticmethod * cdef SVGgradient from_ptr(NSVGgradient *ptr): # <<<<<<<<<<<<<< @@ -9228,7 +9497,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *__pyx_f_2wx_3svg_8_nanos return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":573 +/* "wx/svg/_nanosvg.pyx":590 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -9255,9 +9524,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":574 + /* "wx/svg/_nanosvg.pyx":591 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -9267,20 +9539,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ __pyx_t_1 = ((__pyx_v_self->_ptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "wx/svg/_nanosvg.pyx":575 + /* "wx/svg/_nanosvg.pyx":592 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGgradient") # <<<<<<<<<<<<<< * * @property */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 575, __pyx_L1_error) + __PYX_ERR(0, 592, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":574 + /* "wx/svg/_nanosvg.pyx":591 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -9289,7 +9561,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ */ } - /* "wx/svg/_nanosvg.pyx":573 + /* "wx/svg/_nanosvg.pyx":590 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -9310,7 +9582,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":578 +/* "wx/svg/_nanosvg.pyx":595 * * @property * def xform(self) -> list: # <<<<<<<<<<<<<< @@ -9339,16 +9611,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5xform___get__(struct PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; long __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":580 + /* "wx/svg/_nanosvg.pyx":597 * def xform(self) -> list: * """The gradient's transform""" * self._check_ptr() # <<<<<<<<<<<<<< * return [self._ptr.xform[i] for i in range(6)] * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9362,12 +9637,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5xform___get__(struct } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":581 + /* "wx/svg/_nanosvg.pyx":598 * """The gradient's transform""" * self._check_ptr() * return [self._ptr.xform[i] for i in range(6)] # <<<<<<<<<<<<<< @@ -9375,20 +9650,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5xform___get__(struct * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); for (__pyx_t_4 = 0; __pyx_t_4 < 6; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->xform[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->xform[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 581, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":578 + /* "wx/svg/_nanosvg.pyx":595 * * @property * def xform(self) -> list: # <<<<<<<<<<<<<< @@ -9409,7 +9684,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5xform___get__(struct return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":584 +/* "wx/svg/_nanosvg.pyx":601 * * @property * def spread(self) -> int: # <<<<<<<<<<<<<< @@ -9436,16 +9711,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6spread___get__(struc PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":585 + /* "wx/svg/_nanosvg.pyx":602 * @property * def spread(self) -> int: * self._check_ptr() # <<<<<<<<<<<<<< * return int(self._ptr.spread) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9459,12 +9737,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6spread___get__(struc } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":586 + /* "wx/svg/_nanosvg.pyx":603 * def spread(self) -> int: * self._check_ptr() * return int(self._ptr.spread) # <<<<<<<<<<<<<< @@ -9472,16 +9750,16 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6spread___get__(struc * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->spread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->spread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":584 + /* "wx/svg/_nanosvg.pyx":601 * * @property * def spread(self) -> int: # <<<<<<<<<<<<<< @@ -9502,7 +9780,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6spread___get__(struc return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":589 +/* "wx/svg/_nanosvg.pyx":606 * * @property * def fx(self) -> float: # <<<<<<<<<<<<<< @@ -9529,16 +9807,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fx___get__(struct __ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":590 + /* "wx/svg/_nanosvg.pyx":607 * @property * def fx(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.fx * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9552,12 +9833,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fx___get__(struct __ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":591 + /* "wx/svg/_nanosvg.pyx":608 * def fx(self) -> float: * self._check_ptr() * return self._ptr.fx # <<<<<<<<<<<<<< @@ -9565,13 +9846,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fx___get__(struct __ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->fx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->fx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":589 + /* "wx/svg/_nanosvg.pyx":606 * * @property * def fx(self) -> float: # <<<<<<<<<<<<<< @@ -9592,7 +9873,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fx___get__(struct __ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":594 +/* "wx/svg/_nanosvg.pyx":611 * * @property * def fy(self) -> float: # <<<<<<<<<<<<<< @@ -9619,16 +9900,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fy___get__(struct __ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":595 + /* "wx/svg/_nanosvg.pyx":612 * @property * def fy(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.fy * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9642,12 +9926,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fy___get__(struct __ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":596 + /* "wx/svg/_nanosvg.pyx":613 * def fy(self) -> float: * self._check_ptr() * return self._ptr.fy # <<<<<<<<<<<<<< @@ -9655,13 +9939,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fy___get__(struct __ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->fy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->fy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":594 + /* "wx/svg/_nanosvg.pyx":611 * * @property * def fy(self) -> float: # <<<<<<<<<<<<<< @@ -9683,7 +9967,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fy___get__(struct __ } static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "wx/svg/_nanosvg.pyx":599 +/* "wx/svg/_nanosvg.pyx":616 * * @property * def stops(self): # <<<<<<<<<<<<<< @@ -9708,12 +9992,15 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5stops___get__(struct struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __pyx_cur_scope = (struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__ *)__pyx_tp_new_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__(__pyx_ptype_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 599, __pyx_L1_error) + __PYX_ERR(0, 616, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -9721,7 +10008,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5stops___get__(struct __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get, __pyx_n_s_SVGgradient___get, __pyx_n_s_wx_svg__nanosvg); if (unlikely(!gen)) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_get, __pyx_n_s_SVGgradient___get, __pyx_n_s_wx_svg__nanosvg); if (unlikely(!gen)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -9747,6 +10034,9 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2(__ int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("stops", 0); switch (__pyx_generator->resume_label) { @@ -9757,16 +10047,16 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2(__ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 599, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 616, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":603 + /* "wx/svg/_nanosvg.pyx":620 * A generator that iterates over the :class:`SVGgradientStop` objects contained in the SVGgradient * """ * self._check_ptr() # <<<<<<<<<<<<<< * for i in range(self._ptr.nstops): * yield SVGgradientStop.from_ptr(&self._ptr.stops[i]) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9780,12 +10070,12 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2(__ } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":604 + /* "wx/svg/_nanosvg.pyx":621 * """ * self._check_ptr() * for i in range(self._ptr.nstops): # <<<<<<<<<<<<<< @@ -9797,14 +10087,14 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2(__ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_6; - /* "wx/svg/_nanosvg.pyx":605 + /* "wx/svg/_nanosvg.pyx":622 * self._check_ptr() * for i in range(self._ptr.nstops): * yield SVGgradientStop.from_ptr(&self._ptr.stops[i]) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_15SVGgradientStop_from_ptr((&(__pyx_cur_scope->__pyx_v_self->_ptr->stops[__pyx_cur_scope->__pyx_v_i])))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_2wx_3svg_8_nanosvg_15SVGgradientStop_from_ptr((&(__pyx_cur_scope->__pyx_v_self->_ptr->stops[__pyx_cur_scope->__pyx_v_i])))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -9821,11 +10111,11 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_11SVGgradient_5stops_2generator2(__ __pyx_t_4 = __pyx_cur_scope->__pyx_t_0; __pyx_t_5 = __pyx_cur_scope->__pyx_t_1; __pyx_t_6 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 605, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 622, __pyx_L1_error) } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "wx/svg/_nanosvg.pyx":599 + /* "wx/svg/_nanosvg.pyx":616 * * @property * def stops(self): # <<<<<<<<<<<<<< @@ -9876,6 +10166,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_4__reduce_cython__(CY PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -9931,6 +10224,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6__setstate_cython__( PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -9961,7 +10257,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6__setstate_cython__( return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":615 +/* "wx/svg/_nanosvg.pyx":632 * cdef NSVGgradientStop *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -9990,7 +10286,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop___cinit__(struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "wx/svg/_nanosvg.pyx":616 + /* "wx/svg/_nanosvg.pyx":633 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -9999,7 +10295,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop___cinit__(struct __pyx_ */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":615 + /* "wx/svg/_nanosvg.pyx":632 * cdef NSVGgradientStop *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -10013,7 +10309,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop___cinit__(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":619 +/* "wx/svg/_nanosvg.pyx":636 * * @staticmethod * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): # <<<<<<<<<<<<<< @@ -10026,21 +10322,24 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *__pyx_f_2wx_3svg_8_n struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":620 + /* "wx/svg/_nanosvg.pyx":637 * @staticmethod * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): * obj = SVGgradientStop() # <<<<<<<<<<<<<< * obj._ptr = ptr * return obj */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGgradientStop)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGgradientStop)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_obj = ((struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *)__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":621 + /* "wx/svg/_nanosvg.pyx":638 * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): * obj = SVGgradientStop() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -10049,7 +10348,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *__pyx_f_2wx_3svg_8_n */ __pyx_v_obj->_ptr = __pyx_v_ptr; - /* "wx/svg/_nanosvg.pyx":622 + /* "wx/svg/_nanosvg.pyx":639 * obj = SVGgradientStop() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -10061,7 +10360,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *__pyx_f_2wx_3svg_8_n __pyx_r = __pyx_v_obj; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":619 + /* "wx/svg/_nanosvg.pyx":636 * * @staticmethod * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): # <<<<<<<<<<<<<< @@ -10081,7 +10380,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *__pyx_f_2wx_3svg_8_n return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":624 +/* "wx/svg/_nanosvg.pyx":641 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -10108,9 +10407,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":625 + /* "wx/svg/_nanosvg.pyx":642 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -10120,20 +10422,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc __pyx_t_1 = ((__pyx_v_self->_ptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "wx/svg/_nanosvg.pyx":626 + /* "wx/svg/_nanosvg.pyx":643 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGgradientStop") # <<<<<<<<<<<<<< * * @property */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 626, __pyx_L1_error) + __PYX_ERR(0, 643, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":625 + /* "wx/svg/_nanosvg.pyx":642 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -10142,7 +10444,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc */ } - /* "wx/svg/_nanosvg.pyx":624 + /* "wx/svg/_nanosvg.pyx":641 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -10163,7 +10465,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":629 +/* "wx/svg/_nanosvg.pyx":646 * * @property * def color(self) -> uint: # <<<<<<<<<<<<<< @@ -10190,16 +10492,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_5color___get__(st PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":630 + /* "wx/svg/_nanosvg.pyx":647 * @property * def color(self) -> uint: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.color * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10213,12 +10518,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_5color___get__(st } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":631 + /* "wx/svg/_nanosvg.pyx":648 * def color(self) -> uint: * self._check_ptr() * return self._ptr.color # <<<<<<<<<<<<<< @@ -10226,13 +10531,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_5color___get__(st * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_ptr->color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_ptr->color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":629 + /* "wx/svg/_nanosvg.pyx":646 * * @property * def color(self) -> uint: # <<<<<<<<<<<<<< @@ -10253,7 +10558,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_5color___get__(st return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":634 +/* "wx/svg/_nanosvg.pyx":651 * * @property * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< @@ -10283,21 +10588,24 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":636 + /* "wx/svg/_nanosvg.pyx":653 * def color_rgba(self) -> tuple: * """ Returns color as a RGBA tuple """ * c = self.color # <<<<<<<<<<<<<< * return ( c & 0xff, * (c >> 8) & 0xff, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_c = __pyx_t_1; __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":637 + /* "wx/svg/_nanosvg.pyx":654 * """ Returns color as a RGBA tuple """ * c = self.color * return ( c & 0xff, # <<<<<<<<<<<<<< @@ -10305,56 +10613,56 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge * (c >> 16) & 0xff, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_AndObjC(__pyx_v_c, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_AndObjC(__pyx_v_c, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "wx/svg/_nanosvg.pyx":638 + /* "wx/svg/_nanosvg.pyx":655 * c = self.color * return ( c & 0xff, * (c >> 8) & 0xff, # <<<<<<<<<<<<<< * (c >> 16) & 0xff, * (c >> 24) & 0xff) */ - __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":639 + /* "wx/svg/_nanosvg.pyx":656 * return ( c & 0xff, * (c >> 8) & 0xff, * (c >> 16) & 0xff, # <<<<<<<<<<<<<< * (c >> 24) & 0xff) * */ - __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_16, 16, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_16, 16, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":640 + /* "wx/svg/_nanosvg.pyx":657 * (c >> 8) & 0xff, * (c >> 16) & 0xff, * (c >> 24) & 0xff) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_24, 24, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_RshiftObjC(__pyx_v_c, __pyx_int_24, 24, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_AndObjC(__pyx_t_2, __pyx_int_255, 0xff, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":637 + /* "wx/svg/_nanosvg.pyx":654 * """ Returns color as a RGBA tuple """ * c = self.color * return ( c & 0xff, # <<<<<<<<<<<<<< * (c >> 8) & 0xff, * (c >> 16) & 0xff, */ - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -10372,7 +10680,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge __pyx_t_2 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":634 + /* "wx/svg/_nanosvg.pyx":651 * * @property * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< @@ -10396,7 +10704,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":643 +/* "wx/svg/_nanosvg.pyx":660 * * @property * def offset(self) -> float: # <<<<<<<<<<<<<< @@ -10423,16 +10731,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_6offset___get__(s PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":644 + /* "wx/svg/_nanosvg.pyx":661 * @property * def offset(self) -> float: * self._check_ptr() # <<<<<<<<<<<<<< * return self._ptr.offset * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10446,12 +10757,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_6offset___get__(s } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":645 + /* "wx/svg/_nanosvg.pyx":662 * def offset(self) -> float: * self._check_ptr() * return self._ptr.offset # <<<<<<<<<<<<<< @@ -10459,13 +10770,13 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_6offset___get__(s * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":643 + /* "wx/svg/_nanosvg.pyx":660 * * @property * def offset(self) -> float: # <<<<<<<<<<<<<< @@ -10510,6 +10821,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_4__reduce_cython_ PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 @@ -10565,6 +10879,9 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_6__setstate_cytho PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 @@ -10609,6 +10926,9 @@ static int __pyx_pw_8EnumBase_14__Pyx_EnumMeta_1__init__(PyObject *__pyx_v_cls, PyObject *__pyx_v_name = 0; PyObject *__pyx_v_parents = 0; PyObject *__pyx_v_dct = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -10683,6 +11003,9 @@ static int __pyx_pf_8EnumBase_14__Pyx_EnumMeta___init__(struct __pyx_obj___Pyx_E PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "EnumBase":17 @@ -10823,6 +11146,9 @@ static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_2__iter__(struct __pyx_obj_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); /* "EnumBase":20 @@ -10907,6 +11233,9 @@ static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_4__getitem__(struct __pyx_o __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "EnumBase":22 @@ -10976,6 +11305,9 @@ static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_6__reduce_cython__(struct _ int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 @@ -11195,6 +11527,9 @@ static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumMeta_8__setstate_cython__(struct PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 @@ -11242,6 +11577,9 @@ static PyObject *__pyx_pw_8EnumBase_14__Pyx_EnumBase_1__new__(PyObject *__pyx_se PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_value = 0; PyObject *__pyx_v_name = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__new__ (wrapper)", 0); @@ -11327,6 +11665,9 @@ static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumBase___new__(CYTHON_UNUSED PyObj int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__new__", 0); /* "EnumBase":29 @@ -11609,6 +11950,9 @@ static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumBase_2__repr__(CYTHON_UNUSED PyO PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "EnumBase":40 @@ -11693,6 +12037,9 @@ static PyObject *__pyx_pf_8EnumBase_14__Pyx_EnumBase_4__str__(CYTHON_UNUSED PyOb PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); /* "EnumBase":42 @@ -11759,6 +12106,9 @@ static PyObject *__pyx_pw_8EnumBase_1__pyx_unpickle___Pyx_EnumMeta(PyObject *__p PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle___Pyx_EnumMeta (wrapper)", 0); @@ -11836,6 +12186,9 @@ static PyObject *__pyx_pf_8EnumBase___pyx_unpickle___Pyx_EnumMeta(CYTHON_UNUSED PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle___Pyx_EnumMeta", 0); /* "(tree fragment)":4 @@ -12024,6 +12377,9 @@ static PyObject *__pyx_unpickle___Pyx_EnumMeta__set_state(struct __pyx_obj___Pyx PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle___Pyx_EnumMeta__set_state", 0); /* "(tree fragment)":12 @@ -12143,9 +12499,9 @@ static void __pyx_tp_dealloc_2wx_3svg_8_nanosvg_SVGimageBase(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_3__dealloc__(o); - --Py_REFCNT(o); + __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); @@ -13558,6 +13914,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_dct, __pyx_k_dct, sizeof(__pyx_k_dct), 0, 0, 1, 1}, {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, + {&__pyx_n_s_do_copy, __pyx_k_do_copy, sizeof(__pyx_k_do_copy), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_dpi, __pyx_k_dpi, sizeof(__pyx_k_dpi), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, @@ -13627,7 +13984,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 113, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 365, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -13648,36 +14005,36 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "wx/svg/_nanosvg.pyx":206 + /* "wx/svg/_nanosvg.pyx":223 * * if not PyObject_CheckBuffer(buf): * raise ValueError("Object does not support the python buffer protocol") # <<<<<<<<<<<<<< * * cdef Py_buffer view */ - __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Object_does_not_support_the_pyth); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_Object_does_not_support_the_pyth); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "wx/svg/_nanosvg.pyx":210 + /* "wx/svg/_nanosvg.pyx":227 * cdef Py_buffer view * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: * raise ValueError("PyObject_GetBuffer failed") # <<<<<<<<<<<<<< * if view.len < height * stride: * PyBuffer_Release(&view) */ - __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_PyObject_GetBuffer_failed); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_PyObject_GetBuffer_failed); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "wx/svg/_nanosvg.pyx":213 + /* "wx/svg/_nanosvg.pyx":230 * if view.len < height * stride: * PyBuffer_Release(&view) * raise ValueError("Buffer object is smaller than height * stride") # <<<<<<<<<<<<<< * * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, view.buf, */ - __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Buffer_object_is_smaller_than_he); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Buffer_object_is_smaller_than_he); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); @@ -13700,14 +14057,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "wx/svg/_nanosvg.pyx":293 + /* "wx/svg/_nanosvg.pyx":310 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGshape") # <<<<<<<<<<<<<< * * @staticmethod */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGshape); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGshape); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); @@ -13730,14 +14087,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "wx/svg/_nanosvg.pyx":438 + /* "wx/svg/_nanosvg.pyx":455 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGpath") # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGpath); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 438, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGpath); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); @@ -13760,36 +14117,36 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - /* "wx/svg/_nanosvg.pyx":524 + /* "wx/svg/_nanosvg.pyx":541 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGpaint") # <<<<<<<<<<<<<< * * @property */ - __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGpaint); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 524, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGpaint); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - /* "wx/svg/_nanosvg.pyx":536 + /* "wx/svg/_nanosvg.pyx":553 * self._check_ptr() * if self.type != SVG_PAINT_COLOR: * raise ValueError("Color not valid in this paint object") # <<<<<<<<<<<<<< * return self._ptr.color * */ - __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_Color_not_valid_in_this_paint_ob); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 536, __pyx_L1_error) + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_Color_not_valid_in_this_paint_ob); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "wx/svg/_nanosvg.pyx":552 + /* "wx/svg/_nanosvg.pyx":569 * self._check_ptr() * if self.type not in [SVG_PAINT_LINEAR_GRADIENT, SVG_PAINT_RADIAL_GRADIENT]: * raise ValueError("Gradient not valid in this paint object") # <<<<<<<<<<<<<< * return SVGgradient.from_ptr(self._ptr.gradient) * */ - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Gradient_not_valid_in_this_paint); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Gradient_not_valid_in_this_paint); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); @@ -13812,14 +14169,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - /* "wx/svg/_nanosvg.pyx":575 + /* "wx/svg/_nanosvg.pyx":592 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGgradient") # <<<<<<<<<<<<<< * * @property */ - __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGgradient); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 575, __pyx_L1_error) + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGgradient); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); @@ -13842,14 +14199,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - /* "wx/svg/_nanosvg.pyx":626 + /* "wx/svg/_nanosvg.pyx":643 * def _check_ptr(self): * if self._ptr == NULL: * raise ValueError("Invalid SVGgradientStop") # <<<<<<<<<<<<<< * * @property */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGgradientStop); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGgradientStop); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); @@ -13980,6 +14337,9 @@ static int __Pyx_modinit_function_export_code(void) { static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGimageBase = &__pyx_vtable_2wx_3svg_8_nanosvg_SVGimageBase; @@ -13999,70 +14359,70 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase = &__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase; __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGshape = &__pyx_vtable_2wx_3svg_8_nanosvg_SVGshape; __pyx_vtable_2wx_3svg_8_nanosvg_SVGshape.from_ptr = (struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *(*)(NSVGshape *))__pyx_f_2wx_3svg_8_nanosvg_8SVGshape_from_ptr; - if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 280, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 297, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg_SVGshape.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2wx_3svg_8_nanosvg_SVGshape.tp_dictoffset && __pyx_type_2wx_3svg_8_nanosvg_SVGshape.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_2wx_3svg_8_nanosvg_SVGshape.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGshape.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 280, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGshape, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 280, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 280, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGshape.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 297, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGshape, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 297, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 297, __pyx_L1_error) __pyx_ptype_2wx_3svg_8_nanosvg_SVGshape = &__pyx_type_2wx_3svg_8_nanosvg_SVGshape; __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpath = &__pyx_vtable_2wx_3svg_8_nanosvg_SVGpath; __pyx_vtable_2wx_3svg_8_nanosvg_SVGpath.from_ptr = (struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *(*)(NSVGpath *))__pyx_f_2wx_3svg_8_nanosvg_7SVGpath_from_ptr; - if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 419, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 436, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg_SVGpath.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2wx_3svg_8_nanosvg_SVGpath.tp_dictoffset && __pyx_type_2wx_3svg_8_nanosvg_SVGpath.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_2wx_3svg_8_nanosvg_SVGpath.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGpath.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 419, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpath, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 419, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 419, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGpath.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 436, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpath, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 436, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 436, __pyx_L1_error) __pyx_ptype_2wx_3svg_8_nanosvg_SVGpath = &__pyx_type_2wx_3svg_8_nanosvg_SVGpath; __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpaint = &__pyx_vtable_2wx_3svg_8_nanosvg_SVGpaint; __pyx_vtable_2wx_3svg_8_nanosvg_SVGpaint.from_ptr = (struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *(*)(NSVGpaint *))__pyx_f_2wx_3svg_8_nanosvg_8SVGpaint_from_ptr; - if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 505, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 522, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg_SVGpaint.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2wx_3svg_8_nanosvg_SVGpaint.tp_dictoffset && __pyx_type_2wx_3svg_8_nanosvg_SVGpaint.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_2wx_3svg_8_nanosvg_SVGpaint.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGpaint.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 505, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpaint, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 505, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 505, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGpaint.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 522, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpaint, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 522, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 522, __pyx_L1_error) __pyx_ptype_2wx_3svg_8_nanosvg_SVGpaint = &__pyx_type_2wx_3svg_8_nanosvg_SVGpaint; __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGgradient = &__pyx_vtable_2wx_3svg_8_nanosvg_SVGgradient; __pyx_vtable_2wx_3svg_8_nanosvg_SVGgradient.from_ptr = (struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *(*)(NSVGgradient *))__pyx_f_2wx_3svg_8_nanosvg_11SVGgradient_from_ptr; - if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 557, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 574, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg_SVGgradient.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2wx_3svg_8_nanosvg_SVGgradient.tp_dictoffset && __pyx_type_2wx_3svg_8_nanosvg_SVGgradient.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_2wx_3svg_8_nanosvg_SVGgradient.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGgradient.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 557, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradient, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 557, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 557, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGgradient.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 574, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradient, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 574, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 574, __pyx_L1_error) __pyx_ptype_2wx_3svg_8_nanosvg_SVGgradient = &__pyx_type_2wx_3svg_8_nanosvg_SVGgradient; __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGgradientStop = &__pyx_vtable_2wx_3svg_8_nanosvg_SVGgradientStop; __pyx_vtable_2wx_3svg_8_nanosvg_SVGgradientStop.from_ptr = (struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *(*)(NSVGgradientStop *))__pyx_f_2wx_3svg_8_nanosvg_15SVGgradientStop_from_ptr; - if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 609, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 626, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop.tp_dictoffset && __pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 609, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradientStop, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 609, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 609, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 626, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradientStop, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 626, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 626, __pyx_L1_error) __pyx_ptype_2wx_3svg_8_nanosvg_SVGgradientStop = &__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop; - if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__) < 0) __PYX_ERR(0, 267, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__) < 0) __PYX_ERR(0, 284, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__.tp_print = 0; #endif @@ -14070,7 +14430,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ = &__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__; - if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__) < 0) __PYX_ERR(0, 407, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__) < 0) __PYX_ERR(0, 424, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__.tp_print = 0; #endif @@ -14078,7 +14438,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ = &__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__; - if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__) < 0) __PYX_ERR(0, 599, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__) < 0) __PYX_ERR(0, 616, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__.tp_print = 0; #endif @@ -14128,17 +14488,19 @@ static int __Pyx_modinit_function_import_code(void) { } -#if PY_MAJOR_VERSION < 3 -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC void -#else +#ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void #endif #else -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyObject * +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif @@ -14225,6 +14587,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__nanosvg(PyObject *__pyx_pyinit_mo PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { @@ -14313,14 +14678,14 @@ if (!__Pyx_RefNanny) { } #endif /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); - if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_type_import_code(); (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); @@ -14389,7 +14754,7 @@ if (!__Pyx_RefNanny) { /* "wx/svg/_nanosvg.pyx":153 * * @classmethod - * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96): # <<<<<<<<<<<<<< + * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96, bint do_copy=True): # <<<<<<<<<<<<<< * """ * Loads an SVG image from a bytes object. */ @@ -14400,7 +14765,7 @@ if (!__Pyx_RefNanny) { * * * @classmethod # <<<<<<<<<<<<<< - * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96): + * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96, bint do_copy=True): * """ */ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) @@ -14512,7 +14877,7 @@ if (!__Pyx_RefNanny) { * for v in cls: * if v == value: */ - __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8EnumBase_14__Pyx_EnumBase_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Pyx_EnumBase___new, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 28, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_EnumBase_1__new__, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_Pyx_EnumBase___new, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__26); if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_new, __pyx_t_5) < 0) __PYX_ERR(1, 28, __pyx_L1_error) @@ -14525,7 +14890,7 @@ if (!__Pyx_RefNanny) { * return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self) * def __str__(self): */ - __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8EnumBase_14__Pyx_EnumBase_3__repr__, 0, __pyx_n_s_Pyx_EnumBase___repr, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 39, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_EnumBase_3__repr__, 0, __pyx_n_s_Pyx_EnumBase___repr, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_repr, __pyx_t_5) < 0) __PYX_ERR(1, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -14537,7 +14902,7 @@ if (!__Pyx_RefNanny) { * return "%s.%s" % (self.__class__.__name__, self.name) * */ - __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8EnumBase_14__Pyx_EnumBase_5__str__, 0, __pyx_n_s_Pyx_EnumBase___str, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 41, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8EnumBase_14__Pyx_EnumBase_5__str__, 0, __pyx_n_s_Pyx_EnumBase___str, NULL, __pyx_n_s_EnumBase, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(1, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -16856,7 +17221,7 @@ static int __Pyx_ParseOptionalKeywords( } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { @@ -16883,7 +17248,7 @@ static int __Pyx_ParseOptionalKeywords( while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -16899,7 +17264,7 @@ static int __Pyx_ParseOptionalKeywords( while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -17691,7 +18056,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { { #if PY_MAJOR_VERSION >= 3 if (level == -1) { - if (strchr(__Pyx_MODULE_NAME, '.')) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { @@ -17826,6 +18191,28 @@ bad: return -1; } +/* PyObjectGetAttrStrNoError */ +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +} + /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; @@ -17871,15 +18258,23 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto __PYX_BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto __PYX_BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } } PyType_Modified((PyTypeObject*)type_obj); } @@ -17979,6 +18374,7 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY if (PyMethodDescr_Check(method)) #else + #if PY_MAJOR_VERSION == 2 static PyTypeObject *methoddescr_type = NULL; if (methoddescr_type == NULL) { PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append"); @@ -17986,6 +18382,9 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } + #else + PyTypeObject *methoddescr_type = &PyMethodDescr_Type; + #endif if (__Pyx_TypeCheck(method, methoddescr_type)) #endif { @@ -18001,18 +18400,9 @@ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { else if (PyMethod_Check(method)) { return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); } - else if (PyCFunction_Check(method)) { + else { return PyClassMethod_New(method); } -#ifdef __Pyx_CyFunction_USED - else if (__Pyx_CyFunction_Check(method)) { - return PyClassMethod_New(method); - } -#endif - PyErr_SetString(PyExc_TypeError, - "Class-level classmethod() can only be called on " - "a method_descriptor or instance method."); - return NULL; } /* GetNameInClass */ @@ -18113,7 +18503,7 @@ bad: goto done; } -/* CythonFunction */ +/* CythonFunctionShared */ #include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) @@ -18420,10 +18810,9 @@ static PyMethodDef __pyx_CyFunction_methods[] = { #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif -static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); - if (op == NULL) +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + if (unlikely(op == NULL)) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; @@ -18444,12 +18833,12 @@ static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int f Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; + op->defaults_size = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; - PyObject_GC_Track(op); return (PyObject *) op; } static int @@ -18697,6 +19086,7 @@ static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; + m->defaults_size = size; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { @@ -18715,6 +19105,19 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, Py Py_INCREF(dict); } +/* CythonFunction */ +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { @@ -18829,7 +19232,7 @@ bad: /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -18933,7 +19336,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; }