diff --git a/demo/SVGImage_Bitmap.py b/demo/SVGImage_Bitmap.py index 29fbff6b..ef119b7a 100644 --- a/demo/SVGImage_Bitmap.py +++ b/demo/SVGImage_Bitmap.py @@ -1,6 +1,9 @@ +import sys import os import glob +import six + import wx from wx.svg import SVGimage @@ -21,6 +24,8 @@ class SVGBitmapDisplay(wx.Panel): def UpdateSVG(self, svg_filename): + if six.PY2 and isinstance(svg_filename, unicode): + svg_filename = svg_filename.encode(sys.getfilesystemencoding()) img = SVGimage.CreateFromFile(svg_filename) bmp = img.ConvertToScaledBitmap(self.bmp_size, self) self.statbmp.SetBitmap(bmp) diff --git a/demo/SVGImage_Render.py b/demo/SVGImage_Render.py index 284098c1..7cafa55f 100644 --- a/demo/SVGImage_Render.py +++ b/demo/SVGImage_Render.py @@ -1,6 +1,9 @@ +import sys import os import glob +import six + import wx from wx.svg import SVGimage @@ -23,6 +26,8 @@ class SVGRenderPanel(wx.Panel): def SetSVGFile(self, svg_filename): + if six.PY2 and isinstance(svg_filename, unicode): + svg_filename = svg_filename.encode(sys.getfilesystemencoding()) self._img = SVGimage.CreateFromFile(svg_filename) self.Refresh() diff --git a/wx/svg/_nanosvg.c b/wx/svg/_nanosvg.c index b1f970df..8daff2c2 100644 --- a/wx/svg/_nanosvg.c +++ b/wx/svg/_nanosvg.c @@ -853,7 +853,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__; struct __pyx_obj___Pyx_EnumMeta; struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr; -/* "wx/svg/_nanosvg.pyx":53 +/* "wx/svg/_nanosvg.pyx":55 * # Replicate the C enums and values for Python, dropping the leading 'N' * * cpdef enum SVGpaintType: # <<<<<<<<<<<<<< @@ -862,7 +862,7 @@ struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr; */ enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType { - /* "wx/svg/_nanosvg.pyx":57 + /* "wx/svg/_nanosvg.pyx":59 * SVG_PAINT_COLOR = NSVG_PAINT_COLOR * SVG_PAINT_LINEAR_GRADIENT = NSVG_PAINT_LINEAR_GRADIENT * SVG_PAINT_RADIAL_GRADIENT = NSVG_PAINT_RADIAL_GRADIENT # <<<<<<<<<<<<<< @@ -875,7 +875,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType { __pyx_e_2wx_3svg_8_nanosvg_SVG_PAINT_RADIAL_GRADIENT = NSVG_PAINT_RADIAL_GRADIENT }; -/* "wx/svg/_nanosvg.pyx":59 +/* "wx/svg/_nanosvg.pyx":61 * SVG_PAINT_RADIAL_GRADIENT = NSVG_PAINT_RADIAL_GRADIENT * * cpdef enum SVGspreadType: # <<<<<<<<<<<<<< @@ -884,7 +884,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType { */ enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType { - /* "wx/svg/_nanosvg.pyx":62 + /* "wx/svg/_nanosvg.pyx":64 * SVG_SPREAD_PAD = NSVG_SPREAD_PAD * SVG_SPREAD_REFLECT = NSVG_SPREAD_REFLECT * SVG_SPREAD_REPEAT = NSVG_SPREAD_REPEAT # <<<<<<<<<<<<<< @@ -896,7 +896,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType { __pyx_e_2wx_3svg_8_nanosvg_SVG_SPREAD_REPEAT = NSVG_SPREAD_REPEAT }; -/* "wx/svg/_nanosvg.pyx":64 +/* "wx/svg/_nanosvg.pyx":66 * SVG_SPREAD_REPEAT = NSVG_SPREAD_REPEAT * * cpdef enum SVGlineJoin: # <<<<<<<<<<<<<< @@ -905,7 +905,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType { */ enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin { - /* "wx/svg/_nanosvg.pyx":67 + /* "wx/svg/_nanosvg.pyx":69 * SVG_JOIN_MITER = NSVG_JOIN_MITER * SVG_JOIN_ROUND = NSVG_JOIN_ROUND * SVG_JOIN_BEVEL = NSVG_JOIN_BEVEL # <<<<<<<<<<<<<< @@ -917,7 +917,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin { __pyx_e_2wx_3svg_8_nanosvg_SVG_JOIN_BEVEL = NSVG_JOIN_BEVEL }; -/* "wx/svg/_nanosvg.pyx":69 +/* "wx/svg/_nanosvg.pyx":71 * SVG_JOIN_BEVEL = NSVG_JOIN_BEVEL * * cpdef enum SVGlineCap: # <<<<<<<<<<<<<< @@ -926,7 +926,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin { */ enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap { - /* "wx/svg/_nanosvg.pyx":72 + /* "wx/svg/_nanosvg.pyx":74 * SVG_CAP_BUTT = NSVG_CAP_BUTT * SVG_CAP_ROUND = NSVG_CAP_ROUND * SVG_CAP_SQUARE = NSVG_CAP_SQUARE # <<<<<<<<<<<<<< @@ -938,7 +938,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap { __pyx_e_2wx_3svg_8_nanosvg_SVG_CAP_SQUARE = NSVG_CAP_SQUARE }; -/* "wx/svg/_nanosvg.pyx":74 +/* "wx/svg/_nanosvg.pyx":76 * SVG_CAP_SQUARE = NSVG_CAP_SQUARE * * cpdef enum SVGfillRule: # <<<<<<<<<<<<<< @@ -947,7 +947,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap { */ enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule { - /* "wx/svg/_nanosvg.pyx":76 + /* "wx/svg/_nanosvg.pyx":78 * cpdef enum SVGfillRule: * SVG_FILLRULE_NONZERO = NSVG_FILLRULE_NONZERO * SVG_FILLRULE_EVENODD = NSVG_FILLRULE_EVENODD # <<<<<<<<<<<<<< @@ -958,7 +958,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule { __pyx_e_2wx_3svg_8_nanosvg_SVG_FILLRULE_EVENODD = NSVG_FILLRULE_EVENODD }; -/* "wx/svg/_nanosvg.pyx":78 +/* "wx/svg/_nanosvg.pyx":80 * SVG_FILLRULE_EVENODD = NSVG_FILLRULE_EVENODD * * cpdef enum SVGflags: # <<<<<<<<<<<<<< @@ -967,7 +967,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule { */ enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags { - /* "wx/svg/_nanosvg.pyx":79 + /* "wx/svg/_nanosvg.pyx":81 * * cpdef enum SVGflags: * SVG_FLAGS_VISIBLE = NSVG_FLAGS_VISIBLE # <<<<<<<<<<<<<< @@ -977,7 +977,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags { __pyx_e_2wx_3svg_8_nanosvg_SVG_FLAGS_VISIBLE = NSVG_FLAGS_VISIBLE }; -/* "wx/svg/_nanosvg.pyx":113 +/* "wx/svg/_nanosvg.pyx":115 * raise ValueError("SVG not yet loaded") * * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): # <<<<<<<<<<<<<< @@ -989,7 +989,7 @@ struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr { PyObject *errmsg; }; -/* "wx/svg/_nanosvg.pyx":85 +/* "wx/svg/_nanosvg.pyx":87 * # Cython classes for wrapping the nanosvg structs * * cdef class SVGimageBase: # <<<<<<<<<<<<<< @@ -1004,7 +1004,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase { }; -/* "wx/svg/_nanosvg.pyx":276 +/* "wx/svg/_nanosvg.pyx":280 * #---------------------------------------------------------------------------- * * cdef class SVGshape: # <<<<<<<<<<<<<< @@ -1018,7 +1018,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape { }; -/* "wx/svg/_nanosvg.pyx":415 +/* "wx/svg/_nanosvg.pyx":419 * * #---------------------------------------------------------------------------- * cdef class SVGpath: # <<<<<<<<<<<<<< @@ -1032,7 +1032,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath { }; -/* "wx/svg/_nanosvg.pyx":501 +/* "wx/svg/_nanosvg.pyx":505 * * #---------------------------------------------------------------------------- * cdef class SVGpaint: # <<<<<<<<<<<<<< @@ -1046,7 +1046,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint { }; -/* "wx/svg/_nanosvg.pyx":553 +/* "wx/svg/_nanosvg.pyx":557 * * #---------------------------------------------------------------------------- * cdef class SVGgradient: # <<<<<<<<<<<<<< @@ -1060,7 +1060,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient { }; -/* "wx/svg/_nanosvg.pyx":605 +/* "wx/svg/_nanosvg.pyx":609 * * #---------------------------------------------------------------------------- * cdef class SVGgradientStop: # <<<<<<<<<<<<<< @@ -1074,7 +1074,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop { }; -/* "wx/svg/_nanosvg.pyx":263 +/* "wx/svg/_nanosvg.pyx":267 * * @property * def shapes(self): # <<<<<<<<<<<<<< @@ -1088,7 +1088,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ { }; -/* "wx/svg/_nanosvg.pyx":403 +/* "wx/svg/_nanosvg.pyx":407 * * @property * def paths(self): # <<<<<<<<<<<<<< @@ -1102,7 +1102,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ { }; -/* "wx/svg/_nanosvg.pyx":595 +/* "wx/svg/_nanosvg.pyx":599 * * @property * def stops(self): # <<<<<<<<<<<<<< @@ -1132,7 +1132,7 @@ struct __pyx_obj___Pyx_EnumMeta { -/* "wx/svg/_nanosvg.pyx":85 +/* "wx/svg/_nanosvg.pyx":87 * # Cython classes for wrapping the nanosvg structs * * cdef class SVGimageBase: # <<<<<<<<<<<<<< @@ -1148,7 +1148,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":276 +/* "wx/svg/_nanosvg.pyx":280 * #---------------------------------------------------------------------------- * * cdef class SVGshape: # <<<<<<<<<<<<<< @@ -1162,7 +1162,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":415 +/* "wx/svg/_nanosvg.pyx":419 * * #---------------------------------------------------------------------------- * cdef class SVGpath: # <<<<<<<<<<<<<< @@ -1176,7 +1176,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":501 +/* "wx/svg/_nanosvg.pyx":505 * * #---------------------------------------------------------------------------- * cdef class SVGpaint: # <<<<<<<<<<<<<< @@ -1190,7 +1190,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":553 +/* "wx/svg/_nanosvg.pyx":557 * * #---------------------------------------------------------------------------- * cdef class SVGgradient: # <<<<<<<<<<<<<< @@ -1204,7 +1204,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":605 +/* "wx/svg/_nanosvg.pyx":609 * * #---------------------------------------------------------------------------- * cdef class SVGgradientStop: # <<<<<<<<<<<<<< @@ -1598,6 +1598,9 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable); /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + /* ClassMethod.proto */ #include "descrobject.h" static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); @@ -1712,6 +1715,9 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); @@ -1721,9 +1727,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value); -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType value); @@ -1917,6 +1920,7 @@ static const char __pyx_k_id[] = "id"; static const char __pyx_k_px[] = "px"; static const char __pyx_k_tx[] = "tx"; static const char __pyx_k_ty[] = "ty"; +static const char __pyx_k_PY2[] = "PY2"; static const char __pyx_k_buf[] = "buf"; static const char __pyx_k_cls[] = "cls"; static const char __pyx_k_dct[] = "dct"; @@ -2000,6 +2004,7 @@ static const char __pyx_k_SVGimageBase[] = "SVGimageBase"; static const char __pyx_k_SVGpaintType[] = "SVGpaintType"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; static const char __pyx_k_stringsource[] = "stringsource"; +static const char __pyx_k_version_info[] = "version_info"; static const char __pyx_k_SVG_CAP_ROUND[] = "SVG_CAP_ROUND"; static const char __pyx_k_SVGspreadType[] = "SVGspreadType"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; @@ -2072,6 +2077,7 @@ static PyObject *__pyx_kp_s_Invalid_SVGpath; static PyObject *__pyx_kp_s_Invalid_SVGshape; static PyObject *__pyx_kp_s_Object_does_not_support_the_pyth; static PyObject *__pyx_n_s_OrderedDict; +static PyObject *__pyx_n_s_PY2; static PyObject *__pyx_n_s_PickleError; static PyObject *__pyx_kp_s_PyObject_GetBuffer_failed; static PyObject *__pyx_n_s_Pyx_EnumBase; @@ -2197,6 +2203,7 @@ static PyObject *__pyx_kp_s_utf_8; static PyObject *__pyx_n_s_v; static PyObject *__pyx_n_s_value; static PyObject *__pyx_n_s_values; +static PyObject *__pyx_n_s_version_info; static PyObject *__pyx_n_s_width; 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 */ @@ -2334,7 +2341,7 @@ static PyObject *__pyx_codeobj__30; static PyObject *__pyx_codeobj__32; /* Late includes */ -/* "wx/svg/_nanosvg.pyx":99 +/* "wx/svg/_nanosvg.pyx":101 * cdef NSVGrasterizer *_rasterizer * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -2363,7 +2370,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase___cinit__(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "wx/svg/_nanosvg.pyx":100 + /* "wx/svg/_nanosvg.pyx":102 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -2372,7 +2379,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase___cinit__(struct __pyx_obj */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":101 + /* "wx/svg/_nanosvg.pyx":103 * def __cinit__(self): * self._ptr = NULL * self._rasterizer = NULL # <<<<<<<<<<<<<< @@ -2381,7 +2388,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase___cinit__(struct __pyx_obj */ __pyx_v_self->_rasterizer = NULL; - /* "wx/svg/_nanosvg.pyx":99 + /* "wx/svg/_nanosvg.pyx":101 * cdef NSVGrasterizer *_rasterizer * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -2395,7 +2402,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase___cinit__(struct __pyx_obj return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":103 +/* "wx/svg/_nanosvg.pyx":105 * self._rasterizer = NULL * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -2419,7 +2426,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "wx/svg/_nanosvg.pyx":104 + /* "wx/svg/_nanosvg.pyx":106 * * def __dealloc__(self): * if self._ptr != NULL: # <<<<<<<<<<<<<< @@ -2429,7 +2436,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0); if (__pyx_t_1) { - /* "wx/svg/_nanosvg.pyx":105 + /* "wx/svg/_nanosvg.pyx":107 * def __dealloc__(self): * if self._ptr != NULL: * nsvgDelete(self._ptr) # <<<<<<<<<<<<<< @@ -2438,7 +2445,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx */ nsvgDelete(__pyx_v_self->_ptr); - /* "wx/svg/_nanosvg.pyx":104 + /* "wx/svg/_nanosvg.pyx":106 * * def __dealloc__(self): * if self._ptr != NULL: # <<<<<<<<<<<<<< @@ -2447,7 +2454,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx */ } - /* "wx/svg/_nanosvg.pyx":106 + /* "wx/svg/_nanosvg.pyx":108 * if self._ptr != NULL: * nsvgDelete(self._ptr) * if self._rasterizer != NULL: # <<<<<<<<<<<<<< @@ -2457,7 +2464,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx __pyx_t_1 = ((__pyx_v_self->_rasterizer != NULL) != 0); if (__pyx_t_1) { - /* "wx/svg/_nanosvg.pyx":107 + /* "wx/svg/_nanosvg.pyx":109 * nsvgDelete(self._ptr) * if self._rasterizer != NULL: * nsvgDeleteRasterizer(self._rasterizer) # <<<<<<<<<<<<<< @@ -2466,7 +2473,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx */ nsvgDeleteRasterizer(__pyx_v_self->_rasterizer); - /* "wx/svg/_nanosvg.pyx":106 + /* "wx/svg/_nanosvg.pyx":108 * if self._ptr != NULL: * nsvgDelete(self._ptr) * if self._rasterizer != NULL: # <<<<<<<<<<<<<< @@ -2475,7 +2482,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx */ } - /* "wx/svg/_nanosvg.pyx":103 + /* "wx/svg/_nanosvg.pyx":105 * self._rasterizer = NULL * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -2487,7 +2494,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx __Pyx_RefNannyFinishContext(); } -/* "wx/svg/_nanosvg.pyx":109 +/* "wx/svg/_nanosvg.pyx":111 * nsvgDeleteRasterizer(self._rasterizer) * * cdef _check_ptr(self): # <<<<<<<<<<<<<< @@ -2502,7 +2509,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__check_ptr(struct __p PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":110 + /* "wx/svg/_nanosvg.pyx":112 * * cdef _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -2512,20 +2519,20 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__check_ptr(struct __p __pyx_t_1 = ((__pyx_v_self->_ptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "wx/svg/_nanosvg.pyx":111 + /* "wx/svg/_nanosvg.pyx":113 * cdef _check_ptr(self): * if self._ptr == NULL: * raise ValueError("SVG not yet loaded") # <<<<<<<<<<<<<< * * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __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, 111, __pyx_L1_error) + __PYX_ERR(0, 113, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":110 + /* "wx/svg/_nanosvg.pyx":112 * * cdef _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -2534,7 +2541,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__check_ptr(struct __p */ } - /* "wx/svg/_nanosvg.pyx":109 + /* "wx/svg/_nanosvg.pyx":111 * nsvgDeleteRasterizer(self._rasterizer) * * cdef _check_ptr(self): # <<<<<<<<<<<<<< @@ -2555,7 +2562,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__check_ptr(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":113 +/* "wx/svg/_nanosvg.pyx":115 * raise ValueError("SVG not yet loaded") * * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): # <<<<<<<<<<<<<< @@ -2576,7 +2583,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx } } - /* "wx/svg/_nanosvg.pyx":114 + /* "wx/svg/_nanosvg.pyx":116 * * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): * if self._ptr != NULL: # <<<<<<<<<<<<<< @@ -2586,7 +2593,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx __pyx_t_1 = ((__pyx_v_self->_ptr != NULL) != 0); if (__pyx_t_1) { - /* "wx/svg/_nanosvg.pyx":115 + /* "wx/svg/_nanosvg.pyx":117 * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): * if self._ptr != NULL: * nsvgDelete(self._ptr) # <<<<<<<<<<<<<< @@ -2595,7 +2602,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx */ nsvgDelete(__pyx_v_self->_ptr); - /* "wx/svg/_nanosvg.pyx":114 + /* "wx/svg/_nanosvg.pyx":116 * * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): * if self._ptr != NULL: # <<<<<<<<<<<<<< @@ -2604,7 +2611,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx */ } - /* "wx/svg/_nanosvg.pyx":116 + /* "wx/svg/_nanosvg.pyx":118 * if self._ptr != NULL: * nsvgDelete(self._ptr) * if self._rasterizer != NULL: # <<<<<<<<<<<<<< @@ -2614,7 +2621,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx __pyx_t_1 = ((__pyx_v_self->_rasterizer != NULL) != 0); if (__pyx_t_1) { - /* "wx/svg/_nanosvg.pyx":117 + /* "wx/svg/_nanosvg.pyx":119 * nsvgDelete(self._ptr) * if self._rasterizer != NULL: * nsvgDeleteRasterizer(self._rasterizer) # <<<<<<<<<<<<<< @@ -2623,7 +2630,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx */ nsvgDeleteRasterizer(__pyx_v_self->_rasterizer); - /* "wx/svg/_nanosvg.pyx":118 + /* "wx/svg/_nanosvg.pyx":120 * if self._rasterizer != NULL: * nsvgDeleteRasterizer(self._rasterizer) * self._rasterizer = NULL # <<<<<<<<<<<<<< @@ -2632,7 +2639,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx */ __pyx_v_self->_rasterizer = NULL; - /* "wx/svg/_nanosvg.pyx":116 + /* "wx/svg/_nanosvg.pyx":118 * if self._ptr != NULL: * nsvgDelete(self._ptr) * if self._rasterizer != NULL: # <<<<<<<<<<<<<< @@ -2641,7 +2648,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx */ } - /* "wx/svg/_nanosvg.pyx":119 + /* "wx/svg/_nanosvg.pyx":121 * nsvgDeleteRasterizer(self._rasterizer) * self._rasterizer = NULL * if ptr == NULL: # <<<<<<<<<<<<<< @@ -2651,20 +2658,20 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx __pyx_t_1 = ((__pyx_v_ptr == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "wx/svg/_nanosvg.pyx":120 + /* "wx/svg/_nanosvg.pyx":122 * self._rasterizer = NULL * if ptr == NULL: * raise ValueError(errmsg) # <<<<<<<<<<<<<< * self._ptr = ptr * */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_v_errmsg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_v_errmsg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __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, 120, __pyx_L1_error) + __PYX_ERR(0, 122, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":119 + /* "wx/svg/_nanosvg.pyx":121 * nsvgDeleteRasterizer(self._rasterizer) * self._rasterizer = NULL * if ptr == NULL: # <<<<<<<<<<<<<< @@ -2673,7 +2680,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx */ } - /* "wx/svg/_nanosvg.pyx":121 + /* "wx/svg/_nanosvg.pyx":123 * if ptr == NULL: * raise ValueError(errmsg) * self._ptr = ptr # <<<<<<<<<<<<<< @@ -2682,7 +2689,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx */ __pyx_v_self->_ptr = __pyx_v_ptr; - /* "wx/svg/_nanosvg.pyx":113 + /* "wx/svg/_nanosvg.pyx":115 * raise ValueError("SVG not yet loaded") * * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): # <<<<<<<<<<<<<< @@ -2703,7 +2710,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":125 +/* "wx/svg/_nanosvg.pyx":127 * * @staticmethod * cdef SVGimageBase from_ptr(NSVGimage *ptr): # <<<<<<<<<<<<<< @@ -2718,19 +2725,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_f_2wx_3svg_8_nano PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":126 + /* "wx/svg/_nanosvg.pyx":128 * @staticmethod * cdef SVGimageBase from_ptr(NSVGimage *ptr): * obj = SVGimageBase() # <<<<<<<<<<<<<< * obj._ptr = ptr * return obj */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_obj = ((struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":127 + /* "wx/svg/_nanosvg.pyx":129 * cdef SVGimageBase from_ptr(NSVGimage *ptr): * obj = SVGimageBase() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -2739,7 +2746,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_f_2wx_3svg_8_nano */ __pyx_v_obj->_ptr = __pyx_v_ptr; - /* "wx/svg/_nanosvg.pyx":128 + /* "wx/svg/_nanosvg.pyx":130 * obj = SVGimageBase() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -2751,7 +2758,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_f_2wx_3svg_8_nano __pyx_r = __pyx_v_obj; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":125 + /* "wx/svg/_nanosvg.pyx":127 * * @staticmethod * cdef SVGimageBase from_ptr(NSVGimage *ptr): # <<<<<<<<<<<<<< @@ -2771,7 +2778,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_f_2wx_3svg_8_nano return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":132 +/* "wx/svg/_nanosvg.pyx":134 * * @classmethod * def CreateFromFile(cls, str filename, str units='px', float dpi=96): # <<<<<<<<<<<<<< @@ -2825,7 +2832,7 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_5CreateFromFile(PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "CreateFromFile") < 0)) __PYX_ERR(0, 132, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "CreateFromFile") < 0)) __PYX_ERR(0, 134, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -2841,21 +2848,21 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_5CreateFromFile(PyOb __pyx_v_filename = ((PyObject*)values[0]); __pyx_v_units = ((PyObject*)values[1]); if (values[2]) { - __pyx_v_dpi = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_dpi == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L3_error) + __pyx_v_dpi = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_dpi == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L3_error) } else { __pyx_v_dpi = ((float)96.0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("CreateFromFile", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 132, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("CreateFromFile", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 134, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.CreateFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyString_Type), 1, "filename", 1))) __PYX_ERR(0, 132, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_units), (&PyString_Type), 1, "units", 1))) __PYX_ERR(0, 132, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyString_Type), 1, "filename", 1))) __PYX_ERR(0, 134, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_units), (&PyString_Type), 1, "units", 1))) __PYX_ERR(0, 134, __pyx_L1_error) __pyx_r = __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(((PyTypeObject*)__pyx_v_cls), __pyx_v_filename, __pyx_v_units, __pyx_v_dpi); /* function exit code */ @@ -2869,6 +2876,7 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_5CreateFromFile(PyOb 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) { PyObject *__pyx_v_name = NULL; + PyObject *__pyx_v_units_b = NULL; struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_v_img = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2877,20 +2885,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy PyObject *__pyx_t_3 = NULL; char const *__pyx_t_4; char const *__pyx_t_5; - PyObject *__pyx_t_6 = NULL; - struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr __pyx_t_7; + struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr __pyx_t_6; __Pyx_RefNannySetupContext("CreateFromFile", 0); - /* "wx/svg/_nanosvg.pyx":142 + /* "wx/svg/_nanosvg.pyx":144 * :rtype: An instance of ``cls`` (usually a :class:`SVGimage`) * """ * name = filename.encode(sys.getfilesystemencoding()) # <<<<<<<<<<<<<< + * units_b = units.encode('utf-8') * cdef SVGimageBase img = cls() - * img._set_ptr(nsvgParseFromFile(name, bytes(units, 'utf-8'), dpi), */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -2905,92 +2912,92 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_filename, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_filename, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_name = __pyx_t_3; __pyx_t_3 = 0; - /* "wx/svg/_nanosvg.pyx":143 + /* "wx/svg/_nanosvg.pyx":145 * """ * name = filename.encode(sys.getfilesystemencoding()) + * units_b = units.encode('utf-8') # <<<<<<<<<<<<<< + * cdef SVGimageBase img = cls() + * img._set_ptr(nsvgParseFromFile(name, units_b, dpi), + */ + __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, 145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_units_b = __pyx_t_3; + __pyx_t_3 = 0; + + /* "wx/svg/_nanosvg.pyx":146 + * name = filename.encode(sys.getfilesystemencoding()) + * units_b = units.encode('utf-8') * cdef SVGimageBase img = cls() # <<<<<<<<<<<<<< - * img._set_ptr(nsvgParseFromFile(name, bytes(units, 'utf-8'), dpi), + * img._set_ptr(nsvgParseFromFile(name, units_b, dpi), * 'Unable to parse SVG file {}'.format(filename)) */ - __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __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, 143, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase))))) __PYX_ERR(0, 146, __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":144 - * name = filename.encode(sys.getfilesystemencoding()) + /* "wx/svg/_nanosvg.pyx":147 + * units_b = units.encode('utf-8') * cdef SVGimageBase img = cls() - * img._set_ptr(nsvgParseFromFile(name, bytes(units, 'utf-8'), dpi), # <<<<<<<<<<<<<< + * img._set_ptr(nsvgParseFromFile(name, units_b, dpi), # <<<<<<<<<<<<<< * 'Unable to parse SVG file {}'.format(filename)) * return img */ - __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error) - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v_units); - __Pyx_GIVEREF(__pyx_v_units); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_units); - __Pyx_INCREF(__pyx_kp_s_utf_8); - __Pyx_GIVEREF(__pyx_kp_s_utf_8); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_units_b); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":145 + /* "wx/svg/_nanosvg.pyx":148 * cdef SVGimageBase img = cls() - * img._set_ptr(nsvgParseFromFile(name, bytes(units, 'utf-8'), dpi), + * img._set_ptr(nsvgParseFromFile(name, units_b, dpi), * 'Unable to parse SVG file {}'.format(filename)) # <<<<<<<<<<<<<< * return img * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_parse_SVG_file, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Unable_to_parse_SVG_file, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } - __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_filename); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 148, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":144 - * name = filename.encode(sys.getfilesystemencoding()) + /* "wx/svg/_nanosvg.pyx":147 + * units_b = units.encode('utf-8') * cdef SVGimageBase img = cls() - * img._set_ptr(nsvgParseFromFile(name, bytes(units, 'utf-8'), dpi), # <<<<<<<<<<<<<< + * img._set_ptr(nsvgParseFromFile(name, units_b, dpi), # <<<<<<<<<<<<<< * 'Unable to parse SVG file {}'.format(filename)) * return img */ - __pyx_t_7.__pyx_n = 1; - __pyx_t_7.errmsg = ((PyObject*)__pyx_t_3); - __pyx_t_2 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_img->__pyx_vtab)->_set_ptr(__pyx_v_img, nsvgParseFromFile(__pyx_t_4, __pyx_t_5, __pyx_v_dpi), &__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6.__pyx_n = 1; + __pyx_t_6.errmsg = ((PyObject*)__pyx_t_3); + __pyx_t_1 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_img->__pyx_vtab)->_set_ptr(__pyx_v_img, nsvgParseFromFile(__pyx_t_4, __pyx_t_5, __pyx_v_dpi), &__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":146 - * img._set_ptr(nsvgParseFromFile(name, bytes(units, 'utf-8'), dpi), + /* "wx/svg/_nanosvg.pyx":149 + * img._set_ptr(nsvgParseFromFile(name, units_b, dpi), * 'Unable to parse SVG file {}'.format(filename)) * return img # <<<<<<<<<<<<<< * @@ -3001,7 +3008,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy __pyx_r = ((PyObject *)__pyx_v_img); goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":132 + /* "wx/svg/_nanosvg.pyx":134 * * @classmethod * def CreateFromFile(cls, str filename, str units='px', float dpi=96): # <<<<<<<<<<<<<< @@ -3014,18 +3021,18 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.CreateFromFile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name); + __Pyx_XDECREF(__pyx_v_units_b); __Pyx_XDECREF((PyObject *)__pyx_v_img); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":150 +/* "wx/svg/_nanosvg.pyx":153 * * @classmethod * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96): # <<<<<<<<<<<<<< @@ -3079,7 +3086,7 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_7CreateFromBytes(PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "CreateFromBytes") < 0)) __PYX_ERR(0, 150, __pyx_L3_error) + 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)) { @@ -3095,21 +3102,21 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_7CreateFromBytes(PyO __pyx_v_buffer = ((PyObject*)values[0]); __pyx_v_units = ((PyObject*)values[1]); if (values[2]) { - __pyx_v_dpi = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_dpi == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L3_error) + __pyx_v_dpi = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_dpi == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L3_error) } else { __pyx_v_dpi = ((float)96.0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("CreateFromBytes", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 150, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("CreateFromBytes", 0, 1, 3, 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(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), (&PyBytes_Type), 1, "buffer", 1))) __PYX_ERR(0, 150, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_units), (&PyString_Type), 1, "units", 1))) __PYX_ERR(0, 150, __pyx_L1_error) + 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); /* function exit code */ @@ -3122,62 +3129,62 @@ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_7CreateFromBytes(PyO } 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) { + 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; - PyObject *__pyx_t_3 = NULL; - char const *__pyx_t_4; - struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr __pyx_t_5; + char const *__pyx_t_3; + struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr __pyx_t_4; __Pyx_RefNannySetupContext("CreateFromBytes", 0); - /* "wx/svg/_nanosvg.pyx":160 + /* "wx/svg/_nanosvg.pyx":163 * :rtype: An instance of ``cls`` (usually a :class:`SVGimage`) * """ + * 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; + + /* "wx/svg/_nanosvg.pyx":164 + * """ + * units_b = units.encode('utf-8') * cdef SVGimageBase img = cls() # <<<<<<<<<<<<<< - * img._set_ptr(nsvgParse(buffer, bytes(units, 'utf-8'), dpi), + * 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, 160, __pyx_L1_error) + __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, 160, __pyx_L1_error) + 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; - /* "wx/svg/_nanosvg.pyx":161 - * """ + /* "wx/svg/_nanosvg.pyx":165 + * units_b = units.encode('utf-8') * cdef SVGimageBase img = cls() - * img._set_ptr(nsvgParse(buffer, bytes(units, 'utf-8'), dpi), # <<<<<<<<<<<<<< + * img._set_ptr(nsvgParse(buffer, units_b, dpi), # <<<<<<<<<<<<<< * 'Unable to parse SVG buffer') * return img */ if (unlikely(__pyx_v_buffer == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 161, __pyx_L1_error) + __PYX_ERR(0, 165, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_buffer); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L1_error) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __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_INCREF(__pyx_v_units); - __Pyx_GIVEREF(__pyx_v_units); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_units); - __Pyx_INCREF(__pyx_kp_s_utf_8); - __Pyx_GIVEREF(__pyx_kp_s_utf_8); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s_utf_8); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyBytes_AsString(__pyx_t_3); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L1_error) - __pyx_t_5.__pyx_n = 1; - __pyx_t_5.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_4, __pyx_v_dpi), &__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":163 - * img._set_ptr(nsvgParse(buffer, bytes(units, 'utf-8'), dpi), + /* "wx/svg/_nanosvg.pyx":167 + * img._set_ptr(nsvgParse(buffer, units_b, dpi), * 'Unable to parse SVG buffer') * return img # <<<<<<<<<<<<<< * @@ -3188,7 +3195,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyT __pyx_r = ((PyObject *)__pyx_v_img); goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":150 + /* "wx/svg/_nanosvg.pyx":153 * * @classmethod * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96): # <<<<<<<<<<<<<< @@ -3199,17 +3206,17 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyT /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __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_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":166 +/* "wx/svg/_nanosvg.pyx":170 * * * def __repr__(self) -> str: # <<<<<<<<<<<<<< @@ -3243,7 +3250,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "wx/svg/_nanosvg.pyx":167 + /* "wx/svg/_nanosvg.pyx":171 * * def __repr__(self) -> str: * if self._ptr: # <<<<<<<<<<<<<< @@ -3253,7 +3260,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":168 + /* "wx/svg/_nanosvg.pyx":172 * def __repr__(self) -> str: * if self._ptr: * return "SVGimageBase: size ({}, {})".format(self.width, self.height) # <<<<<<<<<<<<<< @@ -3261,11 +3268,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, 168, __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, 172, __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, 168, __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, 172, __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, 168, __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, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -3282,7 +3289,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, 168, __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, 172, __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; @@ -3292,7 +3299,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, 168, __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, 172, __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; @@ -3300,7 +3307,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, 168, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 172, __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; @@ -3311,7 +3318,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, 168, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -3320,7 +3327,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":167 + /* "wx/svg/_nanosvg.pyx":171 * * def __repr__(self) -> str: * if self._ptr: # <<<<<<<<<<<<<< @@ -3329,7 +3336,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p */ } - /* "wx/svg/_nanosvg.pyx":170 + /* "wx/svg/_nanosvg.pyx":174 * return "SVGimageBase: size ({}, {})".format(self.width, self.height) * else: * return "SVGimageBase: " # <<<<<<<<<<<<<< @@ -3343,7 +3350,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p goto __pyx_L0; } - /* "wx/svg/_nanosvg.pyx":166 + /* "wx/svg/_nanosvg.pyx":170 * * * def __repr__(self) -> str: # <<<<<<<<<<<<<< @@ -3367,7 +3374,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":173 +/* "wx/svg/_nanosvg.pyx":177 * * * def RasterizeToBuffer(self, object buf, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< @@ -3456,7 +3463,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, 173, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "RasterizeToBuffer") < 0)) __PYX_ERR(0, 177, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3479,39 +3486,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, 173, __pyx_L3_error) + __pyx_v_tx = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_tx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __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, 173, __pyx_L3_error) + __pyx_v_ty = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_ty == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __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, 173, __pyx_L3_error) + __pyx_v_scale = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_scale == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 177, __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, 174, __pyx_L3_error) + __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) } 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, 174, __pyx_L3_error) + __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) } 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, 174, __pyx_L3_error) + __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) } 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, 173, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("RasterizeToBuffer", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 177, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.RasterizeToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3533,18 +3540,18 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( int __pyx_t_3; __Pyx_RefNannySetupContext("RasterizeToBuffer", 0); - /* "wx/svg/_nanosvg.pyx":190 + /* "wx/svg/_nanosvg.pyx":194 * :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, 190, __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, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":191 + /* "wx/svg/_nanosvg.pyx":195 * """ * self._check_ptr() * if self._rasterizer == NULL: # <<<<<<<<<<<<<< @@ -3554,7 +3561,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":192 + /* "wx/svg/_nanosvg.pyx":196 * self._check_ptr() * if self._rasterizer == NULL: * self._rasterizer = nsvgCreateRasterizer() # <<<<<<<<<<<<<< @@ -3563,7 +3570,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ __pyx_v_self->_rasterizer = nsvgCreateRasterizer(); - /* "wx/svg/_nanosvg.pyx":191 + /* "wx/svg/_nanosvg.pyx":195 * """ * self._check_ptr() * if self._rasterizer == NULL: # <<<<<<<<<<<<<< @@ -3572,7 +3579,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":194 + /* "wx/svg/_nanosvg.pyx":198 * self._rasterizer = nsvgCreateRasterizer() * * if width == -1: # <<<<<<<<<<<<<< @@ -3582,20 +3589,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":195 + /* "wx/svg/_nanosvg.pyx":199 * * 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, 195, __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, 199, __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, 195, __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, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_width = __pyx_t_3; - /* "wx/svg/_nanosvg.pyx":194 + /* "wx/svg/_nanosvg.pyx":198 * self._rasterizer = nsvgCreateRasterizer() * * if width == -1: # <<<<<<<<<<<<<< @@ -3604,7 +3611,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":196 + /* "wx/svg/_nanosvg.pyx":200 * if width == -1: * width = self.width * if height == -1: # <<<<<<<<<<<<<< @@ -3614,20 +3621,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":197 + /* "wx/svg/_nanosvg.pyx":201 * 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, 197, __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, 201, __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, 197, __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, 201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_height = __pyx_t_3; - /* "wx/svg/_nanosvg.pyx":196 + /* "wx/svg/_nanosvg.pyx":200 * if width == -1: * width = self.width * if height == -1: # <<<<<<<<<<<<<< @@ -3636,7 +3643,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":198 + /* "wx/svg/_nanosvg.pyx":202 * if height == -1: * height = self.height * if stride == -1: # <<<<<<<<<<<<<< @@ -3646,7 +3653,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":199 + /* "wx/svg/_nanosvg.pyx":203 * height = self.height * if stride == -1: * stride = width * 4; # <<<<<<<<<<<<<< @@ -3655,7 +3662,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ __pyx_v_stride = (__pyx_v_width * 4); - /* "wx/svg/_nanosvg.pyx":198 + /* "wx/svg/_nanosvg.pyx":202 * if height == -1: * height = self.height * if stride == -1: # <<<<<<<<<<<<<< @@ -3664,7 +3671,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":201 + /* "wx/svg/_nanosvg.pyx":205 * stride = width * 4; * * if not PyObject_CheckBuffer(buf): # <<<<<<<<<<<<<< @@ -3674,20 +3681,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":202 + /* "wx/svg/_nanosvg.pyx":206 * * 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, 202, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 202, __pyx_L1_error) + __PYX_ERR(0, 206, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":201 + /* "wx/svg/_nanosvg.pyx":205 * stride = width * 4; * * if not PyObject_CheckBuffer(buf): # <<<<<<<<<<<<<< @@ -3696,31 +3703,31 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":205 + /* "wx/svg/_nanosvg.pyx":209 * * 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, 205, __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, 209, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_3 != 0) != 0); if (unlikely(__pyx_t_2)) { - /* "wx/svg/_nanosvg.pyx":206 + /* "wx/svg/_nanosvg.pyx":210 * 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, 206, __pyx_L1_error) + __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_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, 210, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":205 + /* "wx/svg/_nanosvg.pyx":209 * * cdef Py_buffer view * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: # <<<<<<<<<<<<<< @@ -3729,7 +3736,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":207 + /* "wx/svg/_nanosvg.pyx":211 * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: * raise ValueError("PyObject_GetBuffer failed") * if view.len < height * stride: # <<<<<<<<<<<<<< @@ -3739,7 +3746,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":208 + /* "wx/svg/_nanosvg.pyx":212 * raise ValueError("PyObject_GetBuffer failed") * if view.len < height * stride: * PyBuffer_Release(&view) # <<<<<<<<<<<<<< @@ -3748,20 +3755,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ PyBuffer_Release((&__pyx_v_view)); - /* "wx/svg/_nanosvg.pyx":209 + /* "wx/svg/_nanosvg.pyx":213 * 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, 209, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 209, __pyx_L1_error) + __PYX_ERR(0, 213, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":207 + /* "wx/svg/_nanosvg.pyx":211 * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: * raise ValueError("PyObject_GetBuffer failed") * if view.len < height * stride: # <<<<<<<<<<<<<< @@ -3770,7 +3777,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ } - /* "wx/svg/_nanosvg.pyx":211 + /* "wx/svg/_nanosvg.pyx":215 * raise ValueError("Buffer object is smaller than height * stride") * * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, view.buf, # <<<<<<<<<<<<<< @@ -3779,7 +3786,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":213 + /* "wx/svg/_nanosvg.pyx":217 * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, view.buf, * width, height, stride) * PyBuffer_Release(&view) # <<<<<<<<<<<<<< @@ -3788,7 +3795,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( */ PyBuffer_Release((&__pyx_v_view)); - /* "wx/svg/_nanosvg.pyx":173 + /* "wx/svg/_nanosvg.pyx":177 * * * def RasterizeToBuffer(self, object buf, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< @@ -3809,7 +3816,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":216 +/* "wx/svg/_nanosvg.pyx":220 * * * def Rasterize(self, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< @@ -3819,7 +3826,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( /* Python wrapper */ static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_13Rasterize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize[] = "SVGimageBase.Rasterize(self, float tx=0.0, float ty=0.0, float scale=1.0, int width=-1, int height=-1, int stride=-1) -> bytes\n\n Renders the SVG image to a ``bytes`` object as a series of RGBA values.\n\n :param float `tx`: Image horizontal offset (applied after scaling)\n :param float `ty`: Image vertical offset (applied after scaling)\n :param float `scale`: Image scale\n :param int `width`: width of the image to render, defaults to width from the SVG file\n :param int `height`: height of the image to render, defaults to height from the SVG file\n :param int `stride`: number of bytes per scan line in the destination buffer, typically ``width * 4``\n\n :returns: A bytes object containing the raw RGBA pixel color values\n "; +static char __pyx_doc_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize[] = "SVGimageBase.Rasterize(self, float tx=0.0, float ty=0.0, float scale=1.0, int width=-1, int height=-1, int stride=-1) -> bytes\n\n Renders the SVG image to a ``bytes`` object as a series of RGBA values.\n\n :param float `tx`: Image horizontal offset (applied after scaling)\n :param float `ty`: Image vertical offset (applied after scaling)\n :param float `scale`: Image scale\n :param int `width`: width of the image to render, defaults to width from the SVG file\n :param int `height`: height of the image to render, defaults to height from the SVG file\n :param int `stride`: number of bytes per scan line in the destination buffer, typically ``width * 4``\n\n :returns: A bytearray object containing the raw RGBA pixel color values\n "; static PyObject *__pyx_pw_2wx_3svg_8_nanosvg_12SVGimageBase_13Rasterize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { float __pyx_v_tx; float __pyx_v_ty; @@ -3891,7 +3898,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, 216, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Rasterize") < 0)) __PYX_ERR(0, 220, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3912,39 +3919,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, 216, __pyx_L3_error) + __pyx_v_tx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_tx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __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, 216, __pyx_L3_error) + __pyx_v_ty = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_ty == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __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, 216, __pyx_L3_error) + __pyx_v_scale = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_scale == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __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, 217, __pyx_L3_error) + __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) } 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, 217, __pyx_L3_error) + __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) } 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, 217, __pyx_L3_error) + __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) } 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, 216, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("Rasterize", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 220, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.Rasterize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3968,18 +3975,18 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ unsigned char *__pyx_t_5; __Pyx_RefNannySetupContext("Rasterize", 0); - /* "wx/svg/_nanosvg.pyx":230 - * :returns: A bytes object containing the raw RGBA pixel color values + /* "wx/svg/_nanosvg.pyx":234 + * :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, 230, __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, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":231 + /* "wx/svg/_nanosvg.pyx":235 * """ * self._check_ptr() * if self._rasterizer == NULL: # <<<<<<<<<<<<<< @@ -3989,7 +3996,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":232 + /* "wx/svg/_nanosvg.pyx":236 * self._check_ptr() * if self._rasterizer == NULL: * self._rasterizer = nsvgCreateRasterizer() # <<<<<<<<<<<<<< @@ -3998,7 +4005,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ __pyx_v_self->_rasterizer = nsvgCreateRasterizer(); - /* "wx/svg/_nanosvg.pyx":231 + /* "wx/svg/_nanosvg.pyx":235 * """ * self._check_ptr() * if self._rasterizer == NULL: # <<<<<<<<<<<<<< @@ -4007,7 +4014,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ } - /* "wx/svg/_nanosvg.pyx":234 + /* "wx/svg/_nanosvg.pyx":238 * self._rasterizer = nsvgCreateRasterizer() * * if width == -1: # <<<<<<<<<<<<<< @@ -4017,20 +4024,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":235 + /* "wx/svg/_nanosvg.pyx":239 * * 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, 235, __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, 239, __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, 235, __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, 239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_width = __pyx_t_3; - /* "wx/svg/_nanosvg.pyx":234 + /* "wx/svg/_nanosvg.pyx":238 * self._rasterizer = nsvgCreateRasterizer() * * if width == -1: # <<<<<<<<<<<<<< @@ -4039,7 +4046,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ } - /* "wx/svg/_nanosvg.pyx":236 + /* "wx/svg/_nanosvg.pyx":240 * if width == -1: * width = self.width * if height == -1: # <<<<<<<<<<<<<< @@ -4049,20 +4056,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":237 + /* "wx/svg/_nanosvg.pyx":241 * 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, 237, __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, 241, __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, 237, __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, 241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_height = __pyx_t_3; - /* "wx/svg/_nanosvg.pyx":236 + /* "wx/svg/_nanosvg.pyx":240 * if width == -1: * width = self.width * if height == -1: # <<<<<<<<<<<<<< @@ -4071,7 +4078,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ } - /* "wx/svg/_nanosvg.pyx":238 + /* "wx/svg/_nanosvg.pyx":242 * if height == -1: * height = self.height * if stride == -1: # <<<<<<<<<<<<<< @@ -4081,16 +4088,16 @@ 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":239 + /* "wx/svg/_nanosvg.pyx":243 * height = self.height * if stride == -1: * stride = width * 4; # <<<<<<<<<<<<<< * - * buf = bytes(height * stride) + * buf = bytes(bytearray(height * stride)) */ __pyx_v_stride = (__pyx_v_width * 4); - /* "wx/svg/_nanosvg.pyx":238 + /* "wx/svg/_nanosvg.pyx":242 * if height == -1: * height = self.height * if stride == -1: # <<<<<<<<<<<<<< @@ -4099,32 +4106,35 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ */ } - /* "wx/svg/_nanosvg.pyx":241 + /* "wx/svg/_nanosvg.pyx":245 * stride = width * 4; * - * buf = bytes(height * stride) # <<<<<<<<<<<<<< + * 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, 241, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error) + __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_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_buf = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 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_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":242 + /* "wx/svg/_nanosvg.pyx":246 * - * buf = bytes(height * stride) + * 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, 242, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableUString(__pyx_v_buf); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":243 - * buf = bytes(height * stride) + /* "wx/svg/_nanosvg.pyx":247 + * buf = bytes(bytearray(height * stride)) * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, * width, height, stride) # <<<<<<<<<<<<<< * return buf @@ -4132,7 +4142,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":244 + /* "wx/svg/_nanosvg.pyx":248 * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, * width, height, stride) * return buf # <<<<<<<<<<<<<< @@ -4144,7 +4154,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ __pyx_r = __pyx_v_buf; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":216 + /* "wx/svg/_nanosvg.pyx":220 * * * def Rasterize(self, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< @@ -4165,7 +4175,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":247 +/* "wx/svg/_nanosvg.pyx":251 * * @property * def width(self) -> float: # <<<<<<<<<<<<<< @@ -4192,18 +4202,18 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_5width___get__(struc PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":251 + /* "wx/svg/_nanosvg.pyx":255 * 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, 251, __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, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":252 + /* "wx/svg/_nanosvg.pyx":256 * """ * self._check_ptr() * return self._ptr.width # <<<<<<<<<<<<<< @@ -4211,13 +4221,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, 252, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":247 + /* "wx/svg/_nanosvg.pyx":251 * * @property * def width(self) -> float: # <<<<<<<<<<<<<< @@ -4236,7 +4246,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_5width___get__(struc return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":255 +/* "wx/svg/_nanosvg.pyx":259 * * @property * def height(self) -> float: # <<<<<<<<<<<<<< @@ -4263,18 +4273,18 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6height___get__(stru PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":259 + /* "wx/svg/_nanosvg.pyx":263 * 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, 259, __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, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":260 + /* "wx/svg/_nanosvg.pyx":264 * """ * self._check_ptr() * return self._ptr.height # <<<<<<<<<<<<<< @@ -4282,13 +4292,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, 260, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":255 + /* "wx/svg/_nanosvg.pyx":259 * * @property * def height(self) -> float: # <<<<<<<<<<<<<< @@ -4308,7 +4318,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":263 +/* "wx/svg/_nanosvg.pyx":267 * * @property * def shapes(self): # <<<<<<<<<<<<<< @@ -4338,7 +4348,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes___get__(stru 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, 263, __pyx_L1_error) + __PYX_ERR(0, 267, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -4346,7 +4356,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, 263, __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, 267, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4379,20 +4389,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, 263, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 267, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":267 + /* "wx/svg/_nanosvg.pyx":271 * 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, 267, __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, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":268 + /* "wx/svg/_nanosvg.pyx":272 * """ * self._check_ptr() * cdef NSVGshape *shape = self._ptr.shapes # <<<<<<<<<<<<<< @@ -4402,7 +4412,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":269 + /* "wx/svg/_nanosvg.pyx":273 * self._check_ptr() * cdef NSVGshape *shape = self._ptr.shapes * while shape != NULL: # <<<<<<<<<<<<<< @@ -4413,14 +4423,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":270 + /* "wx/svg/_nanosvg.pyx":274 * 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, 270, __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, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -4431,9 +4441,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, 270, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 274, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":271 + /* "wx/svg/_nanosvg.pyx":275 * while shape != NULL: * yield SVGshape.from_ptr(shape) * shape = shape.next # <<<<<<<<<<<<<< @@ -4445,7 +4455,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator(_ } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "wx/svg/_nanosvg.pyx":263 + /* "wx/svg/_nanosvg.pyx":267 * * @property * def shapes(self): # <<<<<<<<<<<<<< @@ -4579,7 +4589,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_16__setstate_cython_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":284 +/* "wx/svg/_nanosvg.pyx":288 * cdef NSVGshape *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -4608,7 +4618,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":285 + /* "wx/svg/_nanosvg.pyx":289 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -4617,7 +4627,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGshape___cinit__(struct __pyx_obj_2wx_ */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":284 + /* "wx/svg/_nanosvg.pyx":288 * cdef NSVGshape *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -4631,7 +4641,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGshape___cinit__(struct __pyx_obj_2wx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":287 +/* "wx/svg/_nanosvg.pyx":291 * self._ptr = NULL * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -4660,7 +4670,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":288 + /* "wx/svg/_nanosvg.pyx":292 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -4670,20 +4680,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":289 + /* "wx/svg/_nanosvg.pyx":293 * 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, 289, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 289, __pyx_L1_error) + __PYX_ERR(0, 293, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":288 + /* "wx/svg/_nanosvg.pyx":292 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -4692,7 +4702,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ */ } - /* "wx/svg/_nanosvg.pyx":287 + /* "wx/svg/_nanosvg.pyx":291 * self._ptr = NULL * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -4713,7 +4723,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":292 +/* "wx/svg/_nanosvg.pyx":296 * * @staticmethod * cdef SVGshape from_ptr(NSVGshape *ptr): # <<<<<<<<<<<<<< @@ -4728,19 +4738,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *__pyx_f_2wx_3svg_8_nanosvg_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":293 + /* "wx/svg/_nanosvg.pyx":297 * @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, 293, __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, 297, __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":294 + /* "wx/svg/_nanosvg.pyx":298 * cdef SVGshape from_ptr(NSVGshape *ptr): * obj = SVGshape() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -4749,7 +4759,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":295 + /* "wx/svg/_nanosvg.pyx":299 * obj = SVGshape() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -4761,7 +4771,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":292 + /* "wx/svg/_nanosvg.pyx":296 * * @staticmethod * cdef SVGshape from_ptr(NSVGshape *ptr): # <<<<<<<<<<<<<< @@ -4781,7 +4791,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *__pyx_f_2wx_3svg_8_nanosvg_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":297 +/* "wx/svg/_nanosvg.pyx":301 * return obj * * def __repr__(self): # <<<<<<<<<<<<<< @@ -4815,7 +4825,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "wx/svg/_nanosvg.pyx":298 + /* "wx/svg/_nanosvg.pyx":302 * * def __repr__(self): * if self._ptr: # <<<<<<<<<<<<<< @@ -4825,7 +4835,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":299 + /* "wx/svg/_nanosvg.pyx":303 * def __repr__(self): * if self._ptr: * return "SVGshape: id:{} bounds:{}".format(self.id.decode('utf-8'), self.bounds) # <<<<<<<<<<<<<< @@ -4833,11 +4843,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, 299, __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, 303, __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, 299, __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, 303, __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, 299, __pyx_L1_error) + __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_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -4852,10 +4862,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, 299, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __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, 299, __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, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; __pyx_t_7 = 0; @@ -4872,7 +4882,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, 299, __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, 303, __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; @@ -4882,7 +4892,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, 299, __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, 303, __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; @@ -4890,7 +4900,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, 299, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 303, __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; @@ -4901,7 +4911,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, 299, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -4910,7 +4920,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":298 + /* "wx/svg/_nanosvg.pyx":302 * * def __repr__(self): * if self._ptr: # <<<<<<<<<<<<<< @@ -4919,7 +4929,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob */ } - /* "wx/svg/_nanosvg.pyx":301 + /* "wx/svg/_nanosvg.pyx":305 * return "SVGshape: id:{} bounds:{}".format(self.id.decode('utf-8'), self.bounds) * else: * return "SVGshape: " # <<<<<<<<<<<<<< @@ -4933,7 +4943,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob goto __pyx_L0; } - /* "wx/svg/_nanosvg.pyx":297 + /* "wx/svg/_nanosvg.pyx":301 * return obj * * def __repr__(self): # <<<<<<<<<<<<<< @@ -4957,7 +4967,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":304 +/* "wx/svg/_nanosvg.pyx":308 * * @property * def id(self): # <<<<<<<<<<<<<< @@ -4986,14 +4996,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2id___get__(struct __pyx_ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":306 + /* "wx/svg/_nanosvg.pyx":310 * 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, 306, __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, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5007,12 +5017,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, 306, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __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":307 + /* "wx/svg/_nanosvg.pyx":311 * """Optional 'id' attr of the shape or its group""" * self._check_ptr() * return self._ptr.id # <<<<<<<<<<<<<< @@ -5020,13 +5030,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, 307, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->_ptr->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":304 + /* "wx/svg/_nanosvg.pyx":308 * * @property * def id(self): # <<<<<<<<<<<<<< @@ -5047,7 +5057,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2id___get__(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":310 +/* "wx/svg/_nanosvg.pyx":314 * * @property * def fill(self) -> SVGpaint: # <<<<<<<<<<<<<< @@ -5076,14 +5086,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4fill___get__(struct __py PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":312 + /* "wx/svg/_nanosvg.pyx":316 * 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, 312, __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, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5097,12 +5107,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, 312, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __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":313 + /* "wx/svg/_nanosvg.pyx":317 * """:class:`SVGpaint` for the fill""" * self._check_ptr() * return SVGpaint.from_ptr(&self._ptr.fill) # <<<<<<<<<<<<<< @@ -5110,13 +5120,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, 313, __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, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":310 + /* "wx/svg/_nanosvg.pyx":314 * * @property * def fill(self) -> SVGpaint: # <<<<<<<<<<<<<< @@ -5137,7 +5147,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4fill___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":316 +/* "wx/svg/_nanosvg.pyx":320 * * @property * def stroke(self) -> SVGpaint: # <<<<<<<<<<<<<< @@ -5166,14 +5176,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6stroke___get__(struct __ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":318 + /* "wx/svg/_nanosvg.pyx":322 * 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, 318, __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, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5187,12 +5197,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, 318, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __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":319 + /* "wx/svg/_nanosvg.pyx":323 * """:class:`SVGpaint` for the stroke""" * self._check_ptr() * return SVGpaint.from_ptr(&self._ptr.stroke) # <<<<<<<<<<<<<< @@ -5200,13 +5210,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, 319, __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, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":316 + /* "wx/svg/_nanosvg.pyx":320 * * @property * def stroke(self) -> SVGpaint: # <<<<<<<<<<<<<< @@ -5227,7 +5237,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6stroke___get__(struct __ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":322 +/* "wx/svg/_nanosvg.pyx":326 * * @property * def opacity(self) -> float: # <<<<<<<<<<<<<< @@ -5256,14 +5266,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_7opacity___get__(struct _ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":324 + /* "wx/svg/_nanosvg.pyx":328 * 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, 324, __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, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5277,12 +5287,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, 324, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __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":325 + /* "wx/svg/_nanosvg.pyx":329 * """Opacity of the shape""" * self._check_ptr() * return self._ptr.opacity # <<<<<<<<<<<<<< @@ -5290,13 +5300,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, 325, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->opacity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":322 + /* "wx/svg/_nanosvg.pyx":326 * * @property * def opacity(self) -> float: # <<<<<<<<<<<<<< @@ -5317,7 +5327,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_7opacity___get__(struct _ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":328 +/* "wx/svg/_nanosvg.pyx":332 * * @property * def strokeWidth(self) -> float: # <<<<<<<<<<<<<< @@ -5346,14 +5356,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_11strokeWidth___get__(str PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":330 + /* "wx/svg/_nanosvg.pyx":334 * 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, 330, __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, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5367,12 +5377,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, 330, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __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":331 + /* "wx/svg/_nanosvg.pyx":335 * """Stroke width (scaled)""" * self._check_ptr() * return self._ptr.strokeWidth # <<<<<<<<<<<<<< @@ -5380,13 +5390,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, 331, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->strokeWidth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":328 + /* "wx/svg/_nanosvg.pyx":332 * * @property * def strokeWidth(self) -> float: # <<<<<<<<<<<<<< @@ -5407,7 +5417,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_11strokeWidth___get__(str return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":334 +/* "wx/svg/_nanosvg.pyx":338 * * @property * def strokeDashOffset(self) -> float: # <<<<<<<<<<<<<< @@ -5436,14 +5446,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_16strokeDashOffset___get_ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":336 + /* "wx/svg/_nanosvg.pyx":340 * 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, 336, __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, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5457,12 +5467,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, 336, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __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":337 + /* "wx/svg/_nanosvg.pyx":341 * """Stroke dash offset (scaled)""" * self._check_ptr() * return self._ptr.strokeDashOffset # <<<<<<<<<<<<<< @@ -5470,13 +5480,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, 337, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->strokeDashOffset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":334 + /* "wx/svg/_nanosvg.pyx":338 * * @property * def strokeDashOffset(self) -> float: # <<<<<<<<<<<<<< @@ -5497,7 +5507,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_16strokeDashOffset___get_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":340 +/* "wx/svg/_nanosvg.pyx":344 * * @property * def strokeDashArray(self) -> list: # <<<<<<<<<<<<<< @@ -5530,14 +5540,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_15strokeDashArray___get__ char __pyx_t_6; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":342 + /* "wx/svg/_nanosvg.pyx":346 * 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, 342, __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, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5551,12 +5561,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, 342, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __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":343 + /* "wx/svg/_nanosvg.pyx":347 * """Stroke dash array (scaled)""" * self._check_ptr() * return [self._ptr.strokeDashArray[i] # <<<<<<<<<<<<<< @@ -5564,10 +5574,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, 343, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "wx/svg/_nanosvg.pyx":344 + /* "wx/svg/_nanosvg.pyx":348 * self._check_ptr() * return [self._ptr.strokeDashArray[i] * for i in range(self._ptr.strokeDashCount)] # <<<<<<<<<<<<<< @@ -5579,23 +5589,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":343 + /* "wx/svg/_nanosvg.pyx":347 * """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, 343, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 343, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 347, __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":340 + /* "wx/svg/_nanosvg.pyx":344 * * @property * def strokeDashArray(self) -> list: # <<<<<<<<<<<<<< @@ -5616,7 +5626,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_15strokeDashArray___get__ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":347 +/* "wx/svg/_nanosvg.pyx":351 * * @property * def strokeLineJoin(self) -> SVGlineJoin: # <<<<<<<<<<<<<< @@ -5646,14 +5656,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_14strokeLineJoin___get__( PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":349 + /* "wx/svg/_nanosvg.pyx":353 * 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, 349, __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, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5667,12 +5677,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, 349, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __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":350 + /* "wx/svg/_nanosvg.pyx":354 * """Stroke join type""" * self._check_ptr() * return SVGlineJoin(self._ptr.strokeLineJoin) # <<<<<<<<<<<<<< @@ -5680,9 +5690,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, 350, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __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, 350, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -5697,14 +5707,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, 350, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __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":347 + /* "wx/svg/_nanosvg.pyx":351 * * @property * def strokeLineJoin(self) -> SVGlineJoin: # <<<<<<<<<<<<<< @@ -5726,7 +5736,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_14strokeLineJoin___get__( return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":353 +/* "wx/svg/_nanosvg.pyx":357 * * @property * def strokeLineCap(self) -> SVGlineCap: # <<<<<<<<<<<<<< @@ -5756,14 +5766,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_13strokeLineCap___get__(s PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":355 + /* "wx/svg/_nanosvg.pyx":359 * 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, 355, __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, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5777,12 +5787,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, 355, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __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":356 + /* "wx/svg/_nanosvg.pyx":360 * """Stroke cap type""" * self._check_ptr() * return SVGlineCap(self._ptr.strokeLineCap) # <<<<<<<<<<<<<< @@ -5790,9 +5800,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, 356, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineCap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __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, 356, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -5807,14 +5817,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, 356, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __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":353 + /* "wx/svg/_nanosvg.pyx":357 * * @property * def strokeLineCap(self) -> SVGlineCap: # <<<<<<<<<<<<<< @@ -5836,7 +5846,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_13strokeLineCap___get__(s return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":359 +/* "wx/svg/_nanosvg.pyx":363 * * @property * def fillRule(self) -> SVGfillRule: # <<<<<<<<<<<<<< @@ -5866,14 +5876,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8fillRule___get__(struct PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":361 + /* "wx/svg/_nanosvg.pyx":365 * 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, 361, __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, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5887,12 +5897,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, 361, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __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":362 + /* "wx/svg/_nanosvg.pyx":366 * """Fill rule""" * self._check_ptr() * return SVGfillRule(self._ptr.fillRule) # <<<<<<<<<<<<<< @@ -5900,9 +5910,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, 362, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __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, 362, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -5917,14 +5927,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, 362, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __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":359 + /* "wx/svg/_nanosvg.pyx":363 * * @property * def fillRule(self) -> SVGfillRule: # <<<<<<<<<<<<<< @@ -5946,7 +5956,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8fillRule___get__(struct return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":365 +/* "wx/svg/_nanosvg.pyx":369 * * @property * def miterLimit(self) -> float: # <<<<<<<<<<<<<< @@ -5975,14 +5985,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_10miterLimit___get__(stru PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":367 + /* "wx/svg/_nanosvg.pyx":371 * 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, 367, __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, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -5996,12 +6006,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, 367, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":368 + /* "wx/svg/_nanosvg.pyx":372 * """Miter limit""" * self._check_ptr() * return self._ptr.miterLimit # <<<<<<<<<<<<<< @@ -6009,13 +6019,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, 368, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->miterLimit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":365 + /* "wx/svg/_nanosvg.pyx":369 * * @property * def miterLimit(self) -> float: # <<<<<<<<<<<<<< @@ -6036,7 +6046,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_10miterLimit___get__(stru return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":371 +/* "wx/svg/_nanosvg.pyx":375 * * @property * def flags(self) -> int: # <<<<<<<<<<<<<< @@ -6065,14 +6075,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5flags___get__(struct __p PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":373 + /* "wx/svg/_nanosvg.pyx":377 * 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, 373, __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, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6086,12 +6096,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, 373, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":374 + /* "wx/svg/_nanosvg.pyx":378 * """Logical OR of SVG_FLAGS_* flags""" * self._check_ptr() * return int(self._ptr.flags) # <<<<<<<<<<<<<< @@ -6099,16 +6109,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, 374, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) + __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_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":371 + /* "wx/svg/_nanosvg.pyx":375 * * @property * def flags(self) -> int: # <<<<<<<<<<<<<< @@ -6129,7 +6139,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5flags___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":377 +/* "wx/svg/_nanosvg.pyx":381 * * @property * def bounds(self) -> list: # <<<<<<<<<<<<<< @@ -6160,14 +6170,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6bounds___get__(struct __ long __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":379 + /* "wx/svg/_nanosvg.pyx":383 * 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, 379, __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, 383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6181,12 +6191,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, 379, __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_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":380 + /* "wx/svg/_nanosvg.pyx":384 * """Tight bounding box of the shape [minx,miny,maxx,maxy]""" * self._check_ptr() * return [self._ptr.bounds[i] for i in range(4)] # <<<<<<<<<<<<<< @@ -6194,20 +6204,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, 380, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __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, 380, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 380, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 384, __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":377 + /* "wx/svg/_nanosvg.pyx":381 * * @property * def bounds(self) -> list: # <<<<<<<<<<<<<< @@ -6228,7 +6238,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6bounds___get__(struct __ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":383 +/* "wx/svg/_nanosvg.pyx":387 * * @property * def minx(self) -> float: # <<<<<<<<<<<<<< @@ -6257,14 +6267,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4minx___get__(struct __py PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":384 + /* "wx/svg/_nanosvg.pyx":388 * @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, 384, __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))) { @@ -6278,12 +6288,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, 384, __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":385 + /* "wx/svg/_nanosvg.pyx":389 * def minx(self) -> float: * self._check_ptr() * return self._ptr.bounds[0] # <<<<<<<<<<<<<< @@ -6291,13 +6301,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, 385, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[0])); 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":383 + /* "wx/svg/_nanosvg.pyx":387 * * @property * def minx(self) -> float: # <<<<<<<<<<<<<< @@ -6318,7 +6328,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4minx___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":388 +/* "wx/svg/_nanosvg.pyx":392 * * @property * def miny(self) -> float: # <<<<<<<<<<<<<< @@ -6347,14 +6357,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4miny___get__(struct __py PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":389 + /* "wx/svg/_nanosvg.pyx":393 * @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, 389, __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, 393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6368,12 +6378,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, 389, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __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":390 + /* "wx/svg/_nanosvg.pyx":394 * def miny(self) -> float: * self._check_ptr() * return self._ptr.bounds[1] # <<<<<<<<<<<<<< @@ -6381,13 +6391,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, 390, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[1])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":388 + /* "wx/svg/_nanosvg.pyx":392 * * @property * def miny(self) -> float: # <<<<<<<<<<<<<< @@ -6408,7 +6418,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4miny___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":393 +/* "wx/svg/_nanosvg.pyx":397 * * @property * def maxx(self) -> float: # <<<<<<<<<<<<<< @@ -6437,14 +6447,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxx___get__(struct __py PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":394 + /* "wx/svg/_nanosvg.pyx":398 * @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, 394, __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, 398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6458,12 +6468,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, 394, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __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":395 + /* "wx/svg/_nanosvg.pyx":399 * def maxx(self) -> float: * self._check_ptr() * return self._ptr.bounds[2] # <<<<<<<<<<<<<< @@ -6471,13 +6481,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, 395, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":393 + /* "wx/svg/_nanosvg.pyx":397 * * @property * def maxx(self) -> float: # <<<<<<<<<<<<<< @@ -6498,7 +6508,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxx___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":398 +/* "wx/svg/_nanosvg.pyx":402 * * @property * def maxy(self) -> float: # <<<<<<<<<<<<<< @@ -6527,14 +6537,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxy___get__(struct __py PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":399 + /* "wx/svg/_nanosvg.pyx":403 * @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, 399, __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, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6548,12 +6558,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, 399, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __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":400 + /* "wx/svg/_nanosvg.pyx":404 * def maxy(self) -> float: * self._check_ptr() * return self._ptr.bounds[3] # <<<<<<<<<<<<<< @@ -6561,13 +6571,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, 400, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":398 + /* "wx/svg/_nanosvg.pyx":402 * * @property * def maxy(self) -> float: # <<<<<<<<<<<<<< @@ -6589,7 +6599,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":403 +/* "wx/svg/_nanosvg.pyx":407 * * @property * def paths(self): # <<<<<<<<<<<<<< @@ -6619,7 +6629,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5paths___get__(struct __p 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, 403, __pyx_L1_error) + __PYX_ERR(0, 407, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -6627,7 +6637,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, 403, __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, 407, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -6662,16 +6672,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, 403, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 407, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":407 + /* "wx/svg/_nanosvg.pyx":411 * 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, 407, __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, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -6685,12 +6695,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, 407, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 411, __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":408 + /* "wx/svg/_nanosvg.pyx":412 * """ * self._check_ptr() * cdef NSVGpath *path = self._ptr.paths # <<<<<<<<<<<<<< @@ -6700,7 +6710,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":409 + /* "wx/svg/_nanosvg.pyx":413 * self._check_ptr() * cdef NSVGpath *path = self._ptr.paths * while path != NULL: # <<<<<<<<<<<<<< @@ -6711,14 +6721,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":410 + /* "wx/svg/_nanosvg.pyx":414 * 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, 410, __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, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -6729,9 +6739,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, 410, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 414, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":411 + /* "wx/svg/_nanosvg.pyx":415 * while path != NULL: * yield SVGpath.from_ptr(path) * path = path.next # <<<<<<<<<<<<<< @@ -6743,7 +6753,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_ } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "wx/svg/_nanosvg.pyx":403 + /* "wx/svg/_nanosvg.pyx":407 * * @property * def paths(self): # <<<<<<<<<<<<<< @@ -6879,7 +6889,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8__setstate_cython__(CYTH return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":423 +/* "wx/svg/_nanosvg.pyx":427 * cdef NSVGpath *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -6908,7 +6918,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":424 + /* "wx/svg/_nanosvg.pyx":428 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -6917,7 +6927,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":423 + /* "wx/svg/_nanosvg.pyx":427 * cdef NSVGpath *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -6931,7 +6941,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_7SVGpath___cinit__(struct __pyx_obj_2wx_3 return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":427 +/* "wx/svg/_nanosvg.pyx":431 * * @staticmethod * cdef SVGpath from_ptr(NSVGpath *ptr): # <<<<<<<<<<<<<< @@ -6946,19 +6956,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *__pyx_f_2wx_3svg_8_nanosvg_7 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":428 + /* "wx/svg/_nanosvg.pyx":432 * @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, 428, __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, 432, __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":429 + /* "wx/svg/_nanosvg.pyx":433 * cdef SVGpath from_ptr(NSVGpath *ptr): * obj = SVGpath() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -6967,7 +6977,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":430 + /* "wx/svg/_nanosvg.pyx":434 * obj = SVGpath() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -6979,7 +6989,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":427 + /* "wx/svg/_nanosvg.pyx":431 * * @staticmethod * cdef SVGpath from_ptr(NSVGpath *ptr): # <<<<<<<<<<<<<< @@ -6999,7 +7009,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *__pyx_f_2wx_3svg_8_nanosvg_7 return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":432 +/* "wx/svg/_nanosvg.pyx":436 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -7028,7 +7038,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":433 + /* "wx/svg/_nanosvg.pyx":437 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -7038,20 +7048,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":434 + /* "wx/svg/_nanosvg.pyx":438 * 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, 434, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 434, __pyx_L1_error) + __PYX_ERR(0, 438, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":433 + /* "wx/svg/_nanosvg.pyx":437 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -7060,7 +7070,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o */ } - /* "wx/svg/_nanosvg.pyx":432 + /* "wx/svg/_nanosvg.pyx":436 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -7081,7 +7091,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":436 +/* "wx/svg/_nanosvg.pyx":440 * raise ValueError("Invalid SVGpath") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -7112,7 +7122,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "wx/svg/_nanosvg.pyx":437 + /* "wx/svg/_nanosvg.pyx":441 * * def __repr__(self): * if self._ptr: # <<<<<<<<<<<<<< @@ -7122,7 +7132,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":438 + /* "wx/svg/_nanosvg.pyx":442 * def __repr__(self): * if self._ptr: * return "SVGpath: bounds:{}".format(self.bounds) # <<<<<<<<<<<<<< @@ -7130,9 +7140,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, 438, __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, 442, __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, 438, __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, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -7147,14 +7157,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, 438, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __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":437 + /* "wx/svg/_nanosvg.pyx":441 * * def __repr__(self): * if self._ptr: # <<<<<<<<<<<<<< @@ -7163,7 +7173,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj */ } - /* "wx/svg/_nanosvg.pyx":440 + /* "wx/svg/_nanosvg.pyx":444 * return "SVGpath: bounds:{}".format(self.bounds) * else: * return "SVGpath: " # <<<<<<<<<<<<<< @@ -7177,7 +7187,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj goto __pyx_L0; } - /* "wx/svg/_nanosvg.pyx":436 + /* "wx/svg/_nanosvg.pyx":440 * raise ValueError("Invalid SVGpath") * * def __repr__(self): # <<<<<<<<<<<<<< @@ -7199,7 +7209,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":443 +/* "wx/svg/_nanosvg.pyx":447 * * @property * def pts(self) -> list: # <<<<<<<<<<<<<< @@ -7232,14 +7242,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_3pts___get__(struct __pyx_ long __pyx_t_6; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":448 + /* "wx/svg/_nanosvg.pyx":452 * 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, 448, __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, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7253,12 +7263,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, 448, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __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":449 + /* "wx/svg/_nanosvg.pyx":453 * """ * self._check_ptr() * return [self._ptr.pts[i] for i in range(self._ptr.npts*2)] # <<<<<<<<<<<<<< @@ -7266,22 +7276,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, 449, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __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, 449, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 449, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 453, __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":443 + /* "wx/svg/_nanosvg.pyx":447 * * @property * def pts(self) -> list: # <<<<<<<<<<<<<< @@ -7302,7 +7312,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_3pts___get__(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":452 +/* "wx/svg/_nanosvg.pyx":456 * * @property * def npts(self) -> int: # <<<<<<<<<<<<<< @@ -7331,14 +7341,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4npts___get__(struct __pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":454 + /* "wx/svg/_nanosvg.pyx":458 * 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, 454, __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, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7352,12 +7362,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, 454, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __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":455 + /* "wx/svg/_nanosvg.pyx":459 * """Number of points""" * self._check_ptr() * return self._ptr.npts # <<<<<<<<<<<<<< @@ -7365,13 +7375,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, 455, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":452 + /* "wx/svg/_nanosvg.pyx":456 * * @property * def npts(self) -> int: # <<<<<<<<<<<<<< @@ -7392,7 +7402,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4npts___get__(struct __pyx return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":458 +/* "wx/svg/_nanosvg.pyx":462 * * @property * def points(self) -> list: # <<<<<<<<<<<<<< @@ -7427,14 +7437,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":463 + /* "wx/svg/_nanosvg.pyx":467 * 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, 463, __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, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7448,12 +7458,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, 463, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __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":464 + /* "wx/svg/_nanosvg.pyx":468 * """ * self._check_ptr() * return [(self._ptr.pts[i], self._ptr.pts[i+1]) # <<<<<<<<<<<<<< @@ -7461,19 +7471,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, 464, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "wx/svg/_nanosvg.pyx":465 + /* "wx/svg/_nanosvg.pyx":469 * 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, 465, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); @@ -7484,16 +7494,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, 465, __pyx_L1_error) + __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_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, 465, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); - __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error) + __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -7501,17 +7511,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, 465, __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, 469, __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, 465, __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, 469, __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, 465, __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, 469, __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, 465, __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, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -7521,7 +7531,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, 465, __pyx_L1_error) + else __PYX_ERR(0, 469, __pyx_L1_error) } break; } @@ -7530,23 +7540,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":464 + /* "wx/svg/_nanosvg.pyx":468 * """ * 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, 464, __pyx_L1_error) - __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_t_6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __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, 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_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, 464, __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, 468, __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, 464, __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, 468, __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, 464, __pyx_L1_error) + __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_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); @@ -7554,10 +7564,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, 464, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "wx/svg/_nanosvg.pyx":465 + /* "wx/svg/_nanosvg.pyx":469 * self._check_ptr() * return [(self._ptr.pts[i], self._ptr.pts[i+1]) * for i in range(0, self._ptr.npts*2, 2)] # <<<<<<<<<<<<<< @@ -7570,7 +7580,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":458 + /* "wx/svg/_nanosvg.pyx":462 * * @property * def points(self) -> list: # <<<<<<<<<<<<<< @@ -7594,7 +7604,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":468 +/* "wx/svg/_nanosvg.pyx":472 * * @property * def closed(self) -> bool: # <<<<<<<<<<<<<< @@ -7624,14 +7634,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6closed___get__(struct __p int __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":470 + /* "wx/svg/_nanosvg.pyx":474 * 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, 470, __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, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7645,12 +7655,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, 470, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __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":471 + /* "wx/svg/_nanosvg.pyx":475 * """Flag indicating if shapes should be treated as closed""" * self._check_ptr() * return bool(self._ptr.closed) # <<<<<<<<<<<<<< @@ -7658,17 +7668,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, 471, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 471, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 475, __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, 471, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":468 + /* "wx/svg/_nanosvg.pyx":472 * * @property * def closed(self) -> bool: # <<<<<<<<<<<<<< @@ -7689,7 +7699,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6closed___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":474 +/* "wx/svg/_nanosvg.pyx":478 * * @property * def bounds(self) -> list: # <<<<<<<<<<<<<< @@ -7720,14 +7730,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6bounds___get__(struct __p long __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":476 + /* "wx/svg/_nanosvg.pyx":480 * 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, 476, __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, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7741,12 +7751,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, 476, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __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":477 + /* "wx/svg/_nanosvg.pyx":481 * """Tight bounding box of the shape [minx,miny,maxx,maxy]""" * self._check_ptr() * return [self._ptr.bounds[i] for i in range(4)] # <<<<<<<<<<<<<< @@ -7754,20 +7764,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, 477, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 481, __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, 477, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 477, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 481, __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":474 + /* "wx/svg/_nanosvg.pyx":478 * * @property * def bounds(self) -> list: # <<<<<<<<<<<<<< @@ -7788,7 +7798,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6bounds___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":480 +/* "wx/svg/_nanosvg.pyx":484 * * @property * def minx(self) -> float: # <<<<<<<<<<<<<< @@ -7817,14 +7827,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4minx___get__(struct __pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":481 + /* "wx/svg/_nanosvg.pyx":485 * @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, 481, __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, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7838,12 +7848,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, 481, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __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":482 + /* "wx/svg/_nanosvg.pyx":486 * def minx(self) -> float: * self._check_ptr() * return self._ptr.bounds[0] # <<<<<<<<<<<<<< @@ -7851,13 +7861,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, 482, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":480 + /* "wx/svg/_nanosvg.pyx":484 * * @property * def minx(self) -> float: # <<<<<<<<<<<<<< @@ -7878,7 +7888,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4minx___get__(struct __pyx return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":485 +/* "wx/svg/_nanosvg.pyx":489 * * @property * def miny(self) -> float: # <<<<<<<<<<<<<< @@ -7907,14 +7917,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4miny___get__(struct __pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":486 + /* "wx/svg/_nanosvg.pyx":490 * @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, 486, __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, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -7928,12 +7938,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, 486, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __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":487 + /* "wx/svg/_nanosvg.pyx":491 * def miny(self) -> float: * self._check_ptr() * return self._ptr.bounds[1] # <<<<<<<<<<<<<< @@ -7941,13 +7951,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, 487, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[1])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":485 + /* "wx/svg/_nanosvg.pyx":489 * * @property * def miny(self) -> float: # <<<<<<<<<<<<<< @@ -7968,7 +7978,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4miny___get__(struct __pyx return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":490 +/* "wx/svg/_nanosvg.pyx":494 * * @property * def maxx(self) -> float: # <<<<<<<<<<<<<< @@ -7997,14 +8007,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxx___get__(struct __pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":491 + /* "wx/svg/_nanosvg.pyx":495 * @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, 491, __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, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8018,12 +8028,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, 491, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __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":492 + /* "wx/svg/_nanosvg.pyx":496 * def maxx(self) -> float: * self._check_ptr() * return self._ptr.bounds[2] # <<<<<<<<<<<<<< @@ -8031,13 +8041,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, 492, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":490 + /* "wx/svg/_nanosvg.pyx":494 * * @property * def maxx(self) -> float: # <<<<<<<<<<<<<< @@ -8058,7 +8068,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxx___get__(struct __pyx return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":495 +/* "wx/svg/_nanosvg.pyx":499 * * @property * def maxy(self) -> float: # <<<<<<<<<<<<<< @@ -8087,14 +8097,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxy___get__(struct __pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":496 + /* "wx/svg/_nanosvg.pyx":500 * @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, 496, __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, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8108,12 +8118,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, 496, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __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":497 + /* "wx/svg/_nanosvg.pyx":501 * def maxy(self) -> float: * self._check_ptr() * return self._ptr.bounds[3] # <<<<<<<<<<<<<< @@ -8121,13 +8131,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, 497, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":495 + /* "wx/svg/_nanosvg.pyx":499 * * @property * def maxy(self) -> float: # <<<<<<<<<<<<<< @@ -8257,7 +8267,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_8__setstate_cython__(CYTHO return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":509 +/* "wx/svg/_nanosvg.pyx":513 * cdef NSVGpaint *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -8286,7 +8296,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":510 + /* "wx/svg/_nanosvg.pyx":514 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -8295,7 +8305,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint___cinit__(struct __pyx_obj_2wx_ */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":509 + /* "wx/svg/_nanosvg.pyx":513 * cdef NSVGpaint *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -8309,7 +8319,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint___cinit__(struct __pyx_obj_2wx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":513 +/* "wx/svg/_nanosvg.pyx":517 * * @staticmethod * cdef SVGpaint from_ptr(NSVGpaint *ptr): # <<<<<<<<<<<<<< @@ -8324,19 +8334,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *__pyx_f_2wx_3svg_8_nanosvg_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":514 + /* "wx/svg/_nanosvg.pyx":518 * @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, 514, __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, 518, __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":515 + /* "wx/svg/_nanosvg.pyx":519 * cdef SVGpaint from_ptr(NSVGpaint *ptr): * obj = SVGpaint() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -8345,7 +8355,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":516 + /* "wx/svg/_nanosvg.pyx":520 * obj = SVGpaint() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -8357,7 +8367,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":513 + /* "wx/svg/_nanosvg.pyx":517 * * @staticmethod * cdef SVGpaint from_ptr(NSVGpaint *ptr): # <<<<<<<<<<<<<< @@ -8377,7 +8387,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *__pyx_f_2wx_3svg_8_nanosvg_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":518 +/* "wx/svg/_nanosvg.pyx":522 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -8406,7 +8416,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":519 + /* "wx/svg/_nanosvg.pyx":523 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -8416,20 +8426,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":520 + /* "wx/svg/_nanosvg.pyx":524 * 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, 520, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 520, __pyx_L1_error) + __PYX_ERR(0, 524, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":519 + /* "wx/svg/_nanosvg.pyx":523 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -8438,7 +8448,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ */ } - /* "wx/svg/_nanosvg.pyx":518 + /* "wx/svg/_nanosvg.pyx":522 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -8459,7 +8469,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":523 +/* "wx/svg/_nanosvg.pyx":527 * * @property * def type(self) -> SVGpaintType: # <<<<<<<<<<<<<< @@ -8489,14 +8499,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4type___get__(struct __py PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":525 + /* "wx/svg/_nanosvg.pyx":529 * 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, 525, __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, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8510,12 +8520,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, 525, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __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":526 + /* "wx/svg/_nanosvg.pyx":530 * """Flag indicating the type of paint info, solid color or type of gradient""" * self._check_ptr() * return SVGpaintType(self._ptr.type) # <<<<<<<<<<<<<< @@ -8523,9 +8533,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, 526, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGpaintType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __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, 526, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -8540,14 +8550,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, 526, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __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":523 + /* "wx/svg/_nanosvg.pyx":527 * * @property * def type(self) -> SVGpaintType: # <<<<<<<<<<<<<< @@ -8569,7 +8579,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4type___get__(struct __py return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":529 +/* "wx/svg/_nanosvg.pyx":533 * * @property * def color(self) -> uint: # <<<<<<<<<<<<<< @@ -8599,14 +8609,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p int __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":530 + /* "wx/svg/_nanosvg.pyx":534 * @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, 530, __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, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8620,43 +8630,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, 530, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __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":531 + /* "wx/svg/_nanosvg.pyx":535 * 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, 531, __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, 535, __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, 531, __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, 535, __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, 531, __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, 535, __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, 531, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_4)) { - /* "wx/svg/_nanosvg.pyx":532 + /* "wx/svg/_nanosvg.pyx":536 * 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, 532, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 532, __pyx_L1_error) + __PYX_ERR(0, 536, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":531 + /* "wx/svg/_nanosvg.pyx":535 * def color(self) -> uint: * self._check_ptr() * if self.type != SVG_PAINT_COLOR: # <<<<<<<<<<<<<< @@ -8665,7 +8675,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p */ } - /* "wx/svg/_nanosvg.pyx":533 + /* "wx/svg/_nanosvg.pyx":537 * if self.type != SVG_PAINT_COLOR: * raise ValueError("Color not valid in this paint object") * return self._ptr.color # <<<<<<<<<<<<<< @@ -8673,13 +8683,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, 533, __pyx_L1_error) + __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_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":529 + /* "wx/svg/_nanosvg.pyx":533 * * @property * def color(self) -> uint: # <<<<<<<<<<<<<< @@ -8700,7 +8710,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":536 +/* "wx/svg/_nanosvg.pyx":540 * * @property * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< @@ -8732,19 +8742,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_10color_rgba___get__(stru PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":538 + /* "wx/svg/_nanosvg.pyx":542 * 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, 538, __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, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_c = __pyx_t_1; __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":539 + /* "wx/svg/_nanosvg.pyx":543 * """Returns color as a RGBA tuple""" * c = self.color * return ( c & 0xff, # <<<<<<<<<<<<<< @@ -8752,56 +8762,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, 539, __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, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "wx/svg/_nanosvg.pyx":540 + /* "wx/svg/_nanosvg.pyx":544 * 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, 540, __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, 544, __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, 540, __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, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":541 + /* "wx/svg/_nanosvg.pyx":545 * 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, 541, __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, 545, __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, 541, __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, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":542 + /* "wx/svg/_nanosvg.pyx":546 * (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, 542, __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, 546, __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, 542, __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, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":539 + /* "wx/svg/_nanosvg.pyx":543 * """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, 539, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -8819,7 +8829,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":536 + /* "wx/svg/_nanosvg.pyx":540 * * @property * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< @@ -8843,7 +8853,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_10color_rgba___get__(stru return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":545 +/* "wx/svg/_nanosvg.pyx":549 * * @property * def gradient(self) -> SVGgradient: # <<<<<<<<<<<<<< @@ -8874,14 +8884,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_8gradient___get__(struct int __pyx_t_5; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":546 + /* "wx/svg/_nanosvg.pyx":550 * @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, 546, __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, 550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -8895,36 +8905,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, 546, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __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":547 + /* "wx/svg/_nanosvg.pyx":551 * 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, 547, __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, 551, __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, 547, __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, 551, __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, 547, __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, 551, __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, 547, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 551, __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, 547, __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, 551, __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, 547, __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, 551, __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, 547, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_5; __pyx_L4_bool_binop_done:; @@ -8932,20 +8942,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":548 + /* "wx/svg/_nanosvg.pyx":552 * 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, 548, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 548, __pyx_L1_error) + __PYX_ERR(0, 552, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":547 + /* "wx/svg/_nanosvg.pyx":551 * def gradient(self) -> SVGgradient: * self._check_ptr() * if self.type not in [SVG_PAINT_LINEAR_GRADIENT, SVG_PAINT_RADIAL_GRADIENT]: # <<<<<<<<<<<<<< @@ -8954,7 +8964,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_8gradient___get__(struct */ } - /* "wx/svg/_nanosvg.pyx":549 + /* "wx/svg/_nanosvg.pyx":553 * 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) # <<<<<<<<<<<<<< @@ -8962,13 +8972,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, 549, __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, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":545 + /* "wx/svg/_nanosvg.pyx":549 * * @property * def gradient(self) -> SVGgradient: # <<<<<<<<<<<<<< @@ -9098,7 +9108,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_6__setstate_cython__(CYTH return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":560 +/* "wx/svg/_nanosvg.pyx":564 * cdef NSVGgradient *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -9127,7 +9137,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient___cinit__(struct __pyx_obj_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "wx/svg/_nanosvg.pyx":561 + /* "wx/svg/_nanosvg.pyx":565 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -9136,7 +9146,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient___cinit__(struct __pyx_obj_ */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":560 + /* "wx/svg/_nanosvg.pyx":564 * cdef NSVGgradient *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -9150,7 +9160,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient___cinit__(struct __pyx_obj_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":564 +/* "wx/svg/_nanosvg.pyx":568 * * @staticmethod * cdef SVGgradient from_ptr(NSVGgradient *ptr): # <<<<<<<<<<<<<< @@ -9165,19 +9175,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *__pyx_f_2wx_3svg_8_nanos PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":565 + /* "wx/svg/_nanosvg.pyx":569 * @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, 565, __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, 569, __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":566 + /* "wx/svg/_nanosvg.pyx":570 * cdef SVGgradient from_ptr(NSVGgradient *ptr): * obj = SVGgradient() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -9186,7 +9196,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":567 + /* "wx/svg/_nanosvg.pyx":571 * obj = SVGgradient() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -9198,7 +9208,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":564 + /* "wx/svg/_nanosvg.pyx":568 * * @staticmethod * cdef SVGgradient from_ptr(NSVGgradient *ptr): # <<<<<<<<<<<<<< @@ -9218,7 +9228,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *__pyx_f_2wx_3svg_8_nanos return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":569 +/* "wx/svg/_nanosvg.pyx":573 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -9247,7 +9257,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":570 + /* "wx/svg/_nanosvg.pyx":574 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -9257,20 +9267,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":571 + /* "wx/svg/_nanosvg.pyx":575 * 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, 571, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 571, __pyx_L1_error) + __PYX_ERR(0, 575, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":570 + /* "wx/svg/_nanosvg.pyx":574 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -9279,7 +9289,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ */ } - /* "wx/svg/_nanosvg.pyx":569 + /* "wx/svg/_nanosvg.pyx":573 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -9300,7 +9310,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":574 +/* "wx/svg/_nanosvg.pyx":578 * * @property * def xform(self) -> list: # <<<<<<<<<<<<<< @@ -9331,14 +9341,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5xform___get__(struct long __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":576 + /* "wx/svg/_nanosvg.pyx":580 * 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, 576, __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, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9352,12 +9362,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, 576, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __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":577 + /* "wx/svg/_nanosvg.pyx":581 * """The gradient's transform""" * self._check_ptr() * return [self._ptr.xform[i] for i in range(6)] # <<<<<<<<<<<<<< @@ -9365,20 +9375,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, 577, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __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, 577, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 577, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 581, __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":574 + /* "wx/svg/_nanosvg.pyx":578 * * @property * def xform(self) -> list: # <<<<<<<<<<<<<< @@ -9399,7 +9409,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5xform___get__(struct return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":580 +/* "wx/svg/_nanosvg.pyx":584 * * @property * def spread(self) -> int: # <<<<<<<<<<<<<< @@ -9428,14 +9438,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6spread___get__(struc PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":581 + /* "wx/svg/_nanosvg.pyx":585 * @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, 581, __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, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9449,12 +9459,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, 581, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __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":582 + /* "wx/svg/_nanosvg.pyx":586 * def spread(self) -> int: * self._check_ptr() * return int(self._ptr.spread) # <<<<<<<<<<<<<< @@ -9462,16 +9472,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, 582, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) + __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_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":580 + /* "wx/svg/_nanosvg.pyx":584 * * @property * def spread(self) -> int: # <<<<<<<<<<<<<< @@ -9492,7 +9502,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6spread___get__(struc return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":585 +/* "wx/svg/_nanosvg.pyx":589 * * @property * def fx(self) -> float: # <<<<<<<<<<<<<< @@ -9521,14 +9531,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fx___get__(struct __ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":586 + /* "wx/svg/_nanosvg.pyx":590 * @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, 586, __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, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9542,12 +9552,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, 586, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __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":587 + /* "wx/svg/_nanosvg.pyx":591 * def fx(self) -> float: * self._check_ptr() * return self._ptr.fx # <<<<<<<<<<<<<< @@ -9555,13 +9565,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, 587, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->fx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":585 + /* "wx/svg/_nanosvg.pyx":589 * * @property * def fx(self) -> float: # <<<<<<<<<<<<<< @@ -9582,7 +9592,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fx___get__(struct __ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":590 +/* "wx/svg/_nanosvg.pyx":594 * * @property * def fy(self) -> float: # <<<<<<<<<<<<<< @@ -9611,14 +9621,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fy___get__(struct __ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":591 + /* "wx/svg/_nanosvg.pyx":595 * @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, 591, __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, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9632,12 +9642,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, 591, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __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":592 + /* "wx/svg/_nanosvg.pyx":596 * def fy(self) -> float: * self._check_ptr() * return self._ptr.fy # <<<<<<<<<<<<<< @@ -9645,13 +9655,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, 592, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->fy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":590 + /* "wx/svg/_nanosvg.pyx":594 * * @property * def fy(self) -> float: # <<<<<<<<<<<<<< @@ -9673,7 +9683,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":595 +/* "wx/svg/_nanosvg.pyx":599 * * @property * def stops(self): # <<<<<<<<<<<<<< @@ -9703,7 +9713,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5stops___get__(struct 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, 595, __pyx_L1_error) + __PYX_ERR(0, 599, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -9711,7 +9721,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, 595, __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, 599, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -9747,16 +9757,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, 595, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 599, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":599 + /* "wx/svg/_nanosvg.pyx":603 * A generator that iterates over the :classL`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, 599, __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, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -9770,12 +9780,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, 599, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __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":600 + /* "wx/svg/_nanosvg.pyx":604 * """ * self._check_ptr() * for i in range(self._ptr.nstops): # <<<<<<<<<<<<<< @@ -9787,14 +9797,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":601 + /* "wx/svg/_nanosvg.pyx":605 * 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, 601, __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, 605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -9811,11 +9821,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, 601, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 605, __pyx_L1_error) } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "wx/svg/_nanosvg.pyx":595 + /* "wx/svg/_nanosvg.pyx":599 * * @property * def stops(self): # <<<<<<<<<<<<<< @@ -9951,7 +9961,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6__setstate_cython__( return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":611 +/* "wx/svg/_nanosvg.pyx":615 * cdef NSVGgradientStop *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -9980,7 +9990,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop___cinit__(struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "wx/svg/_nanosvg.pyx":612 + /* "wx/svg/_nanosvg.pyx":616 * * def __cinit__(self): * self._ptr = NULL # <<<<<<<<<<<<<< @@ -9989,7 +9999,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop___cinit__(struct __pyx_ */ __pyx_v_self->_ptr = NULL; - /* "wx/svg/_nanosvg.pyx":611 + /* "wx/svg/_nanosvg.pyx":615 * cdef NSVGgradientStop *_ptr * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -10003,7 +10013,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop___cinit__(struct __pyx_ return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":615 +/* "wx/svg/_nanosvg.pyx":619 * * @staticmethod * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): # <<<<<<<<<<<<<< @@ -10018,19 +10028,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *__pyx_f_2wx_3svg_8_n PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "wx/svg/_nanosvg.pyx":616 + /* "wx/svg/_nanosvg.pyx":620 * @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, 616, __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, 620, __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":617 + /* "wx/svg/_nanosvg.pyx":621 * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): * obj = SVGgradientStop() * obj._ptr = ptr # <<<<<<<<<<<<<< @@ -10039,7 +10049,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":618 + /* "wx/svg/_nanosvg.pyx":622 * obj = SVGgradientStop() * obj._ptr = ptr * return obj # <<<<<<<<<<<<<< @@ -10051,7 +10061,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":615 + /* "wx/svg/_nanosvg.pyx":619 * * @staticmethod * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): # <<<<<<<<<<<<<< @@ -10071,7 +10081,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *__pyx_f_2wx_3svg_8_n return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":620 +/* "wx/svg/_nanosvg.pyx":624 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -10100,7 +10110,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_check_ptr", 0); - /* "wx/svg/_nanosvg.pyx":621 + /* "wx/svg/_nanosvg.pyx":625 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -10110,20 +10120,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":622 + /* "wx/svg/_nanosvg.pyx":626 * 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, 622, __pyx_L1_error) + __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_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 622, __pyx_L1_error) + __PYX_ERR(0, 626, __pyx_L1_error) - /* "wx/svg/_nanosvg.pyx":621 + /* "wx/svg/_nanosvg.pyx":625 * * def _check_ptr(self): * if self._ptr == NULL: # <<<<<<<<<<<<<< @@ -10132,7 +10142,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc */ } - /* "wx/svg/_nanosvg.pyx":620 + /* "wx/svg/_nanosvg.pyx":624 * return obj * * def _check_ptr(self): # <<<<<<<<<<<<<< @@ -10153,7 +10163,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":625 +/* "wx/svg/_nanosvg.pyx":629 * * @property * def color(self) -> uint: # <<<<<<<<<<<<<< @@ -10182,14 +10192,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_5color___get__(st PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":626 + /* "wx/svg/_nanosvg.pyx":630 * @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, 626, __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, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10203,12 +10213,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, 626, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __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":627 + /* "wx/svg/_nanosvg.pyx":631 * def color(self) -> uint: * self._check_ptr() * return self._ptr.color # <<<<<<<<<<<<<< @@ -10216,13 +10226,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, 627, __pyx_L1_error) + __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_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":625 + /* "wx/svg/_nanosvg.pyx":629 * * @property * def color(self) -> uint: # <<<<<<<<<<<<<< @@ -10243,7 +10253,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_5color___get__(st return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":630 +/* "wx/svg/_nanosvg.pyx":634 * * @property * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< @@ -10275,19 +10285,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":632 + /* "wx/svg/_nanosvg.pyx":636 * 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, 632, __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, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_c = __pyx_t_1; __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":633 + /* "wx/svg/_nanosvg.pyx":637 * """ Returns color as a RGBA tuple """ * c = self.color * return ( c & 0xff, # <<<<<<<<<<<<<< @@ -10295,56 +10305,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, 633, __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, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "wx/svg/_nanosvg.pyx":634 + /* "wx/svg/_nanosvg.pyx":638 * 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, 634, __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, 638, __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, 634, __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, 638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":635 + /* "wx/svg/_nanosvg.pyx":639 * 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, 635, __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, 639, __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, 635, __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, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":636 + /* "wx/svg/_nanosvg.pyx":640 * (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, 636, __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, 640, __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, 636, __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, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "wx/svg/_nanosvg.pyx":633 + /* "wx/svg/_nanosvg.pyx":637 * """ 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, 633, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -10362,7 +10372,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge __pyx_t_2 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":630 + /* "wx/svg/_nanosvg.pyx":634 * * @property * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< @@ -10386,7 +10396,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge return __pyx_r; } -/* "wx/svg/_nanosvg.pyx":639 +/* "wx/svg/_nanosvg.pyx":643 * * @property * def offset(self) -> float: # <<<<<<<<<<<<<< @@ -10415,14 +10425,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_6offset___get__(s PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "wx/svg/_nanosvg.pyx":640 + /* "wx/svg/_nanosvg.pyx":644 * @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, 640, __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, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -10436,12 +10446,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, 640, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __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":641 + /* "wx/svg/_nanosvg.pyx":645 * def offset(self) -> float: * self._check_ptr() * return self._ptr.offset # <<<<<<<<<<<<<< @@ -10449,13 +10459,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, 641, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "wx/svg/_nanosvg.pyx":639 + /* "wx/svg/_nanosvg.pyx":643 * * @property * def offset(self) -> float: # <<<<<<<<<<<<<< @@ -13403,6 +13413,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Invalid_SVGshape, __pyx_k_Invalid_SVGshape, sizeof(__pyx_k_Invalid_SVGshape), 0, 0, 1, 0}, {&__pyx_kp_s_Object_does_not_support_the_pyth, __pyx_k_Object_does_not_support_the_pyth, sizeof(__pyx_k_Object_does_not_support_the_pyth), 0, 0, 1, 0}, {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1}, + {&__pyx_n_s_PY2, __pyx_k_PY2, sizeof(__pyx_k_PY2), 0, 0, 1, 1}, {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, {&__pyx_kp_s_PyObject_GetBuffer_failed, __pyx_k_PyObject_GetBuffer_failed, sizeof(__pyx_k_PyObject_GetBuffer_failed), 0, 0, 1, 0}, {&__pyx_n_s_Pyx_EnumBase, __pyx_k_Pyx_EnumBase, sizeof(__pyx_k_Pyx_EnumBase), 0, 0, 1, 1}, @@ -13528,14 +13539,15 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, + {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1}, {&__pyx_n_s_wx_svg__nanosvg, __pyx_k_wx_svg__nanosvg, sizeof(__pyx_k_wx_svg__nanosvg), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 111, __pyx_L1_error) + __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, 344, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 348, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -13545,47 +13557,47 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "wx/svg/_nanosvg.pyx":111 + /* "wx/svg/_nanosvg.pyx":113 * cdef _check_ptr(self): * if self._ptr == NULL: * raise ValueError("SVG not yet loaded") # <<<<<<<<<<<<<< * * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_SVG_not_yet_loaded); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 111, __pyx_L1_error) + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_SVG_not_yet_loaded); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); - /* "wx/svg/_nanosvg.pyx":202 + /* "wx/svg/_nanosvg.pyx":206 * * 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, 202, __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, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); - /* "wx/svg/_nanosvg.pyx":206 + /* "wx/svg/_nanosvg.pyx":210 * 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, 206, __pyx_L1_error) + __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_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "wx/svg/_nanosvg.pyx":209 + /* "wx/svg/_nanosvg.pyx":213 * 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, 209, __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, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); @@ -13608,14 +13620,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "wx/svg/_nanosvg.pyx":289 + /* "wx/svg/_nanosvg.pyx":293 * 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, 289, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGshape); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); @@ -13638,14 +13650,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "wx/svg/_nanosvg.pyx":434 + /* "wx/svg/_nanosvg.pyx":438 * 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, 434, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGpath); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); @@ -13668,36 +13680,36 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - /* "wx/svg/_nanosvg.pyx":520 + /* "wx/svg/_nanosvg.pyx":524 * 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, 520, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGpaint); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - /* "wx/svg/_nanosvg.pyx":532 + /* "wx/svg/_nanosvg.pyx":536 * 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, 532, __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, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "wx/svg/_nanosvg.pyx":548 + /* "wx/svg/_nanosvg.pyx":552 * 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, 548, __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, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); @@ -13720,14 +13732,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - /* "wx/svg/_nanosvg.pyx":571 + /* "wx/svg/_nanosvg.pyx":575 * 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, 571, __pyx_L1_error) + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGgradient); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); @@ -13750,14 +13762,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - /* "wx/svg/_nanosvg.pyx":622 + /* "wx/svg/_nanosvg.pyx":626 * 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, 622, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGgradientStop); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); @@ -13894,83 +13906,83 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_2wx_3svg_8_nanosvg_SVGimageBase._check_ptr = (PyObject *(*)(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *))__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__check_ptr; __pyx_vtable_2wx_3svg_8_nanosvg_SVGimageBase._set_ptr = (PyObject *(*)(struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *, NSVGimage *, struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr *__pyx_optional_args))__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr; __pyx_vtable_2wx_3svg_8_nanosvg_SVGimageBase.from_ptr = (struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *(*)(NSVGimage *))__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase_from_ptr; - if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 85, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 87, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg_SVGimageBase.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase.tp_dictoffset && __pyx_type_2wx_3svg_8_nanosvg_SVGimageBase.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_2wx_3svg_8_nanosvg_SVGimageBase.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 85, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGimageBase, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 85, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 85, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 87, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGimageBase, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 87, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 87, __pyx_L1_error) __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, 276, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 280, __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, 276, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGshape, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 276, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 276, __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, 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) __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, 415, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 419, __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, 415, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpath, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 415, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 415, __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, 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) __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, 501, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 505, __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, 501, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpaint, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 501, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 501, __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, 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) __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, 553, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 557, __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, 553, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradient, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 553, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 553, __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, 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) __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, 605, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 609, __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, 605, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradientStop, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 605, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 605, __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, 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) __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, 263, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__) < 0) __PYX_ERR(0, 267, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__.tp_print = 0; #endif @@ -13978,7 +13990,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, 403, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__) < 0) __PYX_ERR(0, 407, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__.tp_print = 0; #endif @@ -13986,7 +13998,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, 595, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__) < 0) __PYX_ERR(0, 599, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__.tp_print = 0; #endif @@ -14249,52 +14261,73 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "wx/svg/_nanosvg.pyx":132 + /* "wx/svg/_nanosvg.pyx":50 + * PyBuffer_Release) + * + * PY2 = sys.version_info[0] == 2 # <<<<<<<<<<<<<< + * + * #---------------------------------------------------------------------------- + */ + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PY2, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "wx/svg/_nanosvg.pyx":134 * * @classmethod * def CreateFromFile(cls, str filename, str units='px', float dpi=96): # <<<<<<<<<<<<<< * """ * Loads an SVG image from a file. */ - __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase, __pyx_n_s_CreateFromFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase, __pyx_n_s_CreateFromFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); - /* "wx/svg/_nanosvg.pyx":131 + /* "wx/svg/_nanosvg.pyx":133 * * * @classmethod # <<<<<<<<<<<<<< * def CreateFromFile(cls, str filename, str units='px', float dpi=96): * """ */ - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 131, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase->tp_dict, __pyx_n_s_CreateFromFile, __pyx_t_2) < 0) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase->tp_dict, __pyx_n_s_CreateFromFile, __pyx_t_1) < 0) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase); - /* "wx/svg/_nanosvg.pyx":150 + /* "wx/svg/_nanosvg.pyx":153 * * @classmethod * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96): # <<<<<<<<<<<<<< * """ * Loads an SVG image from a bytes object. */ - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase, __pyx_n_s_CreateFromBytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase, __pyx_n_s_CreateFromBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); - /* "wx/svg/_nanosvg.pyx":149 + /* "wx/svg/_nanosvg.pyx":152 * * * @classmethod # <<<<<<<<<<<<<< * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96): * """ */ - __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase->tp_dict, __pyx_n_s_CreateFromBytes, __pyx_t_1) < 0) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase->tp_dict, __pyx_n_s_CreateFromBytes, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase); /* "wx/svg/_nanosvg.pyx":1 @@ -14302,10 +14335,10 @@ if (!__Pyx_RefNanny) { * # Name: wx.svg._nanosvg.pyx * # Purpose: Cython-based wrappers for the nanosvg C code. See */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "EnumBase":9 * @@ -14324,22 +14357,22 @@ if (!__Pyx_RefNanny) { * else: * __Pyx_OrderedDict = dict */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_OrderedDict); __Pyx_GIVEREF(__pyx_n_s_OrderedDict); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrderedDict); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_OrderedDict); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_1); - __Pyx_XGOTREF(__Pyx_OrderedDict); - __Pyx_DECREF_SET(__Pyx_OrderedDict, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 10, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __Pyx_XGOTREF(__Pyx_OrderedDict); + __Pyx_DECREF_SET(__Pyx_OrderedDict, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "EnumBase":9 * @@ -14373,14 +14406,14 @@ if (!__Pyx_RefNanny) { * __metaclass__ = __Pyx_EnumMeta * def __new__(cls, value, name=None): */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 26, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)(&PyInt_Type))); __Pyx_GIVEREF(((PyObject *)(&PyInt_Type))); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&PyInt_Type))); - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 26, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Pyx_EnumBase, __pyx_n_s_Pyx_EnumBase, (PyObject *) NULL, __pyx_n_s_EnumBase, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 26, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)(&PyInt_Type))); + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_Pyx_EnumBase, __pyx_n_s_Pyx_EnumBase, (PyObject *) NULL, __pyx_n_s_EnumBase, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "EnumBase":27 @@ -14436,15 +14469,15 @@ if (!__Pyx_RefNanny) { * __metaclass__ = __Pyx_EnumMeta * def __new__(cls, value, name=None): */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Pyx_EnumBase, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 26, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_Pyx_EnumBase, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XGOTREF(__Pyx_EnumBase); __Pyx_DECREF_SET(__Pyx_EnumBase, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "EnumBase":44 * return "%s.%s" % (self.__class__.__name__, self.name) @@ -14462,22 +14495,22 @@ if (!__Pyx_RefNanny) { * from enum import IntEnum as __Pyx_EnumBase # <<<<<<<<<<<<<< * */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_IntEnum); __Pyx_GIVEREF(__pyx_n_s_IntEnum); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_IntEnum); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error) + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_IntEnum); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_2); - __Pyx_XGOTREF(__Pyx_EnumBase); - __Pyx_DECREF_SET(__Pyx_EnumBase, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_IntEnum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_1); + __Pyx_XGOTREF(__Pyx_EnumBase); + __Pyx_DECREF_SET(__Pyx_EnumBase, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "EnumBase":44 * return "%s.%s" % (self.__class__.__name__, self.name) @@ -14493,10 +14526,10 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8EnumBase_1__pyx_unpickle___Pyx_EnumMeta, NULL, __pyx_n_s_EnumBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle___Pyx_EnumMeta, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8EnumBase_1__pyx_unpickle___Pyx_EnumMeta, NULL, __pyx_n_s_EnumBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle___Pyx_EnumMeta, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "EnumType":50 * @@ -14505,13 +14538,13 @@ if (!__Pyx_RefNanny) { * if PY_VERSION_HEX >= 0x03040000: * */ - __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 50, __pyx_L1_error) + __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 50, __pyx_L1_error) __Pyx_XGOTREF(__Pyx_globals); - __Pyx_DECREF_SET(__Pyx_globals, ((PyObject*)__pyx_t_1)); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; + __Pyx_DECREF_SET(__Pyx_globals, ((PyObject*)__pyx_t_2)); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; /* "EnumType":51 * @@ -14530,16 +14563,16 @@ if (!__Pyx_RefNanny) { * ('SVG_FILLRULE_EVENODD', SVG_FILLRULE_EVENODD), * ])) */ - __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(__pyx_e_2wx_3svg_8_nanosvg_SVG_FILLRULE_NONZERO); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(__pyx_e_2wx_3svg_8_nanosvg_SVG_FILLRULE_NONZERO); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVG_FILLRULE_NONZERO); __Pyx_GIVEREF(__pyx_n_s_SVG_FILLRULE_NONZERO); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVG_FILLRULE_NONZERO); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); - __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVG_FILLRULE_NONZERO); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); + __pyx_t_2 = 0; /* "EnumType":55 * SVGfillRule = __Pyx_EnumBase('SVGfillRule', __Pyx_OrderedDict([ @@ -14548,16 +14581,16 @@ if (!__Pyx_RefNanny) { * ])) * __Pyx_globals['SVG_FILLRULE_NONZERO'] = SVGfillRule.SVG_FILLRULE_NONZERO */ - __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(__pyx_e_2wx_3svg_8_nanosvg_SVG_FILLRULE_EVENODD); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(__pyx_e_2wx_3svg_8_nanosvg_SVG_FILLRULE_EVENODD); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_SVG_FILLRULE_EVENODD); __Pyx_GIVEREF(__pyx_n_s_SVG_FILLRULE_EVENODD); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_SVG_FILLRULE_EVENODD); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __pyx_t_2 = 0; /* "EnumType":53 * if PY_VERSION_HEX >= 0x03040000: @@ -14566,28 +14599,28 @@ if (!__Pyx_RefNanny) { * ('SVG_FILLRULE_NONZERO', SVG_FILLRULE_NONZERO), * ('SVG_FILLRULE_EVENODD', SVG_FILLRULE_EVENODD), */ - __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); - PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); - __pyx_t_2 = 0; + PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + __pyx_t_1 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_SVGfillRule); __Pyx_GIVEREF(__pyx_n_s_SVGfillRule); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVGfillRule); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVGfillRule); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__Pyx_EnumBase, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__Pyx_EnumBase, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGfillRule, __pyx_t_4) < 0) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -14600,15 +14633,15 @@ if (!__Pyx_RefNanny) { */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SVG_FILLRULE_NONZERO); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SVG_FILLRULE_NONZERO); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 57, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_FILLRULE_NONZERO, __pyx_t_1) < 0)) __PYX_ERR(1, 57, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_FILLRULE_NONZERO, __pyx_t_2) < 0)) __PYX_ERR(1, 57, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "EnumType":58 * ])) @@ -14617,11 +14650,11 @@ if (!__Pyx_RefNanny) { * else: * class SVGfillRule(__Pyx_EnumBase): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SVG_FILLRULE_EVENODD); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SVG_FILLRULE_EVENODD); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 58, __pyx_L1_error) @@ -14652,16 +14685,16 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__Pyx_EnumBase); __Pyx_GIVEREF(__Pyx_EnumBase); PyTuple_SET_ITEM(__pyx_t_4, 0, __Pyx_EnumBase); - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_4, __pyx_n_s_SVGfillRule, __pyx_n_s_SVGfillRule, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 60, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SVGfillRule, __pyx_t_4, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_n_s_SVGfillRule, __pyx_n_s_SVGfillRule, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SVGfillRule, __pyx_t_4, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGfillRule, __pyx_t_5) < 0) __PYX_ERR(1, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "EnumType":62 @@ -14673,26 +14706,26 @@ if (!__Pyx_RefNanny) { */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(__pyx_e_2wx_3svg_8_nanosvg_SVG_FILLRULE_NONZERO); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(__pyx_e_2wx_3svg_8_nanosvg_SVG_FILLRULE_NONZERO); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_INCREF(__pyx_n_s_SVG_FILLRULE_NONZERO); __Pyx_GIVEREF(__pyx_n_s_SVG_FILLRULE_NONZERO); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_SVG_FILLRULE_NONZERO); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_SVG_FILLRULE_NONZERO); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 62, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_FILLRULE_NONZERO, __pyx_t_1) < 0)) __PYX_ERR(1, 62, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_FILLRULE_NONZERO, __pyx_t_2) < 0)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "EnumType":63 * pass @@ -14700,28 +14733,28 @@ if (!__Pyx_RefNanny) { * __Pyx_globals['SVG_FILLRULE_EVENODD'] = SVGfillRule(SVG_FILLRULE_EVENODD, 'SVG_FILLRULE_EVENODD') # <<<<<<<<<<<<<< * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(__pyx_e_2wx_3svg_8_nanosvg_SVG_FILLRULE_EVENODD); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 63, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGfillRule(__pyx_e_2wx_3svg_8_nanosvg_SVG_FILLRULE_EVENODD); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVG_FILLRULE_EVENODD); __Pyx_GIVEREF(__pyx_n_s_SVG_FILLRULE_EVENODD); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_SVG_FILLRULE_EVENODD); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 63, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 63, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 63, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_FILLRULE_EVENODD, __pyx_t_2) < 0)) __PYX_ERR(1, 63, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_FILLRULE_EVENODD, __pyx_t_1) < 0)) __PYX_ERR(1, 63, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; @@ -14732,13 +14765,13 @@ if (!__Pyx_RefNanny) { * if PY_VERSION_HEX >= 0x03040000: * */ - __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(1, 50, __pyx_L1_error) + __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 50, __pyx_L1_error) __Pyx_XGOTREF(__Pyx_globals); - __Pyx_DECREF_SET(__Pyx_globals, ((PyObject*)__pyx_t_2)); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; + __Pyx_DECREF_SET(__Pyx_globals, ((PyObject*)__pyx_t_1)); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; /* "EnumType":51 * @@ -14757,16 +14790,16 @@ if (!__Pyx_RefNanny) { * ])) * __Pyx_globals['SVG_FLAGS_VISIBLE'] = SVGflags.SVG_FLAGS_VISIBLE */ - __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGflags(__pyx_e_2wx_3svg_8_nanosvg_SVG_FLAGS_VISIBLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGflags(__pyx_e_2wx_3svg_8_nanosvg_SVG_FLAGS_VISIBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_SVG_FLAGS_VISIBLE); __Pyx_GIVEREF(__pyx_n_s_SVG_FLAGS_VISIBLE); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_SVG_FLAGS_VISIBLE); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; /* "EnumType":53 * if PY_VERSION_HEX >= 0x03040000: @@ -14775,25 +14808,25 @@ if (!__Pyx_RefNanny) { * ('SVG_FLAGS_VISIBLE', SVG_FLAGS_VISIBLE), * ])) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVGflags); __Pyx_GIVEREF(__pyx_n_s_SVGflags); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVGflags); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVGflags); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__Pyx_EnumBase, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__Pyx_EnumBase, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGflags, __pyx_t_4) < 0) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -14806,15 +14839,15 @@ if (!__Pyx_RefNanny) { */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SVGflags); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SVG_FLAGS_VISIBLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SVG_FLAGS_VISIBLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 56, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_FLAGS_VISIBLE, __pyx_t_2) < 0)) __PYX_ERR(1, 56, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_FLAGS_VISIBLE, __pyx_t_1) < 0)) __PYX_ERR(1, 56, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "EnumType":51 * @@ -14834,22 +14867,22 @@ if (!__Pyx_RefNanny) { * __Pyx_globals['SVG_FLAGS_VISIBLE'] = SVGflags(SVG_FLAGS_VISIBLE, 'SVG_FLAGS_VISIBLE') */ /*else*/ { - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 58, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_EnumBase); __Pyx_GIVEREF(__Pyx_EnumBase); - PyTuple_SET_ITEM(__pyx_t_2, 0, __Pyx_EnumBase); - __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_EnumBase); + __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_SVGflags, __pyx_n_s_SVGflags, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_SVGflags, __pyx_t_2, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 58, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_1, __pyx_n_s_SVGflags, __pyx_n_s_SVGflags, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_SVGflags, __pyx_t_1, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGflags, __pyx_t_5) < 0) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "EnumType":60 * class SVGflags(__Pyx_EnumBase): @@ -14857,22 +14890,22 @@ if (!__Pyx_RefNanny) { * __Pyx_globals['SVG_FLAGS_VISIBLE'] = SVGflags(SVG_FLAGS_VISIBLE, 'SVG_FLAGS_VISIBLE') # <<<<<<<<<<<<<< * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGflags); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGflags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGflags(__pyx_e_2wx_3svg_8_nanosvg_SVG_FLAGS_VISIBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_INCREF(__pyx_n_s_SVG_FLAGS_VISIBLE); __Pyx_GIVEREF(__pyx_n_s_SVG_FLAGS_VISIBLE); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_SVG_FLAGS_VISIBLE); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_SVG_FLAGS_VISIBLE); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 60, __pyx_L1_error) @@ -14916,13 +14949,13 @@ if (!__Pyx_RefNanny) { */ __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineCap(__pyx_e_2wx_3svg_8_nanosvg_SVG_CAP_BUTT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_SVG_CAP_BUTT); __Pyx_GIVEREF(__pyx_n_s_SVG_CAP_BUTT); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVG_CAP_BUTT); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVG_CAP_BUTT); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; /* "EnumType":55 @@ -14934,13 +14967,13 @@ if (!__Pyx_RefNanny) { */ __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineCap(__pyx_e_2wx_3svg_8_nanosvg_SVG_CAP_ROUND); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVG_CAP_ROUND); __Pyx_GIVEREF(__pyx_n_s_SVG_CAP_ROUND); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVG_CAP_ROUND); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVG_CAP_ROUND); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; /* "EnumType":56 @@ -14970,14 +15003,14 @@ if (!__Pyx_RefNanny) { */ __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_1); - PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_5); - __pyx_t_1 = 0; __pyx_t_2 = 0; + __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -15078,13 +15111,13 @@ if (!__Pyx_RefNanny) { PyTuple_SET_ITEM(__pyx_t_4, 0, __Pyx_EnumBase); __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_n_s_SVGlineCap, __pyx_n_s_SVGlineCap, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_SVGlineCap, __pyx_t_4, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_n_s_SVGlineCap, __pyx_n_s_SVGlineCap, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGlineCap, __pyx_t_1) < 0) __PYX_ERR(1, 62, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_SVGlineCap, __pyx_t_4, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGlineCap, __pyx_t_2) < 0) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -15099,18 +15132,18 @@ if (!__Pyx_RefNanny) { __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineCap(__pyx_e_2wx_3svg_8_nanosvg_SVG_CAP_BUTT); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __Pyx_INCREF(__pyx_n_s_SVG_CAP_BUTT); __Pyx_GIVEREF(__pyx_n_s_SVG_CAP_BUTT); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_SVG_CAP_BUTT); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_SVG_CAP_BUTT); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 64, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 64, __pyx_L1_error) @@ -15127,26 +15160,26 @@ if (!__Pyx_RefNanny) { */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_SVGlineCap); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineCap(__pyx_e_2wx_3svg_8_nanosvg_SVG_CAP_ROUND); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineCap(__pyx_e_2wx_3svg_8_nanosvg_SVG_CAP_ROUND); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVG_CAP_ROUND); __Pyx_GIVEREF(__pyx_n_s_SVG_CAP_ROUND); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_SVG_CAP_ROUND); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 65, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_CAP_ROUND, __pyx_t_2) < 0)) __PYX_ERR(1, 65, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_CAP_ROUND, __pyx_t_1) < 0)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "EnumType":66 * __Pyx_globals['SVG_CAP_BUTT'] = SVGlineCap(SVG_CAP_BUTT, 'SVG_CAP_BUTT') @@ -15154,8 +15187,8 @@ if (!__Pyx_RefNanny) { * __Pyx_globals['SVG_CAP_SQUARE'] = SVGlineCap(SVG_CAP_SQUARE, 'SVG_CAP_SQUARE') # <<<<<<<<<<<<<< * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineCap); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGlineCap); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineCap(__pyx_e_2wx_3svg_8_nanosvg_SVG_CAP_SQUARE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 66, __pyx_L1_error) @@ -15166,9 +15199,9 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_n_s_SVG_CAP_SQUARE); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_SVG_CAP_SQUARE); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -15231,13 +15264,13 @@ if (!__Pyx_RefNanny) { */ __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin(__pyx_e_2wx_3svg_8_nanosvg_SVG_JOIN_ROUND); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVG_JOIN_ROUND); __Pyx_GIVEREF(__pyx_n_s_SVG_JOIN_ROUND); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVG_JOIN_ROUND); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVG_JOIN_ROUND); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; /* "EnumType":56 @@ -15249,13 +15282,13 @@ if (!__Pyx_RefNanny) { */ __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin(__pyx_e_2wx_3svg_8_nanosvg_SVG_JOIN_BEVEL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_SVG_JOIN_BEVEL); __Pyx_GIVEREF(__pyx_n_s_SVG_JOIN_BEVEL); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVG_JOIN_BEVEL); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVG_JOIN_BEVEL); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; /* "EnumType":53 @@ -15269,29 +15302,29 @@ if (!__Pyx_RefNanny) { __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_2); - PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_1); + PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); __pyx_t_5 = 0; - __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_SVGlineJoin); __Pyx_GIVEREF(__pyx_n_s_SVGlineJoin); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_SVGlineJoin); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__Pyx_EnumBase, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__Pyx_EnumBase, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGlineJoin, __pyx_t_1) < 0) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGlineJoin, __pyx_t_2) < 0) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "EnumType":58 * ('SVG_JOIN_BEVEL', SVG_JOIN_BEVEL), @@ -15300,11 +15333,11 @@ if (!__Pyx_RefNanny) { * __Pyx_globals['SVG_JOIN_ROUND'] = SVGlineJoin.SVG_JOIN_ROUND * __Pyx_globals['SVG_JOIN_BEVEL'] = SVGlineJoin.SVG_JOIN_BEVEL */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SVG_JOIN_MITER); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SVG_JOIN_MITER); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 58, __pyx_L1_error) @@ -15321,15 +15354,15 @@ if (!__Pyx_RefNanny) { */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SVG_JOIN_ROUND); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 59, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SVG_JOIN_ROUND); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 59, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_JOIN_ROUND, __pyx_t_1) < 0)) __PYX_ERR(1, 59, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_JOIN_ROUND, __pyx_t_2) < 0)) __PYX_ERR(1, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "EnumType":60 * __Pyx_globals['SVG_JOIN_MITER'] = SVGlineJoin.SVG_JOIN_MITER @@ -15338,11 +15371,11 @@ if (!__Pyx_RefNanny) { * else: * class SVGlineJoin(__Pyx_EnumBase): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SVG_JOIN_BEVEL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SVG_JOIN_BEVEL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 60, __pyx_L1_error) @@ -15373,16 +15406,16 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__Pyx_EnumBase); __Pyx_GIVEREF(__Pyx_EnumBase); PyTuple_SET_ITEM(__pyx_t_4, 0, __Pyx_EnumBase); - __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_4, __pyx_n_s_SVGlineJoin, __pyx_n_s_SVGlineJoin, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error) + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SVGlineJoin, __pyx_t_4, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 62, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_n_s_SVGlineJoin, __pyx_n_s_SVGlineJoin, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SVGlineJoin, __pyx_t_4, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGlineJoin, __pyx_t_5) < 0) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "EnumType":64 @@ -15394,26 +15427,26 @@ if (!__Pyx_RefNanny) { */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin(__pyx_e_2wx_3svg_8_nanosvg_SVG_JOIN_MITER); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin(__pyx_e_2wx_3svg_8_nanosvg_SVG_JOIN_MITER); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_INCREF(__pyx_n_s_SVG_JOIN_MITER); __Pyx_GIVEREF(__pyx_n_s_SVG_JOIN_MITER); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_SVG_JOIN_MITER); - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_SVG_JOIN_MITER); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 64, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_JOIN_MITER, __pyx_t_1) < 0)) __PYX_ERR(1, 64, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_JOIN_MITER, __pyx_t_2) < 0)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "EnumType":65 * pass @@ -15422,28 +15455,28 @@ if (!__Pyx_RefNanny) { * __Pyx_globals['SVG_JOIN_BEVEL'] = SVGlineJoin(SVG_JOIN_BEVEL, 'SVG_JOIN_BEVEL') * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin(__pyx_e_2wx_3svg_8_nanosvg_SVG_JOIN_ROUND); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin(__pyx_e_2wx_3svg_8_nanosvg_SVG_JOIN_ROUND); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVG_JOIN_ROUND); __Pyx_GIVEREF(__pyx_n_s_SVG_JOIN_ROUND); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_SVG_JOIN_ROUND); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 65, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_JOIN_ROUND, __pyx_t_2) < 0)) __PYX_ERR(1, 65, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_JOIN_ROUND, __pyx_t_1) < 0)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "EnumType":66 * __Pyx_globals['SVG_JOIN_MITER'] = SVGlineJoin(SVG_JOIN_MITER, 'SVG_JOIN_MITER') @@ -15451,22 +15484,22 @@ if (!__Pyx_RefNanny) { * __Pyx_globals['SVG_JOIN_BEVEL'] = SVGlineJoin(SVG_JOIN_BEVEL, 'SVG_JOIN_BEVEL') # <<<<<<<<<<<<<< * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin(__pyx_e_2wx_3svg_8_nanosvg_SVG_JOIN_BEVEL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 66, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __Pyx_INCREF(__pyx_n_s_SVG_JOIN_BEVEL); __Pyx_GIVEREF(__pyx_n_s_SVG_JOIN_BEVEL); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_SVG_JOIN_BEVEL); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_SVG_JOIN_BEVEL); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 66, __pyx_L1_error) @@ -15510,13 +15543,13 @@ if (!__Pyx_RefNanny) { */ __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(__pyx_e_2wx_3svg_8_nanosvg_SVG_PAINT_NONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_SVG_PAINT_NONE); __Pyx_GIVEREF(__pyx_n_s_SVG_PAINT_NONE); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVG_PAINT_NONE); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVG_PAINT_NONE); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; /* "EnumType":55 @@ -15528,13 +15561,13 @@ if (!__Pyx_RefNanny) { */ __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(__pyx_e_2wx_3svg_8_nanosvg_SVG_PAINT_COLOR); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVG_PAINT_COLOR); __Pyx_GIVEREF(__pyx_n_s_SVG_PAINT_COLOR); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVG_PAINT_COLOR); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVG_PAINT_COLOR); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; /* "EnumType":56 @@ -15582,16 +15615,16 @@ if (!__Pyx_RefNanny) { */ __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_1); - PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_4, 3, __pyx_t_6); - __pyx_t_1 = 0; __pyx_t_2 = 0; + __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 53, __pyx_L1_error) @@ -15714,10 +15747,10 @@ if (!__Pyx_RefNanny) { __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_6, __pyx_n_s_SVGpaintType, __pyx_n_s_SVGpaintType, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_SVGpaintType, __pyx_t_6, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGpaintType, __pyx_t_2) < 0) __PYX_ERR(1, 64, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_SVGpaintType, __pyx_t_6, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGpaintType, __pyx_t_1) < 0) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -15913,13 +15946,13 @@ if (!__Pyx_RefNanny) { */ __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGspreadType(__pyx_e_2wx_3svg_8_nanosvg_SVG_SPREAD_REPEAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVG_SPREAD_REPEAT); __Pyx_GIVEREF(__pyx_n_s_SVG_SPREAD_REPEAT); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SVG_SPREAD_REPEAT); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SVG_SPREAD_REPEAT); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; /* "EnumType":53 @@ -15935,27 +15968,27 @@ if (!__Pyx_RefNanny) { PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_2); - PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_1); __pyx_t_5 = 0; __pyx_t_6 = 0; - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__Pyx_OrderedDict, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_SVGspreadType); __Pyx_GIVEREF(__pyx_n_s_SVGspreadType); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_SVGspreadType); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__Pyx_EnumBase, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__Pyx_EnumBase, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGspreadType, __pyx_t_2) < 0) __PYX_ERR(1, 53, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGspreadType, __pyx_t_1) < 0) __PYX_ERR(1, 53, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "EnumType":58 * ('SVG_SPREAD_REPEAT', SVG_SPREAD_REPEAT), @@ -15964,11 +15997,11 @@ if (!__Pyx_RefNanny) { * __Pyx_globals['SVG_SPREAD_REFLECT'] = SVGspreadType.SVG_SPREAD_REFLECT * __Pyx_globals['SVG_SPREAD_REPEAT'] = SVGspreadType.SVG_SPREAD_REPEAT */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGspreadType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 58, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SVG_SPREAD_PAD); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGspreadType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SVG_SPREAD_PAD); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 58, __pyx_L1_error) @@ -15985,15 +16018,15 @@ if (!__Pyx_RefNanny) { */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SVGspreadType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SVG_SPREAD_REFLECT); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 59, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SVG_SPREAD_REFLECT); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 59, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 59, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_SPREAD_REFLECT, __pyx_t_2) < 0)) __PYX_ERR(1, 59, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_SPREAD_REFLECT, __pyx_t_1) < 0)) __PYX_ERR(1, 59, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "EnumType":60 * __Pyx_globals['SVG_SPREAD_PAD'] = SVGspreadType.SVG_SPREAD_PAD @@ -16002,11 +16035,11 @@ if (!__Pyx_RefNanny) { * else: * class SVGspreadType(__Pyx_EnumBase): */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGspreadType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SVG_SPREAD_REPEAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGspreadType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SVG_SPREAD_REPEAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 60, __pyx_L1_error) @@ -16037,16 +16070,16 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__Pyx_EnumBase); __Pyx_GIVEREF(__Pyx_EnumBase); PyTuple_SET_ITEM(__pyx_t_4, 0, __Pyx_EnumBase); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 62, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_4, __pyx_n_s_SVGspreadType, __pyx_n_s_SVGspreadType, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 62, __pyx_L1_error) + __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_4, __pyx_n_s_SVGspreadType, __pyx_n_s_SVGspreadType, (PyObject *) NULL, __pyx_n_s_EnumType, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SVGspreadType, __pyx_t_4, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 62, __pyx_L1_error) + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SVGspreadType, __pyx_t_4, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_d, __pyx_n_s_SVGspreadType, __pyx_t_5) < 0) __PYX_ERR(1, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "EnumType":64 @@ -16058,26 +16091,26 @@ if (!__Pyx_RefNanny) { */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SVGspreadType); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGspreadType(__pyx_e_2wx_3svg_8_nanosvg_SVG_SPREAD_PAD); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGspreadType(__pyx_e_2wx_3svg_8_nanosvg_SVG_SPREAD_PAD); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __Pyx_INCREF(__pyx_n_s_SVG_SPREAD_PAD); __Pyx_GIVEREF(__pyx_n_s_SVG_SPREAD_PAD); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_SVG_SPREAD_PAD); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 64, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_SPREAD_PAD, __pyx_t_2) < 0)) __PYX_ERR(1, 64, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(PyDict_SetItem(__Pyx_globals, __pyx_n_s_SVG_SPREAD_PAD, __pyx_t_1) < 0)) __PYX_ERR(1, 64, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "EnumType":65 * pass @@ -16086,8 +16119,8 @@ if (!__Pyx_RefNanny) { * __Pyx_globals['SVG_SPREAD_REPEAT'] = SVGspreadType(SVG_SPREAD_REPEAT, 'SVG_SPREAD_REPEAT') * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGspreadType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_SVGspreadType); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 65, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGspreadType(__pyx_e_2wx_3svg_8_nanosvg_SVG_SPREAD_REFLECT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 65, __pyx_L1_error) @@ -16098,9 +16131,9 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_n_s_SVG_SPREAD_REFLECT); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_SVG_SPREAD_REFLECT); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 65, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -16119,18 +16152,18 @@ if (!__Pyx_RefNanny) { __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGspreadType(__pyx_e_2wx_3svg_8_nanosvg_SVG_SPREAD_REPEAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 66, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_INCREF(__pyx_n_s_SVG_SPREAD_REPEAT); __Pyx_GIVEREF(__pyx_n_s_SVG_SPREAD_REPEAT); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_SVG_SPREAD_REPEAT); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_SVG_SPREAD_REPEAT); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_globals == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(1, 66, __pyx_L1_error) @@ -17789,6 +17822,73 @@ GOOD: return ret; } +/* PyIntCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_TRUE; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); + const digit* digits = ((PyLongObject*)op1)->ob_digit; + if (intval == 0) { + if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_FALSE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_FALSE; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + /* ClassMethod */ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 @@ -18851,6 +18951,37 @@ bad: Py_XDECREF(py_frame); } +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) @@ -18966,37 +19097,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char valu } } -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } -} - /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum____pyx_t_2wx_3svg_8_nanosvg_SVGpaintType(enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType value) { const enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType neg_one = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) ((enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) 0 - (enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) 1), const_zero = (enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType) 0; diff --git a/wx/svg/_nanosvg.pyx b/wx/svg/_nanosvg.pyx index d4e28e7f..92a8620f 100644 --- a/wx/svg/_nanosvg.pyx +++ b/wx/svg/_nanosvg.pyx @@ -47,6 +47,8 @@ from cpython.buffer cimport ( Py_buffer, PyObject_CheckBuffer, PyObject_GetBuffer, PyBUF_SIMPLE, PyBuffer_Release) +PY2 = sys.version_info[0] == 2 + #---------------------------------------------------------------------------- # Replicate the C enums and values for Python, dropping the leading 'N' @@ -140,8 +142,9 @@ cdef class SVGimageBase: :rtype: An instance of ``cls`` (usually a :class:`SVGimage`) """ name = filename.encode(sys.getfilesystemencoding()) + units_b = units.encode('utf-8') cdef SVGimageBase img = cls() - img._set_ptr(nsvgParseFromFile(name, bytes(units, 'utf-8'), dpi), + img._set_ptr(nsvgParseFromFile(name, units_b, dpi), 'Unable to parse SVG file {}'.format(filename)) return img @@ -157,8 +160,9 @@ cdef class SVGimageBase: :rtype: An instance of ``cls`` (usually a :class:`SVGimage`) """ + units_b = units.encode('utf-8') cdef SVGimageBase img = cls() - img._set_ptr(nsvgParse(buffer, bytes(units, 'utf-8'), dpi), + img._set_ptr(nsvgParse(buffer, units_b, dpi), 'Unable to parse SVG buffer') return img @@ -225,7 +229,7 @@ cdef class SVGimageBase: :param int `height`: height of the image to render, defaults to height from the SVG file :param int `stride`: number of bytes per scan line in the destination buffer, typically ``width * 4`` - :returns: A bytes object containing the raw RGBA pixel color values + :returns: A bytearray object containing the raw RGBA pixel color values """ self._check_ptr() if self._rasterizer == NULL: @@ -238,7 +242,7 @@ cdef class SVGimageBase: if stride == -1: stride = width * 4; - buf = bytes(height * stride) + buf = bytes(bytearray(height * stride)) nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, width, height, stride) return buf