diff --git a/app-creativity/audacity/autobuild/defines b/app-creativity/audacity/autobuild/defines index a298c193c25..3b52384e873 100644 --- a/app-creativity/audacity/autobuild/defines +++ b/app-creativity/audacity/autobuild/defines @@ -1,8 +1,24 @@ PKGNAME=audacity PKGSEC=sound -PKGDEP="libmad libid3tag wxgtk3 lame hicolor-icon-theme desktop-file-utils \ - jack ffmpeg twolame vamp-plugin-sdk soxr soundtouch libsbsms \ - lilv lv2 suil sqlite" PKGDES="A program that lets you manipulate digital audio waveforms" +PKGDEP="wxgtk3 expat lame libsndfile soxr sqlite curl ffmpeg libid3tag \ + vamp-plugin-sdk libogg libvorbis flac lilv lv2 serd sord sratom suil \ + portmidi portsmf libsbsms twolame zlib opusfile rapidjson portaudio" +BUILDDEP="graphviz" -NOLTO__LOONGSON3=1 +ABTYPE=cmakeninja +CMAKE_AFTER="-Daudacity_use_ffmpeg=loaded \ + -Daudacity_lib_preference=system \ + -Daudacity_obey_system_dependencies=ON \ + -Daudacity_conan_enabled=OFF \ + -Daudacity_conan_allow_prebuilt_binaries=OFF \ + -Daudacity_has_vst3=OFF \ + -Daudacity_has_networking=OFF \ + -Daudacity_has_audiocom_upload=OFF \ + -Daudacity_has_updates_check=OFF \ + -Daudacity_has_crashreports=OFF \ + -Daudacity_has_sentry_reporting=OFF \ + -Daudacity_has_url_schemes_support=ON \ + -DwxBUILD_TOOLKIT=gtk3 \ + -DAUDACITY_BUILD_LEVEL=2 \ + -DCMAKE_SKIP_RPATH=OFF" diff --git a/app-creativity/audacity/spec b/app-creativity/audacity/spec index 702f590fe00..05f2ee6ea8c 100644 --- a/app-creativity/audacity/spec +++ b/app-creativity/audacity/spec @@ -1,5 +1,4 @@ -VER=2.4.2 -REL=2 -SRCS="tbl::https://github.com/audacity/audacity/archive/Audacity-$VER.tar.gz" -CHKSUMS="sha256::cdb4800c8e9d1d4ca19964caf8d24000f80286ebd8a4db566c2622449744c099" +VER=3.4.2 +SRCS="git::commit=tags/Audacity-$VER::https://github.com/audacity/audacity" +CHKSUMS="SKIP" CHKUPDATE="anitya::id=139" diff --git a/app-creativity/hugin/autobuild/defines b/app-creativity/hugin/autobuild/defines index 20f192293ba..5f1e32276ba 100644 --- a/app-creativity/hugin/autobuild/defines +++ b/app-creativity/hugin/autobuild/defines @@ -1,12 +1,11 @@ PKGNAME=hugin PKGSEC=graphics -PKGDEP="boost desktop-file-utils enblend-enfuse exiv2 lapack lensfun libpano13 make \ - perl-image-exiftool python-3 wxgtk3" -BUILDDEP="cmake swig tclap patchelf" +PKGDEP="boost desktop-file-utils enblend-enfuse exiv2 lapack lensfun libpano13 \ + make perl-image-exiftool python-3 wxgtk3" +BUILDDEP="cmake swig tclap patchelf texlive" PKGDES="Panorama photo stitcher" -CMAKE_AFTER=( - -DENABLE_LAPACK=ON - -DBUILD_HSI=ON - -DCMAKE_SKIP_RPATH=ON -) +ABTYPE=cmakeninja +CMAKE_AFTER="-DENABLE_LAPACK=ON \ + -DBUILD_HSI=ON \ + -DCMAKE_SKIP_RPATH=ON" diff --git a/app-creativity/hugin/spec b/app-creativity/hugin/spec index ae3364edb4b..a970b7c0fa1 100644 --- a/app-creativity/hugin/spec +++ b/app-creativity/hugin/spec @@ -1,5 +1,5 @@ VER=2022.0.0 -REL=1 +REL=2 SRCS="tbl::https://sourceforge.net/projects/hugin/files/hugin/hugin-${VER%.*}/hugin-$VER.tar.bz2" CHKSUMS="sha256::97c8562a0ba9a743e0b955a43dfde048b1c60cd9e5f2ee2b69de1a81646e05a7" CHKUPDATE="anitya::id=1341" diff --git a/app-creativity/superslicer/autobuild/defines b/app-creativity/superslicer/autobuild/defines index 11c0eed55b5..b3567d85bfb 100644 --- a/app-creativity/superslicer/autobuild/defines +++ b/app-creativity/superslicer/autobuild/defines @@ -1,9 +1,14 @@ PKGNAME=superslicer PKGDES="G-code generator for 3D printers" PKGSEC=graphics -PKGDEP="dbus boost wxgtk3 tbb curl zlib eigen-3 expat libpng glew nlopt c-blosc openvdb libspnav gmp mpfr cgal opencascade" +PKGDEP="dbus boost wxgtk3 tbb curl zlib eigen-3 expat libpng glew nlopt \ + c-blosc openvdb libspnav gmp mpfr cgal opencascade" BUILDDEP="cereal" +ABTYPE=cmakeninja CMAKE_AFTER="-DOPENVDB_FIND_MODULE_PATH=/usr/lib/cmake/OpenVDB \ - -DCGAL_ROOT=/usr -DSLIC3R_WX_STABLE=1 -DSLIC3R_FHS=1 \ - -DSLIC3R_GTK=3 -DSLIC3R_GUI=ON" + -DCGAL_ROOT=/usr \ + -DSLIC3R_WX_STABLE=1 \ + -DSLIC3R_FHS=1 \ + -DSLIC3R_GTK=3 \ + -DSLIC3R_GUI=ON" diff --git a/app-creativity/superslicer/autobuild/patches/superslicer-backport-to-tbb-2020.patch b/app-creativity/superslicer/autobuild/patches/0002-backport-to-tbb-2020.patch similarity index 100% rename from app-creativity/superslicer/autobuild/patches/superslicer-backport-to-tbb-2020.patch rename to app-creativity/superslicer/autobuild/patches/0002-backport-to-tbb-2020.patch diff --git a/app-creativity/superslicer/autobuild/patches/0003-fix-compilation-with-wxgtk-3.2.4.patch b/app-creativity/superslicer/autobuild/patches/0003-fix-compilation-with-wxgtk-3.2.4.patch new file mode 100644 index 00000000000..34603d8f562 --- /dev/null +++ b/app-creativity/superslicer/autobuild/patches/0003-fix-compilation-with-wxgtk-3.2.4.patch @@ -0,0 +1,26 @@ +From 418827e3df8bd4102dad435b7bff7af2d28d45bc Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 8 Jan 2024 04:20:47 -0800 +Subject: [PATCH] fix compilation with wxgtk 3.2.4 + +--- + src/slic3r/GUI/PhysicalPrinterDialog.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/slic3r/GUI/PhysicalPrinterDialog.cpp b/src/slic3r/GUI/PhysicalPrinterDialog.cpp +index 7ca307ff9..875e513a0 100644 +--- a/src/slic3r/GUI/PhysicalPrinterDialog.cpp ++++ b/src/slic3r/GUI/PhysicalPrinterDialog.cpp +@@ -564,7 +564,8 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr + // Always fill in the "printhost_port" combo box from the config and select it. + { + Choice* choice = dynamic_cast(m_optgroup->get_field("printhost_port")); +- choice->set_values({ m_config->opt_string("printhost_port") }); ++ const wxArrayString &val = { m_config->opt_string("printhost_port") }; ++ choice->set_values(val); + choice->set_selection(); + } + +-- +2.39.1 + diff --git a/app-creativity/superslicer/autobuild/patches/0004-fix-NULL-dereference-on-wxWidgets-3.2.patch b/app-creativity/superslicer/autobuild/patches/0004-fix-NULL-dereference-on-wxWidgets-3.2.patch new file mode 100644 index 00000000000..e69990c21b7 --- /dev/null +++ b/app-creativity/superslicer/autobuild/patches/0004-fix-NULL-dereference-on-wxWidgets-3.2.patch @@ -0,0 +1,45 @@ +From 289faa0a181b33119086945baaaa4f1e364801fd Mon Sep 17 00:00:00 2001 +From: Icenowy Zheng +Date: Tue, 16 Jan 2024 19:33:20 +0800 +Subject: [PATCH] fix NULL dereference on wxWidgets 3.2 + +According to the document of wxWidgets, the initializer of wxLocale with +no parameters do not do any initialization at all, thus do not register +its wxTranslations. + +Explicitly call Init() with its default parameters to init it with the +default setting, otherwise on Linux with wxWidgets 3.2, the +wxTranslations singleton get is NULL and lead to NULL deference. + +The code here is from PrusaSlicer 2.5 [1]. + +[1] https://github.com/prusa3d/PrusaSlicer/commit/e21921f2ebd2b94c57459bd280f1b1bd8eec1b9c + +Signed-off-by: Icenowy Zheng +--- + src/slic3r/GUI/GUI_App.cpp | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp +index d10c5cfe0..6dc647dc0 100644 +--- a/src/slic3r/GUI/GUI_App.cpp ++++ b/src/slic3r/GUI/GUI_App.cpp +@@ -2289,6 +2289,15 @@ bool GUI_App::load_language(wxString language, bool initial) + { + // Allocating a temporary locale will switch the default wxTranslations to its internal wxTranslations instance. + wxLocale temp_locale; ++#ifdef __WXOSX__ ++ // ysFIXME - temporary workaround till it isn't fixed in wxWidgets: ++ // Use English as an initial language, because of under OSX it try to load "inappropriate" language for wxLANGUAGE_DEFAULT. ++ // For example in our case it's trying to load "en_CZ" and as a result PrusaSlicer catch warning message. ++ // But wxWidgets guys work on it. ++ temp_locale.Init(wxLANGUAGE_ENGLISH); ++#else ++ temp_locale.Init(); ++#endif // __WXOSX__ + // Set the current translation's language to default, otherwise GetBestTranslation() may not work (see the wxWidgets source code). + wxTranslations::Get()->SetLanguage(wxLANGUAGE_DEFAULT); + // Let the wxFileTranslationsLoader enumerate all translation dictionaries for PrusaSlicer +-- +2.39.1 + diff --git a/app-creativity/superslicer/spec b/app-creativity/superslicer/spec index f22bcd61555..735e815c47f 100644 --- a/app-creativity/superslicer/spec +++ b/app-creativity/superslicer/spec @@ -1,4 +1,4 @@ -VER=2.5.59.4 +VER=2.5.59.6 SRCS="git::commit=tags/${VER}::https://github.com/supermerill/SuperSlicer.git" CHKSUMS="SKIP" -CHKUPDATE="github::repo=supermerill/SuperSlicer" +CHKUPDATE="anitya::id=370825" diff --git a/app-electronics/kicad/autobuild/beyond b/app-electronics/kicad/autobuild/beyond index 18d8e5fcdb9..0e4d0fdff80 100644 --- a/app-electronics/kicad/autobuild/beyond +++ b/app-electronics/kicad/autobuild/beyond @@ -10,7 +10,7 @@ cp -rv "$SRCDIR"/../kicad-doc-$PKGVER/share \ for i in symbols footprints packages3D; do cd "$SRCDIR"/../kicad-$i-$PKGVER/build abinfo "Running CMake for $i ..." - cmake .. ${CMAKE_DEF} + cmake .. "${CMAKE_DEF[@]}" abinfo "Building $i ..." make -j1 diff --git a/app-electronics/kicad/autobuild/defines b/app-electronics/kicad/autobuild/defines index 0fa4b54ec4c..6f9d5d2d88c 100644 --- a/app-electronics/kicad/autobuild/defines +++ b/app-electronics/kicad/autobuild/defines @@ -1,13 +1,25 @@ PKGNAME=kicad PKGSEC=electronics -PKGDEP="wxgtk2 mesa glu glew libnotify curl opencascade ngspice boost cairo \ - pixman python-3 wxpython-phoenix unixodbc" -BUILDDEP="cmake bzr swig glm llvm" PKGDES="A free software suite for electronic design automation" +PKGDEP="wxgtk3 mesa glu glew libnotify curl opencascade ngspice boost cairo \ + pixman python-3 wxpython unixodbc" +BUILDDEP="cmake bzr swig glm llvm" -CMAKE_AFTER="-DBUILD_GITHUB_PLUGIN=ON -DKICAD_BUILD_I18N=ON" +ABTYPE=cmakeninja +# FIXME: Set -DKICAD_USE_EGL once we enable EGL support in wxWidgets. +# Currently blocked by bugs in SuperSlicer. +CMAKE_AFTER="-DKICAD_SCRIPTING_WXPYTHON=ON \ + -DKICAD_INSTALL_DEMOS=ON \ + -DKICAD_BUILD_QA_TESTS=OFF \ + -DKICAD_SPICE=OFF \ + -DKICAD_BUILD_I18N=ON \ + -DKICAD_USE_EGL=OFF \ + -DKICAD_USE_BUNDLED_GLEW=OFF \ + -DKICAD_DRC_PROTO=OFF \ + -DKICAD_BUILD_PEGTL_DEBUG_TOOL=OFF \ + -DKICAD_BUILD_PNS_DEBUG_TOOL=OFF \ + -DKICAD_GAL_PROFILE=OFF \ + -DKICAD_USE_SENTRY=OFF" PKGREP="kicad-i18n<=4.0.0" PKGBREAK="kicad-i18n<=4.0.0" - -ABTYPE=cmakeninja diff --git a/app-electronics/kicad/autobuild/patches/0001-Use-std-string-for-processing-environment-variables.patch b/app-electronics/kicad/autobuild/patches/0001-Use-std-string-for-processing-environment-variables.patch new file mode 100644 index 00000000000..eb700630cb8 --- /dev/null +++ b/app-electronics/kicad/autobuild/patches/0001-Use-std-string-for-processing-environment-variables.patch @@ -0,0 +1,29 @@ +From 73fdda3de788787b4e4941562a390f79e96c5a00 Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Sun, 21 Jan 2024 22:18:50 -0800 +Subject: [PATCH 1/2] Use std::string for processing environment variables + +wxString cannot handle charset conversion correctly while std::string can. +The wxWidgets upstream encourages using std::string whenever possible as well. + +Ref: https://docs.wxwidgets.org/3.0/classwx_string.html#details +--- + common/pgm_base.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp +index 91653ef4b1..c9cb71e25e 100644 +--- a/common/pgm_base.cpp ++++ b/common/pgm_base.cpp +@@ -430,7 +430,7 @@ bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit, bool aIsUnitTest ) + wxPGInitResourceModule(); + + #ifndef __WINDOWS__ +- if( wxString( wxGetenv( "HOME" ) ).IsEmpty() ) ++ if( std::string( wxGetenv( "HOME" ) ).empty() ) + { + DisplayErrorMessage( nullptr, _( "Environment variable HOME is empty. " + "Unable to continue." ) ); +-- +2.39.1 + diff --git a/app-electronics/kicad/autobuild/patches/0002-Update-zh_CN-translation-for-plugin-updater-dialog.patch b/app-electronics/kicad/autobuild/patches/0002-Update-zh_CN-translation-for-plugin-updater-dialog.patch new file mode 100644 index 00000000000..625de929b28 --- /dev/null +++ b/app-electronics/kicad/autobuild/patches/0002-Update-zh_CN-translation-for-plugin-updater-dialog.patch @@ -0,0 +1,25 @@ +From bff51e8982fb3ab38df205de233fe2ad6d7b3cd0 Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 22 Jan 2024 19:06:59 -0800 +Subject: [PATCH 2/2] Update zh_CN translation for plugin updater dialog + +--- + translation/pofiles/zh_CN.po | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/translation/pofiles/zh_CN.po b/translation/pofiles/zh_CN.po +index 1944ae2078..cff6d197ec 100644 +--- a/translation/pofiles/zh_CN.po ++++ b/translation/pofiles/zh_CN.po +@@ -19800,7 +19800,7 @@ msgstr "正在恢复 \"%s\"" + + #: kicad/kicad_manager_frame.cpp:903 + msgid "Would you like to automatically check for plugin updates on startup?" +-msgstr "是否要在启动时自动检查更新?" ++msgstr "是否要在启动时自动检查插件更新?" + + #: kicad/kicad_manager_frame.cpp:904 + msgid "Check for updates" +-- +2.39.1 + diff --git a/app-electronics/kicad/spec b/app-electronics/kicad/spec index 7036e31e135..f8299227038 100644 --- a/app-electronics/kicad/spec +++ b/app-electronics/kicad/spec @@ -1,4 +1,5 @@ VER=7.0.0 +REL=2 SRCS="tbl::rename=kicad-$VER.tar.bz2::https://gitlab.com/kicad/code/kicad/-/archive/$VER/kicad-$VER.tar.bz2 \ tbl::rename=kicad-footprints-$VER.tar.bz2::https://gitlab.com/kicad/libraries/kicad-footprints/-/archive/$VER/kicad-footprints-$VER.tar.bz2 \ tbl::rename=kicad-symbols-$VER.tar.bz2::https://gitlab.com/kicad/libraries/kicad-symbols/-/archive/$VER/kicad-symbols-$VER.tar.bz2 \ @@ -11,4 +12,3 @@ CHKSUMS="sha256::f0e188c67a1044c6cc884b66b25717326d93ec896194c0963c2fb79b35943d7 sha256::04cad356fd19b46e70eaa6e3365d94c326e4237d80c09394208fd4662e756465 " SUBDIR="kicad-$VER" CHKUPDATE="anitya::id=8432" -REL=1 diff --git a/app-emulation/pcem/autobuild/defines b/app-emulation/pcem/autobuild/defines deleted file mode 100644 index 405217ed121..00000000000 --- a/app-emulation/pcem/autobuild/defines +++ /dev/null @@ -1,6 +0,0 @@ -PKGNAME=pcem -PKGSEC=utils -PKGDEP="allegro freealut openal-soft wxgtk3" -PKGDES="Emulator for various IBM PC computers and clones" - -AB_FLAGS_O3=1 diff --git a/app-emulation/pcem/autobuild/prepare b/app-emulation/pcem/autobuild/prepare deleted file mode 100644 index ef9dc5a5f1c..00000000000 --- a/app-emulation/pcem/autobuild/prepare +++ /dev/null @@ -1,3 +0,0 @@ -abinfo "Copying new depcomp, missing scripts ..." -cp -v /usr/share/automake-1.16/{depcomp,missing} \ - "$SRCDIR"/ diff --git a/app-emulation/pcem/spec b/app-emulation/pcem/spec deleted file mode 100644 index 3bcb345511a..00000000000 --- a/app-emulation/pcem/spec +++ /dev/null @@ -1,5 +0,0 @@ -VER=17 -SRCS="tbl::https://pcem-emulator.co.uk/files/PCemV${VER}Linux.tar.gz" -CHKSUMS="sha256::5b24cb5ce886ed53232385f46594146ba3f7d7eecda90f82892b2dce1cb2f1a4" -CHKUPDATE="html::url=https://pcem-emulator.co.uk/files/;pattern=PCemV(.+?)Linux.tar.gz" -SUBDIR=. diff --git a/app-games/0ad/autobuild/build b/app-games/0ad/autobuild/build index 72ad28b52d5..cf38eb5aed9 100644 --- a/app-games/0ad/autobuild/build +++ b/app-games/0ad/autobuild/build @@ -4,7 +4,7 @@ # FIXME: workaround a bug in Mozilla mach build system unset RUSTFLAGS # 0ad build scripts will reset MAKEFLAGS, so we need to override that - WX_CONFIG=/usr/lib/wx/config/gtk3-unicode-3.0 \ + WX_CONFIG=/usr/bin/wx-config-gtk3 \ JOBS="-j$ABTHREADS" \ ./update-workspaces.sh \ --bindir=/usr/bin \ diff --git a/app-games/0ad/autobuild/defines b/app-games/0ad/autobuild/defines index f858ec8fcd4..c7be4bf2d64 100644 --- a/app-games/0ad/autobuild/defines +++ b/app-games/0ad/autobuild/defines @@ -2,8 +2,13 @@ PKGNAME=0ad PKGSEC=games PKGDEP="binutils boost curl enet libogg libpng libvorbis libxml2 openal-soft \ sdl wxgtk3 zlib mesa glu gloox miniupnpc icu nspr fmt" -BUILDDEP="rustc" +BUILDDEP="rustc llvm" PKGDES="RTS (Real Time Strategy) Game of Ancient Warfare" +ABTYPE=self +# FIXME: LTO build fails +# ld: undefined reference to `RustMozCrash' +# Setting USECLANG=1 does not fix this problem. NOLTO=1 + FAIL_ARCH="!(amd64|arm64|armv4|armv6hf|armv7hf|ppc64el)" diff --git a/app-games/0ad/spec b/app-games/0ad/spec index 0d716e41d1c..da3a0023c82 100644 --- a/app-games/0ad/spec +++ b/app-games/0ad/spec @@ -1,5 +1,5 @@ VER=0.0.26 -REL=1 +REL=2 SRCS="tbl::https://sourceforge.net/projects/zero-ad/files/releases/0ad-${VER}-alpha-unix-build.tar.xz \ file::rename=data.tar.xz::https://sourceforge.net/projects/zero-ad/files/releases/0ad-${VER}-alpha-unix-data.tar.xz" CHKSUMS="sha256::2e1c6df7e3312e77c5f82788664cffc3a78d3bf60606c00039275e1d13c0ee4b \ diff --git a/app-games/darkradiant/autobuild/defines b/app-games/darkradiant/autobuild/defines index bfeaf04bb55..cff3d93177b 100644 --- a/app-games/darkradiant/autobuild/defines +++ b/app-games/darkradiant/autobuild/defines @@ -1,9 +1,13 @@ PKGNAME=darkradiant PKGSEC=games -PKGDEP="desktop-file-utils libpng wxgtk3 libxml2 glew zlib \ - libjpeg-turbo ftgl freealut libvorbis libsigc++" +PKGDES="Level editor for The Dark Mod and other idTech4/Doom3-based games" +PKGDEP="desktop-file-utils libpng wxgtk3 libxml2 glew zlib libjpeg-turbo ftgl \ + freealut libvorbis libsigc++" PKGSUG="thedarkmod" BUILDDEP="eigen-3" -PKGDES="Level editor for The Dark Mod and other idTech4/Doom3-based games" -CMAKE_AFTER="-DGTEST_FOUND=OFF" +ABTYPE=cmakeninja +CMAKE_AFTER="-DGTEST_FOUND=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DENABLE_DM_PLUGINS=ON \ + -DCMAKE_SKIP_RPATH=OFF" diff --git a/app-games/darkradiant/spec b/app-games/darkradiant/spec index 608ace318f4..0910fe8119e 100644 --- a/app-games/darkradiant/spec +++ b/app-games/darkradiant/spec @@ -1,4 +1,5 @@ VER=3.8.0 -SRCS="tbl::https://github.com/codereader/DarkRadiant/archive/$VER.tar.gz" -CHKSUMS="sha256::7b9ccd6de65d7e55f6aad5e1f9a2f49600c6a0d9d70e67bda2e625cd721b5635" +REL=1 +SRCS="git::commit=tags/$VER::https://github.com/codereader/DarkRadiant" +CHKSUMS="SKIP" CHKUPDATE="anitya::id=227643" diff --git a/app-games/pcsx2/autobuild/defines b/app-games/pcsx2/autobuild/defines index 072dfa98970..233142a785b 100644 --- a/app-games/pcsx2/autobuild/defines +++ b/app-games/pcsx2/autobuild/defines @@ -1,9 +1,11 @@ PKGNAME=pcsx2 PKGSEC=games -PKGDEP="glew libaio libjpeg-turbo cg portaudio sdl2 soundtouch wxgtk3" +PKGDEP="glew libaio libjpeg-turbo portaudio sdl2 soundtouch wxgtk3" BUILDDEP="png++" PKGDES="A Sony Playstation 2 emulator" +ABTYPE=cmakeninja +# Set -DDISABLE_ADVANCE_SIMD=ON to avoid setting -march=native CMAKE_AFTER="-DPLUGIN_DIR=/usr/lib/pcsx2 \ -DGAMEINDEX_DIR=/usr/share/pcsx2 \ -DDISABLE_ADVANCE_SIMD=TRUE \ diff --git a/app-games/pcsx2/autobuild/patches/0001-fix-compilation-with-wxwidgets-3.2.4.patch b/app-games/pcsx2/autobuild/patches/0001-fix-compilation-with-wxwidgets-3.2.4.patch new file mode 100644 index 00000000000..2a00477e50a --- /dev/null +++ b/app-games/pcsx2/autobuild/patches/0001-fix-compilation-with-wxwidgets-3.2.4.patch @@ -0,0 +1,24 @@ +From 54f4525f75fafd19ae20763a074879c079093fdc Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 8 Jan 2024 05:23:11 -0800 +Subject: [PATCH] fix compilation with wxwidgets 3.2.4 + +--- + pcsx2/gui/i18n.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/pcsx2/gui/i18n.cpp b/pcsx2/gui/i18n.cpp +index edcc5965b..2d059f9b3 100644 +--- a/pcsx2/gui/i18n.cpp ++++ b/pcsx2/gui/i18n.cpp +@@ -36,7 +36,6 @@ static wxString i18n_GetBetterLanguageName( const wxLanguageInfo* info ) + switch (info->Language) + { + case wxLANGUAGE_CHINESE: return L"Chinese (Traditional)"; +- case wxLANGUAGE_CHINESE_TRADITIONAL: return L"Chinese (Traditional)"; + case wxLANGUAGE_CHINESE_TAIWAN: return L"Chinese (Traditional)"; + case wxLANGUAGE_CHINESE_HONGKONG: return L"Chinese (Traditional, Hong Kong)"; + case wxLANGUAGE_CHINESE_MACAU: return L"Chinese (Traditional, Macau)"; +-- +2.39.1 + diff --git a/app-games/pcsx2/spec b/app-games/pcsx2/spec index 3a094add9ff..046508bcb2e 100644 --- a/app-games/pcsx2/spec +++ b/app-games/pcsx2/spec @@ -1,4 +1,6 @@ VER=1.6.0+git20210825 -SRCS="git::commit=feaf5ba5f225a9fe6307e3894ea81b5402e4c6ea::https://github.com/PCSX2/pcsx2" +REL=1 +__COMMIT="feaf5ba5f225a9fe6307e3894ea81b5402e4c6ea" +SRCS="git::commit=${__COMMIT}::https://github.com/PCSX2/pcsx2" CHKSUMS="SKIP" CHKUPDATE="anitya::id=12288" diff --git a/app-games/vba-m/autobuild/defines b/app-games/vba-m/autobuild/defines index 6fb96849f2a..e12befbdb6e 100644 --- a/app-games/vba-m/autobuild/defines +++ b/app-games/vba-m/autobuild/defines @@ -4,6 +4,7 @@ PKGDEP="gtkglextmm sdl2 sfml wxgtk3 zip" BUILDDEP="cmake" PKGDES="A Nintendo GameBoy Advance emulator" +ABTYPE=cmakeninja CMAKE_AFTER="-DENABLE_GTK=TRUE \ -DENABLE_WX=TRUE \ -DENABLE_DEBUGGER=TRUE \ diff --git a/app-games/vba-m/autobuild/patches/0001-xbrz-fix-inline-asm-check.patch b/app-games/vba-m/autobuild/patches/0001-xbrz-fix-inline-asm-check.patch deleted file mode 100644 index dcf62142c09..00000000000 --- a/app-games/vba-m/autobuild/patches/0001-xbrz-fix-inline-asm-check.patch +++ /dev/null @@ -1,40 +0,0 @@ -From af0de1c4b308ef8d9a081ecf407805b75a99d877 Mon Sep 17 00:00:00 2001 -From: Rafael Kitover -Date: Fri, 4 Oct 2019 07:35:49 +0000 -Subject: [PATCH] xbrz: fix inline asm check - -Use correct cpp code to detect x86/amd64 architecture to use inline asm. - -Signed-off-by: Rafael Kitover ---- - src/filters/xBRZ/xbrz.cpp | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/filters/xBRZ/xbrz.cpp b/src/filters/xBRZ/xbrz.cpp -index 36d70be2..13e6cdc1 100644 ---- a/src/filters/xBRZ/xbrz.cpp -+++ b/src/filters/xBRZ/xbrz.cpp -@@ -66,17 +66,17 @@ uint32_t gradientARGB(uint32_t pixFront, uint32_t pixBack) //find intermediate c - - inline double fastSqrt(double n) - { --#ifdef __GNUC__ || __clang__ || __MINGW64_VERSION_MAJOR || __MINGW32_MAJOR_VERSION -+#if (defined(__GNUC__) || defined(__clang__)) && (defined(__x86_64__) || defined(__i386__)) - __asm__ ("fsqrt" : "+t" (n)); - return n; --#elif _MSC_VER && _M_IX86 -+#elif defined(_MSC_VER) && defined(_M_IX86) - // speeds up xBRZ by about 9% compared to std::sqrt which internally uses - // the same assembler instructions but adds some "fluff" - __asm { - fld n - fsqrt - } --#else // _MSC_VER && _M_X64 OR other platforms -+#else // defined(_MSC_VER) && defined(_M_X64) OR other platforms - // VisualStudio x86_64 does not allow inline ASM - return std::sqrt(n); - #endif --- -2.26.2 - diff --git a/app-games/vba-m/spec b/app-games/vba-m/spec index df5615c0bbf..385d018396b 100644 --- a/app-games/vba-m/spec +++ b/app-games/vba-m/spec @@ -1,5 +1,4 @@ -VER=2.1.4 -REL=2 -SRCS="tbl::https://github.com/visualboyadvance-m/visualboyadvance-m/archive/v$VER.tar.gz" -CHKSUMS="sha256::8342e017212842de66b0d86bc7610c82349af2d4e59951d969a33fff956c39ba" +VER=2.1.8 +SRCS="git::commit=tags/v$VER::https://github.com/visualboyadvance-m/visualboyadvance-m" +CHKSUMS="SKIP" CHKUPDATE="anitya::id=12842" diff --git a/app-i18n/poedit/autobuild/defines b/app-i18n/poedit/autobuild/defines index 72635a6c2b5..ef4cc75a1a2 100644 --- a/app-i18n/poedit/autobuild/defines +++ b/app-i18n/poedit/autobuild/defines @@ -4,6 +4,6 @@ PKGDEP="gtkspell3 wxgtk3 lucene++ desktop-file-utils cld2 cpprestsdk \ icu boost" PKGDES="Cross-platform gettext catalogs editor" -ABSHADOW=0 +ABTYPE=autotools AUTOTOOLS_AFTER="--libexecdir=/usr/lib/poedit \ --without-cpprest" diff --git a/app-i18n/poedit/autobuild/prepare b/app-i18n/poedit/autobuild/prepare deleted file mode 100644 index b6ad806231a..00000000000 --- a/app-i18n/poedit/autobuild/prepare +++ /dev/null @@ -1,2 +0,0 @@ -ln -s /usr/lib/wx/config/gtk3-unicode-3.0 "$SRCDIR"/wx-config -export PATH="$SRCDIR:$PATH" diff --git a/app-i18n/poedit/spec b/app-i18n/poedit/spec index 43466f46e7a..c22094d7457 100644 --- a/app-i18n/poedit/spec +++ b/app-i18n/poedit/spec @@ -1,4 +1,5 @@ VER=3.4.1 +REL=1 SRCS="tbl::https://github.com/vslavik/poedit/releases/download/v${VER}-oss/poedit-$VER.tar.gz" CHKSUMS="sha256::18dbe9a8b0ed4eebc864b3e708b35e9705bd07399dd5f7d604d0abd148ac50a5" CHKUPDATE="anitya::id=6914" diff --git a/app-multimedia/aegisub/autobuild/defines b/app-multimedia/aegisub/autobuild/defines index dd7d0cdb75b..12947f5caa9 100644 --- a/app-multimedia/aegisub/autobuild/defines +++ b/app-multimedia/aegisub/autobuild/defines @@ -1,13 +1,22 @@ PKGNAME=aegisub PKGSEC=video -PKGDEP="boost desktop-file-utils ffms2 fftw hunspell wxgtk3 lua libass \ - fontconfig zlib lua icu" -BUILDDEP="intltool" +PKGDEP="boost ffms2 fftw hunspell wxgtk3 libass fontconfig zlib icu pulseaudio \ + uchardet" +BUILDDEP="intltool desktop-file-utils" PKGDES="A free, cross-platform open source tool for creating and modifying subtitles" -AUTOTOOLS_AFTER="--without-portaudio \ - --without-openal \ - --without-oss \ - --disable-update-checker \ - --with-wx-config=/usr/lib/wx/config/gtk3-unicode-3.0 agi_cv_luajit_is_52=yes" -ABSHADOW=0 +ABTYPE=meson +# FIXME: use system luajit once we enable lua 5.2 compat. +MESON_AFTER="-Dalsa=enabled \ + -Dopenal=disabled \ + -Dlibpulse=enabled \ + -Dffms2=enabled \ + -Dhunspell=enabled \ + -Dfftw3=enabled \ + -Dsystem_luajit=false \ + -Denable_update_checker=false \ + -Dbuildtype=release" + +# FIXME: "terminate called without an active exception" on architectures other +# than amd64. +FAIL_ARCH="!(amd64)" diff --git a/app-multimedia/aegisub/autobuild/patches/0001-Backport-to-icu-64.patch b/app-multimedia/aegisub/autobuild/patches/0001-Backport-to-icu-64.patch new file mode 100644 index 00000000000..8af76ffe816 --- /dev/null +++ b/app-multimedia/aegisub/autobuild/patches/0001-Backport-to-icu-64.patch @@ -0,0 +1,34 @@ +From 80c74ae017ad94ed14bef860d09db442a4b2eecc Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Sat, 20 Jan 2024 03:10:31 -0800 +Subject: [PATCH] Backport to icu 64 + +Co-Authored-By: liushuyu +--- + libaegisub/common/karaoke_matcher.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libaegisub/common/karaoke_matcher.cpp b/libaegisub/common/karaoke_matcher.cpp +index 5ac79ee75..20e8d97c6 100644 +--- a/libaegisub/common/karaoke_matcher.cpp ++++ b/libaegisub/common/karaoke_matcher.cpp +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + namespace { + int32_t next_codepoint(const char *str, size_t *i) { +@@ -55,7 +56,7 @@ int compare(std::string_view a, std::string_view b) { + UErrorCode err = U_ZERO_ERROR; + thread_local std::unique_ptr collator(icu::Collator::createInstance(err)); + collator->setStrength(icu::Collator::PRIMARY); +- int result = collator->compareUTF8(a, b, err); ++ int result = collator->compareUTF8(icu::StringPiece(a.data()), icu::StringPiece(b.data()), err); + if (U_FAILURE(err)) throw agi::InternalError(u_errorName(err)); + return result; + } +-- +2.39.1 + diff --git a/app-multimedia/aegisub/autobuild/patches/0002-fix-wx-dpi-api-usage.patch b/app-multimedia/aegisub/autobuild/patches/0002-fix-wx-dpi-api-usage.patch deleted file mode 100644 index a02bfa47f46..00000000000 --- a/app-multimedia/aegisub/autobuild/patches/0002-fix-wx-dpi-api-usage.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/libresrc/libresrc.cpp b/src/libresrc/libresrc.cpp -index 79dc0f16c..9cde64c8b 100644 ---- a/src/libresrc/libresrc.cpp -+++ b/src/libresrc/libresrc.cpp -@@ -23,8 +23,8 @@ - wxBitmap libresrc_getimage(const unsigned char *buff, size_t size, double scale, int dir) { - wxMemoryInputStream mem(buff, size); - if (dir != wxLayout_RightToLeft) -- return wxBitmap(wxImage(mem), -1, scale); -- return wxBitmap(wxImage(mem).Mirror(), -1, scale); -+ return wxBitmap(wxImage(mem), -1); -+ return wxBitmap(wxImage(mem).Mirror(), -1); - } - - wxIcon libresrc_geticon(const unsigned char *buff, size_t size) { diff --git a/app-multimedia/aegisub/autobuild/patches/0003-fix-boost-1.83.patch b/app-multimedia/aegisub/autobuild/patches/0003-fix-boost-1.83.patch deleted file mode 100644 index 544d61b85e4..00000000000 --- a/app-multimedia/aegisub/autobuild/patches/0003-fix-boost-1.83.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/dialog_attachments.cpp 2023-10-13 18:33:52.649611127 -0700 -+++ b/src/dialog_attachments.cpp 2023-10-13 18:34:25.793740795 -0700 -@@ -161,7 +161,7 @@ - - // Multiple or single? - if (listView->GetNextSelected(i) != -1) -- path = wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str(); -+ path = wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).ToStdString(); - else { - path = SaveFileSelector( - _("Select the path to save the file to:"), ---- a/src/command/video.cpp 2023-10-13 18:33:01.306861209 -0700 -+++ b/src/command/video.cpp 2023-10-13 18:33:09.711147652 -0700 -@@ -475,7 +475,7 @@ - // If where ever that is isn't defined, we can't save there - if ((basepath == "\\") || (basepath == "/")) { - // So save to the current user's home dir instead -- basepath = wxGetHomeDir().c_str(); -+ basepath = wxGetHomeDir().ToStdString(); - } - } - // Actual fixed (possibly relative) path, decode it diff --git a/app-multimedia/aegisub/autobuild/patches/aegisub-3.2.2_p20160518-fix-makefile-for-make4.3.patch b/app-multimedia/aegisub/autobuild/patches/aegisub-3.2.2_p20160518-fix-makefile-for-make4.3.patch deleted file mode 100644 index 8f94c5a10d5..00000000000 --- a/app-multimedia/aegisub/autobuild/patches/aegisub-3.2.2_p20160518-fix-makefile-for-make4.3.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit f4cc905c69ca69c68cb95674cefce4abc37ce046 -Author: wangqr -Date: Mon Feb 17 14:42:07 2020 +0800 - - Use target name without directory in $*_OBJ macro - - Fix Aegisub/Aegisub#171 - -diff --git a/Makefile.target b/Makefile.target -index 516ef3c24..5c4c5d259 100644 ---- a/Makefile.target -+++ b/Makefile.target -@@ -112,7 +112,7 @@ POST_FLAGS = $($@_FLAGS) -c -o $@ $< - # Libraries contain all object files they depend on (but they may depend on other files) - # Not using libtool on OS X because it has an unsilenceable warning about a - # compatibility issue with BSD 4.3 (wtf) --lib%.a: $$($$*_OBJ) -+lib%.a: $$($$(*F)_OBJ) - @$(BIN_MKDIR_P) $(dir $@) - $(BIN_AR) cru $@ $(filter %.o,$^) - $(BIN_RANLIB) $@ diff --git a/app-multimedia/aegisub/autobuild/patches/aegisub-3.2.2_p20160518-fix-system-luajit-build.patch b/app-multimedia/aegisub/autobuild/patches/aegisub-3.2.2_p20160518-fix-system-luajit-build.patch deleted file mode 100644 index ef71685d791..00000000000 --- a/app-multimedia/aegisub/autobuild/patches/aegisub-3.2.2_p20160518-fix-system-luajit-build.patch +++ /dev/null @@ -1,130 +0,0 @@ -See http://devel.aegisub.org/ticket/1904 -and http://devel.aegisub.org/ticket/1913 -and http://devel.aegisub.org/ticket/1922 - -diff --git a/Makefile.inc.in b/Makefile.inc.in -index d8b3f4a..52e4cf6 100644 ---- a/Makefile.inc.in -+++ b/Makefile.inc.in -@@ -9,6 +9,7 @@ HAVE_OPENAL = @with_openal@ - HAVE_OSS = @with_oss@ - HAVE_PORTAUDIO = @with_portaudio@ - HAVE_UCHARDET = @with_uchardet@ -+SYSTEM_LUAJIT = @with_system_luajit@ - - ############## - # BUILD OUTPUT -diff --git a/automation/Makefile b/automation/Makefile -index 5483dbd..1231aab 100644 ---- a/automation/Makefile -+++ b/automation/Makefile -@@ -12,10 +12,16 @@ DATA_AUTOMATION_INSTALLED = $(addprefix $(DESTDIR)$(P_DATA)/automation/, $(DATA_ - $(DESTDIR)$(P_DATA)/automation/%: $(d)% - $(MKDIR_INSTALL) - --aegisub-lua_OBJ := $(d)tests/aegisub.o $(TOP)lib/libaegisub.a $(TOP)lib/libluabins.a $(LIBS_LUA) -+aegisub-lua_OBJ := $(d)tests/aegisub.o $(TOP)lib/libaegisub.a $(TOP)lib/libluabins.a - aegisub-lua_CPPFLAGS := $(CPPFLAGS_BOOST) $(CFLAGS_LUA) -I$(TOP)libaegisub/include -I$(TOP)src $(CXXFLAGS_WX) - aegisub-lua_LIBS := $(LIBS_WX) $(LIBS_BOOST) $(LIBS_ICU) $(LIBS_PTHREAD) - -+ifeq (no, $(SYSTEM_LUAJIT)) -+aegisub-lua_OBJ += $(LIBS_LUA) -+else -+aegisub-lua_LIBS += $(LIBS_LUA) -+endif -+ - PROGRAM += $(d)aegisub-lua - - test-automation: $(PROGRAM) -diff --git a/configure.ac b/configure.ac -index 1649efc..81b1413 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -398,7 +398,7 @@ system_luajit="bundled" - AC_ARG_WITH(system-luajit, AS_HELP_STRING([--without-system-luajit], [Use built-in LuaJIT [auto]])) - # Check if it's available at all - AS_IF([test x$with_system_luajit = xno], [], -- [PKG_CHECK_MODULES(LUAJIT, luajit >= 2.0.0, [], [ -+ [PKG_CHECK_MODULES(LUAJIT, lua >= 5.1, [], [ - AS_IF([test x$with_system_luajit = xyes], - [AC_MSG_FAILURE([--with-sytem-luajit was specified, but luajit could not be found])]) - with_system_luajit="no"])]) -@@ -429,13 +429,15 @@ AS_IF([test $with_system_luajit = no], - [AC_SUBST([LUAJIT_CFLAGS], ['-I$(TOP)vendor/luajit/include']) - AC_SUBST([LUAJIT_LIBS], ['$(TOP)vendor/luajit/src/libluajit.a'])]) - -+AC_SUBST(with_system_luajit) -+ - # We also need a Lua binary to run part of the build system - # Which version doesn't matter as the scripts are portable between them --AC_CHECK_PROGS([LUA], [lua luajit lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1]) -+AC_PATH_PROGS([LUA], [luajit lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1]) - - # If the user doesn't have an installed copy of Lua, just use the one built - # as part of building LuaJIT --AS_IF([test -z $LUA], [LUA="$srcdir/vendor/luajit/src/host/minilua"]) -+AS_IF([test -z $LUA], [LUA='$(TOP)vendor/luajit/src/host/minilua']) - - ###################################################### - # Debugging support -diff --git a/header.mk b/header.mk -index 613b38f..a9ce1d7 100644 ---- a/header.mk -+++ b/header.mk -@@ -13,7 +13,10 @@ subdirs := \ - tests \ - tools \ - vendor/luabins \ -- vendor/luajit -+ -+ifeq (no, $(SYSTEM_LUAJIT)) -+subdirs += vendor/luajit -+endif - - subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs))) - -diff --git a/src/Makefile b/src/Makefile -index 0ee6c84..1a6f015 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -6,7 +6,7 @@ src_CPPFLAGS := -I$(d) -I.. -I$(d)include -I$(TOP)libaegisub/include -I$(TOP)bui - $(CFLAGS_PTHREAD) $(CFLAGS_FFTW3) $(CFLAGS_ICU) $(CPPFLAGS_BOOST) - src_CXXFLAGS := $(CXXFLAGS_WX) - src_LIBS := $(LIBS_GL) $(LIBS_PTHREAD) $(LIBS_WX) $(LIBS_FREETYPE) \ -- $(LIBS_LIBASS) $(LIBS_FONTCONFIG) $(LIBS_FFTW3) $(LIBS_BOOST) $(LIBS_ICU) -+ $(LIBS_LIBASS) $(LIBS_FONTCONFIG) $(LIBS_FFTW3) $(LIBS_BOOST) $(LIBS_ICU) - src_PCH := $(d)agi_pre.h - src_INSTALLNAME := $(AEGISUB_COMMAND) - -@@ -111,11 +111,16 @@ src_OBJ := \ - $(d)video_provider_yuv4mpeg.o \ - $(d)video_slider.o \ - $(d)visual_feature.o \ -- $(LIBS_LUA) \ - $(TOP)lib/libaegisub.a \ - $(TOP)lib/libluabins.a \ - $(TOP)lib/libresrc.a \ - -+ifeq (no, $(SYSTEM_LUAJIT)) -+src_OBJ += $(LIBS_LUA) -+else -+src_LIBS += $(LIBS_LUA) -+endif -+ - ifeq (yes, $(BUILD_DARWIN)) - src_OBJ += $(d)font_file_lister_coretext.o - src_OBJ += $(subst .mm,.o,$(wildcard $(d)osx/*.mm)) -diff --git a/tools/Makefile b/tools/Makefile -index de6166a..e3d108a 100644 ---- a/tools/Makefile -+++ b/tools/Makefile -@@ -12,6 +12,8 @@ repack-thes-dict_CPPFLAGS := -I$(TOP) -I$(TOP)libaegisub/include $(CFLAGS_ICU) - - PROGRAM += $(d)repack-thes-dict - --$(TOP)tools/respack.lua: $(shell command -v "$(BIN_LUA)") -+ifeq (no, $(SYSTEM_LUAJIT)) -+$(TOP)tools/respack.lua: $(BIN_LUA) -+endif - - include $(TOP)Makefile.target diff --git a/app-multimedia/aegisub/autobuild/patches/aegisub-3.2.2_p20160518-use-system-autoconf-archive.patch b/app-multimedia/aegisub/autobuild/patches/aegisub-3.2.2_p20160518-use-system-autoconf-archive.patch deleted file mode 100644 index 693bbe39023..00000000000 --- a/app-multimedia/aegisub/autobuild/patches/aegisub-3.2.2_p20160518-use-system-autoconf-archive.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/acinclude.m4 b/acinclude.m4 -index aee5b047d..8ab97dd0c 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -1,15 +1,5 @@ - m4_include([m4macros/ac_agi.m4]) - m4_include([m4macros/ac_flag.m4]) - m4_include([m4macros/agi_find_libheader.m4]) --m4_include([m4macros/ax_boost_base.m4]) --m4_include([m4macros/ax_boost_chrono.m4]) --m4_include([m4macros/ax_boost_filesystem.m4]) --m4_include([m4macros/ax_boost_locale.m4]) --m4_include([m4macros/ax_boost_regex.m4]) --m4_include([m4macros/ax_boost_system.m4]) --m4_include([m4macros/ax_boost_thread.m4]) --m4_include([m4macros/ax_check_gl.m4]) --m4_include([m4macros/ax_lang_compiler_ms.m4]) --m4_include([m4macros/ax_pthread.m4]) - m4_include([m4macros/check_gnu_make.m4]) - m4_include([m4macros/wxwin.m4]) diff --git a/app-multimedia/aegisub/autobuild/prepare b/app-multimedia/aegisub/autobuild/prepare deleted file mode 100644 index 18ecc9934cf..00000000000 --- a/app-multimedia/aegisub/autobuild/prepare +++ /dev/null @@ -1,4 +0,0 @@ -sed 's/$(LIBS_BOOST) $(LIBS_ICU)/$(LIBS_BOOST) $(LIBS_ICU) -pthread/' -i tools/Makefile - -# FIXME: build fails with flags enabled -# unset LDFLAGS CFLAGS CPPFLAGS CXXFLAGS diff --git a/app-multimedia/aegisub/spec b/app-multimedia/aegisub/spec index 70c06d53a30..c790deafb44 100644 --- a/app-multimedia/aegisub/spec +++ b/app-multimedia/aegisub/spec @@ -1,5 +1,5 @@ -VER=3.2.2+git20191006 -REL=1 -SRCS="git::commit=6f546951b4f004da16ce19ba638bf3eedefb9f31;copy-repo=true;submodule=false::https://github.com/Aegisub/Aegisub.git" +VER=3.2.2+git20231203 +__COMMIT="c88f918be0d45de64c99ce8e7947a03821602f92" +SRCS="git::commit=${__COMMIT};copy-repo=true::https://github.com/TypesettingTools/Aegisub.git" CHKSUMS="SKIP" CHKUPDATE="anitya::id=13797" diff --git a/app-network/filezilla/autobuild/beyond b/app-network/filezilla/autobuild/beyond deleted file mode 100644 index c253611cb65..00000000000 --- a/app-network/filezilla/autobuild/beyond +++ /dev/null @@ -1,3 +0,0 @@ -appstream-util replace-screenshots \ - "$PKGDIR"/usr/share/appdata/filezilla.appdata.xml \ - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/filezilla/a.png diff --git a/app-network/filezilla/autobuild/defines b/app-network/filezilla/autobuild/defines index 3748c2d71e4..7f289f8d9fa 100644 --- a/app-network/filezilla/autobuild/defines +++ b/app-network/filezilla/autobuild/defines @@ -4,14 +4,9 @@ PKGSEC=net PKGDEP="wxgtk3 dbus xdg-utils libidn hicolor-icon-theme sqlite gnutls libfilezilla pugixml" BUILDDEP="appstream-glib llvm" +ABTYPE=autotools AUTOTOOLS_AFTER="--disable-manualupdatecheck \ --disable-autoupdatecheck \ --with-pugixml=system \ --enable-locales \ --with-dbus" - -USECLANG=1 -# FIXME: LLVM ERROR: Broken module found, compilation aborted! -# Global is external, but doesn't have external or weak linkage! -# ptr @vsnprintf.inline -USECLANG__PPC64EL=0 diff --git a/app-network/filezilla/autobuild/patches/0001-Increase-max-text-width-on-the-about-dialog.patch b/app-network/filezilla/autobuild/patches/0001-Increase-max-text-width-on-the-about-dialog.patch new file mode 100644 index 00000000000..bd41a871954 --- /dev/null +++ b/app-network/filezilla/autobuild/patches/0001-Increase-max-text-width-on-the-about-dialog.patch @@ -0,0 +1,41 @@ +From e995fb0fbb83673a60568c371d58de0b0a67c950 Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Sun, 21 Jan 2024 23:42:47 -0800 +Subject: [PATCH] Increase max text width on the about dialog + +--- + src/interface/aboutdialog.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/interface/aboutdialog.cpp b/src/interface/aboutdialog.cpp +index 9b79edf..3e1f55a 100644 +--- a/src/interface/aboutdialog.cpp ++++ b/src/interface/aboutdialog.cpp +@@ -63,13 +63,13 @@ bool CAboutDialog::Create(wxWindow* parent) + + inner->Add(new wxStaticText(box, -1, _("Compiled with:"))); + wxString cc = CBuildInfo::GetCompiler(); +- WrapText(this, cc, 300); ++ WrapText(this, cc, 640); + inner->Add(new wxStaticText(box, -1, cc)); + + wxString compilerFlags = CBuildInfo::GetCompilerFlags(); + if (!compilerFlags.empty()) { + inner->Add(new wxStaticText(box, -1, _("Compiler flags:"))); +- WrapText(this, compilerFlags, 300); ++ WrapText(this, compilerFlags, 640); + inner->Add(new wxStaticText(box, -1, compilerFlags)); + } + } +@@ -111,7 +111,7 @@ bool CAboutDialog::Create(wxWindow* parent) + wxString cpuCaps = CBuildInfo::GetCPUCaps(' '); + if (!cpuCaps.empty()) { + inner->Add(new wxStaticText(box, -1, _("CPU features:"))); +- WrapText(this, cpuCaps, 300); ++ WrapText(this, cpuCaps, 640); + inner->Add(new wxStaticText(box, -1, cpuCaps)); + } + +-- +2.39.1 + diff --git a/app-network/filezilla/autobuild/prepare b/app-network/filezilla/autobuild/prepare deleted file mode 100644 index b6ad806231a..00000000000 --- a/app-network/filezilla/autobuild/prepare +++ /dev/null @@ -1,2 +0,0 @@ -ln -s /usr/lib/wx/config/gtk3-unicode-3.0 "$SRCDIR"/wx-config -export PATH="$SRCDIR:$PATH" diff --git a/app-network/filezilla/spec b/app-network/filezilla/spec index 95393b847d3..f1456077170 100644 --- a/app-network/filezilla/spec +++ b/app-network/filezilla/spec @@ -1,5 +1,4 @@ -VER=3.50.0 -REL=1 -SRCS="tbl::https://download.filezilla-project.org/client/FileZilla_${VER}_src.tar.bz2" -CHKSUMS='sha256::e0db87269ca5208aad14a02415337b4f9efe3c49c2d4d14e66e921c78a135c10' +VER=3.66.4 +SRCS="tbl::https://download.filezilla-project.org/client/FileZilla_${VER}_src.tar.xz" +CHKSUMS="sha256::a40f04e02efaae7b50d1515ee1c36c4b0e445818566c450e440bfd6c70e9b203" CHKUPDATE="anitya::id=809" diff --git a/app-scientific/boinc/autobuild/defines b/app-scientific/boinc/autobuild/defines index 5059b023343..47a97653753 100644 --- a/app-scientific/boinc/autobuild/defines +++ b/app-scientific/boinc/autobuild/defines @@ -4,8 +4,12 @@ PKGDES="Berkeley Open Infrastructure for Network Computing for desktop" PKGDEP="curl x11-lib libnotify sqlite wxgtk3 libunwind webkit2gtk" BUILDDEP="freeglut git glu inetutils libxslt mesa perl-xml-sax" -AUTOTOOLS_AFTER="--disable-server --enable-unicode --with-ssl \ +ABTYPE=autotools +AUTOTOOLS_AFTER="--disable-server \ + --enable-unicode --with-ssl \ --enable-dynamic-client-linkage \ - --with-wxdir=/usr/lib --with-wx-config=wx-config-gtk3 \ - --enable-client --enable-manager --with-x" -ABSHADOW=no + --with-wxdir=/usr/lib \ + --with-wx-config=wx-config-gtk3 \ + --enable-client \ + --enable-manager \ + --with-x" diff --git a/app-scientific/boinc/autobuild/patches/0001-client-cs_platform-do-not-support-32-bit-on-x64.patch b/app-scientific/boinc/autobuild/patches/0001-client-cs_platform-do-not-support-32-bit-on-x64.patch index 7bbbd26a35d..1fc2d70c096 100644 --- a/app-scientific/boinc/autobuild/patches/0001-client-cs_platform-do-not-support-32-bit-on-x64.patch +++ b/app-scientific/boinc/autobuild/patches/0001-client-cs_platform-do-not-support-32-bit-on-x64.patch @@ -1,7 +1,7 @@ -From 3af7f9cf5ce3dfd2316726904edfed4640ff57dc Mon Sep 17 00:00:00 2001 +From ef56db6c448d071414a6e8edc15ec04cbedcad2a Mon Sep 17 00:00:00 2001 From: Lion Yang Date: Fri, 8 Feb 2019 18:53:40 +0800 -Subject: [PATCH] client/cs_platform: do not support 32-bit on x64 +Subject: [PATCH 1/3] client/cs_platform: do not support 32-bit on x64 Hardcode this to bypass the ugly thing which scans your whole /lib directory. @@ -10,10 +10,10 @@ scans your whole /lib directory. 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/client/cs_platforms.cpp b/client/cs_platforms.cpp -index b6d761d398..82461f11b7 100644 +index 04ffd672e8..9fb5c43aed 100644 --- a/client/cs_platforms.cpp +++ b/client/cs_platforms.cpp -@@ -146,52 +146,7 @@ void CLIENT_STATE::detect_platforms() { +@@ -153,52 +153,7 @@ void CLIENT_STATE::detect_platforms() { // If we're a 32 bit binary, then we obviously can. support32=1; #else @@ -68,5 +68,5 @@ index b6d761d398..82461f11b7 100644 } } -- -2.18.1 +2.39.1 diff --git a/app-scientific/boinc/autobuild/patches/0002-neuter-update-checks.patch b/app-scientific/boinc/autobuild/patches/0002-Neuter-update-checks.patch similarity index 63% rename from app-scientific/boinc/autobuild/patches/0002-neuter-update-checks.patch rename to app-scientific/boinc/autobuild/patches/0002-Neuter-update-checks.patch index 955dd18be6c..b6ff19431b3 100644 --- a/app-scientific/boinc/autobuild/patches/0002-neuter-update-checks.patch +++ b/app-scientific/boinc/autobuild/patches/0002-Neuter-update-checks.patch @@ -1,7 +1,20 @@ -diff -Naur boinc-client_release-7.16-7.16.3/clientgui/AdvancedFrame.cpp boinc-client_release-7.16-7.16.3.noupdate/clientgui/AdvancedFrame.cpp ---- boinc-client_release-7.16-7.16.3/clientgui/AdvancedFrame.cpp 2019-09-29 19:02:35.000000000 +0000 -+++ boinc-client_release-7.16-7.16.3.noupdate/clientgui/AdvancedFrame.cpp 2020-01-23 15:39:08.006339310 +0000 -@@ -198,7 +198,6 @@ +From 724e285d82a5bf81e4d6b819b9aea1395a50acbd Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 29 Jan 2024 20:15:26 -0800 +Subject: [PATCH 2/3] Neuter update checks + +Co-Authored-By: Mingcong Bai +--- + clientgui/AdvancedFrame.cpp | 16 ---------------- + clientgui/Events.h | 1 - + clientgui/sg_BoincSimpleFrame.cpp | 16 ---------------- + 3 files changed, 33 deletions(-) + +diff --git a/clientgui/AdvancedFrame.cpp b/clientgui/AdvancedFrame.cpp +index 77354f1a75..20c2154926 100644 +--- a/clientgui/AdvancedFrame.cpp ++++ b/clientgui/AdvancedFrame.cpp +@@ -195,7 +195,6 @@ BEGIN_EVENT_TABLE (CAdvancedFrame, CBOINCBaseFrame) EVT_MENU(ID_HELPBOINCMANAGER, CAdvancedFrame::OnHelpBOINC) EVT_MENU(ID_HELPBOINCWEBSITE, CAdvancedFrame::OnHelpBOINC) EVT_MENU(wxID_ABOUT, CAdvancedFrame::OnHelpAbout) @@ -9,11 +22,10 @@ diff -Naur boinc-client_release-7.16-7.16.3/clientgui/AdvancedFrame.cpp boinc-cl EVT_MENU(ID_REPORT_BUG, CAdvancedFrame::OnReportBug) EVT_HELP(wxID_ANY, CAdvancedFrame::OnHelp) // Custom Events & Timers -@@ -685,21 +684,6 @@ - strMenuDescription +@@ -684,21 +683,6 @@ bool CAdvancedFrame::CreateMenus() { ); menuHelp->AppendSeparator(); -- + - strMenuName.Printf( - _("Check for new %s version"), - pSkinAdvanced->GetApplicationShortName().c_str() @@ -28,12 +40,14 @@ diff -Naur boinc-client_release-7.16-7.16.3/clientgui/AdvancedFrame.cpp boinc-cl - strMenuDescription - ); - menuHelp->AppendSeparator(); - +- menuHelp->Append( ID_REPORT_BUG, -diff -Naur boinc-client_release-7.16-7.16.3/clientgui/Events.h boinc-client_release-7.16-7.16.3.noupdate/clientgui/Events.h ---- boinc-client_release-7.16-7.16.3/clientgui/Events.h 2019-09-29 19:02:35.000000000 +0000 -+++ boinc-client_release-7.16-7.16.3.noupdate/clientgui/Events.h 2020-01-23 15:39:21.280228005 +0000 + _("Report Issue"), +diff --git a/clientgui/Events.h b/clientgui/Events.h +index 58783cc935..691759bf73 100644 +--- a/clientgui/Events.h ++++ b/clientgui/Events.h @@ -95,7 +95,6 @@ #define ID_HELPBOINC 6035 // Locked: Used by manager_links.php #define ID_HELPBOINCWEBSITE 6024 // Locked: Used by manager_links.php @@ -42,10 +56,11 @@ diff -Naur boinc-client_release-7.16-7.16.3/clientgui/Events.h boinc-client_rele #define ID_REPORT_BUG 6027 //#define wxID_ABOUT -diff -Naur boinc-client_release-7.16-7.16.3/clientgui/sg_BoincSimpleFrame.cpp boinc-client_release-7.16-7.16.3.noupdate/clientgui/sg_BoincSimpleFrame.cpp ---- boinc-client_release-7.16-7.16.3/clientgui/sg_BoincSimpleFrame.cpp 2019-09-29 19:02:35.000000000 +0000 -+++ boinc-client_release-7.16-7.16.3.noupdate/clientgui/sg_BoincSimpleFrame.cpp 2020-01-23 15:39:58.591789068 +0000 -@@ -92,7 +92,6 @@ +diff --git a/clientgui/sg_BoincSimpleFrame.cpp b/clientgui/sg_BoincSimpleFrame.cpp +index 7b16655168..a3ee4b4167 100644 +--- a/clientgui/sg_BoincSimpleFrame.cpp ++++ b/clientgui/sg_BoincSimpleFrame.cpp +@@ -91,7 +91,6 @@ BEGIN_EVENT_TABLE(CSimpleFrame, CBOINCBaseFrame) EVT_MENU(ID_HELPBOINCMANAGER, CSimpleFrame::OnHelpBOINC) EVT_MENU(ID_HELPBOINCWEBSITE, CSimpleFrame::OnHelpBOINC) EVT_MENU(wxID_ABOUT, CSimpleFrame::OnHelpAbout) @@ -53,11 +68,10 @@ diff -Naur boinc-client_release-7.16-7.16.3/clientgui/sg_BoincSimpleFrame.cpp bo EVT_MENU(ID_REPORT_BUG, CSimpleFrame::OnReportBug) EVT_MENU(ID_EVENTLOG, CSimpleFrame::OnEventLog) EVT_MOVE(CSimpleFrame::OnMove) -@@ -318,21 +317,6 @@ - strMenuDescription +@@ -318,21 +317,6 @@ bool CSimpleFrame::CreateMenus() { ); menuHelp->AppendSeparator(); -- + - strMenuName.Printf( - _("Check for new %s version"), - pSkinAdvanced->GetApplicationShortName().c_str() @@ -72,6 +86,10 @@ diff -Naur boinc-client_release-7.16-7.16.3/clientgui/sg_BoincSimpleFrame.cpp bo - strMenuDescription - ); - menuHelp->AppendSeparator(); - +- menuHelp->Append( ID_REPORT_BUG, + _("Report Issue"), +-- +2.39.1 + diff --git a/app-scientific/boinc/autobuild/patches/0003-Drop-x86-specific-flags-from-configure.patch b/app-scientific/boinc/autobuild/patches/0003-Drop-x86-specific-flags-from-configure.patch new file mode 100644 index 00000000000..c0abeadbf54 --- /dev/null +++ b/app-scientific/boinc/autobuild/patches/0003-Drop-x86-specific-flags-from-configure.patch @@ -0,0 +1,29 @@ +From c5a2dcaa306192fe7c0a1c791d1cea93d4a80423 Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 29 Jan 2024 20:19:00 -0800 +Subject: [PATCH 3/3] Drop x86-specific flags from configure + +Co-Authored-By: Mingcong Bai +--- + configure.ac | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 8167a63b74..1d6c0b3735 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -674,11 +674,7 @@ AC_CHECK_HEADERS([sys/types.h sys/un.h arpa/inet.h dirent.h grp.h fcntl.h inttyp + + save_cxxflags="${CXXFLAGS}" + save_cppflags="${CPPFLAGS}" +-CXXFLAGS="${CXXFLAGS} -msse3" +-CPPFLAGS="${CPPFLAGS} -msse3" + AC_CHECK_HEADERS([intrin.h x86intrin.h pmmintrin.h xmmintrin.h emmintrin.h]) +-CXXFLAGS="${save_cxxflags} -mavx" +-CPPFLAGS="${save_cppflags} -mavx" + AC_CHECK_HEADERS([immintrin.h avxintrin.h]) + + AC_CHECK_DECLS([_xgetbv, xgetbv, __xgetbv, cpuid, _cpuid, __cpuid], +-- +2.39.1 + diff --git a/app-scientific/boinc/autobuild/patches/0003-boinc-AM_CONDITIONAL.patch b/app-scientific/boinc/autobuild/patches/0003-boinc-AM_CONDITIONAL.patch deleted file mode 100644 index 660bea3c775..00000000000 --- a/app-scientific/boinc/autobuild/patches/0003-boinc-AM_CONDITIONAL.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- A/configure.ac -+++ B/configure.ac -@@ -39,6 +39,7 @@ AC_PROG_CC - AC_PROG_CXX - AC_PROG_F77 - AC_PROG_CPP -+AC_PROG_OBJCXX - AC_PROG_MAKE_SET - SAH_LINKS - AC_LANG_PUSH(C) -@@ -744,6 +745,8 @@ AM_CONDITIONAL(ENABLE_LIBRARIES, [test " - AM_CONDITIONAL(INSTALL_HEADERS, [test "${enable_install_headers}" = yes]) - AM_CONDITIONAL(HAVE_CUDA_LIB, [test "${enable_client}" = yes -a -f ./coprocs/CUDA/posix/${boinc_platform}/libcudart.so]) - -+PKG_CHECK_MODULES([GTK2], [gtk+-2.0]) -+ - dnl ====================================================================== - dnl some more vodoo required for building portable client-binary (client, clientgui) - dnl ====================================================================== diff --git a/app-scientific/boinc/autobuild/patches/0003-configure_ac-drop-x86-flags.patch b/app-scientific/boinc/autobuild/patches/0003-configure_ac-drop-x86-flags.patch deleted file mode 100644 index 756d5a5596b..00000000000 --- a/app-scientific/boinc/autobuild/patches/0003-configure_ac-drop-x86-flags.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur boinc-client_release-7.16-7.16.16/configure.ac boinc-client_release-7.16-7.16.16.nonx86/configure.ac ---- boinc-client_release-7.16-7.16.16/configure.ac 2021-01-31 23:38:58.000000000 +0000 -+++ boinc-client_release-7.16-7.16.16.nonx86/configure.ac 2023-08-15 10:19:36.735657509 +0000 -@@ -674,11 +674,7 @@ - - save_cxxflags="${CXXFLAGS}" - save_cppflags="${CPPFLAGS}" --CXXFLAGS="${CXXFLAGS} -msse3" --CPPFLAGS="${CPPFLAGS} -msse3" - AC_CHECK_HEADERS([intrin.h x86intrin.h pmmintrin.h xmmintrin.h emmintrin.h]) --CXXFLAGS="${save_cxxflags} -mavx" --CPPFLAGS="${save_cppflags} -mavx" - AC_CHECK_HEADERS([immintrin.h avxintrin.h]) - - AC_CHECK_DECLS([_xgetbv, xgetbv, __xgetbv, cpuid, _cpuid, __cpuid], diff --git a/app-scientific/boinc/spec b/app-scientific/boinc/spec index b0b19b5f7ba..4d326861c09 100644 --- a/app-scientific/boinc/spec +++ b/app-scientific/boinc/spec @@ -2,4 +2,4 @@ VER=7.16.16 SRCS="tbl::https://github.com/BOINC/boinc/archive/client_release/${VER%.*}/$VER.tar.gz" CHKSUMS="sha256::0d5656a9f8ed1048936a5764270848b892d63f27bdb863d0ace447f1eaae6002" CHKUPDATE="anitya::id=211" -REL=1 +REL=2 diff --git a/app-scientific/wxmaxima/autobuild/defines b/app-scientific/wxmaxima/autobuild/defines index f7513bd84de..1a69f4bea0c 100644 --- a/app-scientific/wxmaxima/autobuild/defines +++ b/app-scientific/wxmaxima/autobuild/defines @@ -3,3 +3,4 @@ PKGSEC=math PKGDEP="maxima libxml2 wxgtk3 shared-mime-info desktop-file-utils" PKGDES="A wxWidgets frontend for Maxima" +ABTYPE=cmakeninja diff --git a/app-scientific/wxmaxima/autobuild/prepare b/app-scientific/wxmaxima/autobuild/prepare deleted file mode 100644 index b6ad806231a..00000000000 --- a/app-scientific/wxmaxima/autobuild/prepare +++ /dev/null @@ -1,2 +0,0 @@ -ln -s /usr/lib/wx/config/gtk3-unicode-3.0 "$SRCDIR"/wx-config -export PATH="$SRCDIR:$PATH" diff --git a/app-scientific/wxmaxima/spec b/app-scientific/wxmaxima/spec index b60c8076710..8c704dc7e5a 100644 --- a/app-scientific/wxmaxima/spec +++ b/app-scientific/wxmaxima/spec @@ -1,4 +1,5 @@ VER=22.05.0 +REL=1 SRCS="tbl::https://github.com/wxMaxima-developers/wxmaxima/archive/Version-$VER.tar.gz" CHKSUMS="sha256::a0140b9f6171540556bd40c6b5617eb9ea224debe592014cbfabd0c095594b93" CHKUPDATE="anitya::id=6366" diff --git a/app-utils/gnuplot/autobuild/defines b/app-utils/gnuplot/autobuild/defines index 3c12beda58a..3040f85cf08 100644 --- a/app-utils/gnuplot/autobuild/defines +++ b/app-utils/gnuplot/autobuild/defines @@ -1,12 +1,12 @@ PKGNAME=gnuplot PKGSEC=utils -PKGDEP="x11-lib readline cairo libgd qt-5 wxgtk2" +PKGDEP="x11-lib readline cairo libgd qt-5 wxgtk3" BUILDDEP="emacs texinfo texlive" PKGDES="Plotting package which outputs to X11, PostScript, PNG, GIF and others" -AUTOTOOLS_AFTER="--with-gihdir=/usr/share/gnuplot --with-readline=gnu \ - --libexecdir=/usr/bin --with-texdir=/usr/share/texmf" +ABTYPE=autotools +AUTOTOOLS_AFTER="--with-gihdir=/usr/share/gnuplot \ + --with-readline=gnu \ + --libexecdir=/usr/bin \ + --with-texdir=/usr/share/texmf" MAKE_AFTER="pkglibexecdir=/usr/bin" - -ABSHADOW=no -NOPARALLEL=1 diff --git a/app-utils/gnuplot/spec b/app-utils/gnuplot/spec index aee3a82c160..e55437f7d16 100644 --- a/app-utils/gnuplot/spec +++ b/app-utils/gnuplot/spec @@ -1,5 +1,5 @@ VER=5.2.8 +REL=4 SRCS="tbl::https://sourceforge.net/projects/gnuplot/files/gnuplot/$VER/gnuplot-$VER.tar.gz" CHKSUMS="sha256::60a6764ccf404a1668c140f11cc1f699290ab70daa1151bb58fed6139a28ac37" -REL=3 CHKUPDATE="anitya::id=1216" diff --git a/app-utils/woeusb/autobuild/build b/app-utils/woeusb/autobuild/build new file mode 100644 index 00000000000..5eac77c3ecf --- /dev/null +++ b/app-utils/woeusb/autobuild/build @@ -0,0 +1,10 @@ +abinfo "Installing WoeUSB ..." +install -Dvm755 "$SRCDIR/sbin/woeusb" "$PKGDIR/usr/bin/woeusb" + +abinfo "Installing WoeUSB manpages ..." +install -Dvm644 "$SRCDIR/share/man/man1/woeusb.1" \ + "$PKGDIR/usr/share/man/man1/woeusb.1" + +abinfo "Installing WoeUSB icons ..." +install -Dvm644 "$SRCDIR/share/woeusb/woeusb.svg" \ + "$PKGDIR/usr/share/icons/hicolor/scalable/apps/woeusb.svg" diff --git a/app-utils/woeusb/autobuild/defines b/app-utils/woeusb/autobuild/defines index 17c31459fe6..5ad6a323629 100644 --- a/app-utils/woeusb/autobuild/defines +++ b/app-utils/woeusb/autobuild/defines @@ -1,6 +1,8 @@ PKGNAME=woeusb +PKGSEC=utils PKGDES="A Linux program to create Windows USB stick installer from a Windows DVD or an image" -PKGDEP="wxgtk2 grub dosfstools parted wget ntfs-3g" -PKGSEC="utils" +PKGDEP="bash coreutils util-linux grep gawk findutils grub parted wget \ + dosfstools ntfs-3g wimlib p7zip" -ABSHADOW=0 +ABTYPE=self +ABHOST=noarch diff --git a/app-utils/woeusb/autobuild/prepare b/app-utils/woeusb/autobuild/prepare new file mode 100644 index 00000000000..0d03887467a --- /dev/null +++ b/app-utils/woeusb/autobuild/prepare @@ -0,0 +1,3 @@ +# FIXME: WoeUSB does not have a build system, we have to this manually +abinfo "Replacing version placeholders with $PKGVER..." +find "$SRCDIR" -type f -print0 | xargs -0 sed -i "s/@@WOEUSB_VERSION@@/$PKGVER/" diff --git a/app-utils/woeusb/spec b/app-utils/woeusb/spec index 9f756248be6..a78e35f9e35 100644 --- a/app-utils/woeusb/spec +++ b/app-utils/woeusb/spec @@ -1,4 +1,4 @@ -VER=3.3.1 -SRCS="tbl::https://github.com/slacka/WoeUSB/archive/v$VER.tar.gz" -CHKSUMS="sha256::0cab88a1113506f39d2f1c19532b2cd8d968c6a9f59129953c000e29e73f3d4f" +VER=5.2.4 +SRCS="git::commit=tags/v$VER::https://github.com/WoeUSB/WoeUSB" +CHKSUMS="SKIP" CHKUPDATE="anitya::id=16984" diff --git a/app-web/amule/autobuild/defines b/app-web/amule/autobuild/defines index 01bd68569ff..f7b750010f1 100644 --- a/app-web/amule/autobuild/defines +++ b/app-web/amule/autobuild/defines @@ -1,24 +1,24 @@ PKGNAME=amule PKGSEC=net -PKGDEP="binutils wxgtk2 libgd geoip-api-c libupnp crypto++ libwebp wx-base" +PKGDEP="binutils wxgtk3 libgd geoip-api-c libupnp crypto++ libwebp" PKGDES="An eMule-like client for ed2k network" +ABTYPE=autotools AUTOTOOLS_AFTER="--prefix=/usr \ - --mandir=/usr/share/man \ - --enable-cas \ - --enable-wxcas \ - --enable-amule-daemon \ - --enable-amulecmd \ - --enable-amule-gui \ - --enable-alc \ - --enable-alcc \ - --enable-webserver \ - --disable-debug \ - --enable-optimize \ - --enable-geoip \ - --enable-upnp \ - --enable-fileview \ - --with-boost" -ABSHADOW=no -NOLTO=1 + --mandir=/usr/share/man \ + --enable-cas \ + --enable-wxcas \ + --enable-amule-daemon \ + --enable-amulecmd \ + --enable-amule-gui \ + --enable-alc \ + --enable-alcc \ + --enable-webserver \ + --disable-debug \ + --enable-optimize \ + --enable-geoip \ + --enable-upnp \ + --enable-fileview \ + --with-boost" + PKGEPOCH=1 diff --git a/app-web/amule/autobuild/overrides/usr/lib/systemd/system/amuled.service b/app-web/amule/autobuild/overrides/usr/lib/systemd/system/amuled.service index 5c2f545978d..e1878dfd975 100644 --- a/app-web/amule/autobuild/overrides/usr/lib/systemd/system/amuled.service +++ b/app-web/amule/autobuild/overrides/usr/lib/systemd/system/amuled.service @@ -9,4 +9,3 @@ ExecStart=/usr/bin/amuled [Install] WantedBy=multi-user.target - diff --git a/app-web/amule/autobuild/overrides/usr/lib/systemd/system/amuleweb.service b/app-web/amule/autobuild/overrides/usr/lib/systemd/system/amuleweb.service index 50f3d712e5e..436a6e4af4c 100644 --- a/app-web/amule/autobuild/overrides/usr/lib/systemd/system/amuleweb.service +++ b/app-web/amule/autobuild/overrides/usr/lib/systemd/system/amuleweb.service @@ -10,4 +10,3 @@ RestartSec=5s [Install] WantedBy=multi-user.target - diff --git a/app-web/amule/autobuild/overrides/usr/lib/sysusers.d/amule.conf b/app-web/amule/autobuild/overrides/usr/lib/sysusers.d/amule.conf new file mode 100644 index 00000000000..1b9f16b1552 --- /dev/null +++ b/app-web/amule/autobuild/overrides/usr/lib/sysusers.d/amule.conf @@ -0,0 +1 @@ +u amule - "aMule Daemon" /var/lib/amule diff --git a/app-web/amule/autobuild/overrides/usr/lib/tmpfiles.d/amule.conf b/app-web/amule/autobuild/overrides/usr/lib/tmpfiles.d/amule.conf new file mode 100644 index 00000000000..7f74ba8c441 --- /dev/null +++ b/app-web/amule/autobuild/overrides/usr/lib/tmpfiles.d/amule.conf @@ -0,0 +1 @@ +d /var/lib/amule 0750 amule amule diff --git a/app-web/amule/autobuild/patches/0005-debian-add-wxwidgets-3.2-support.patch b/app-web/amule/autobuild/patches/0005-debian-add-wxwidgets-3.2-support.patch new file mode 100644 index 00000000000..58590c60f2d --- /dev/null +++ b/app-web/amule/autobuild/patches/0005-debian-add-wxwidgets-3.2-support.patch @@ -0,0 +1,461 @@ +Description: Fixes for wxWidgets 3.2 compatibility + Largely based on patch from Mr Hyde in + https://github.com/amule-project/amule/pull/168 +Author: Olly Betts +Bug: https://github.com/amule-project/amule/issues/340 +Bug-Debian: https://bugs.debian.org/1019841 +Forwarded: no +Last-Update: 2023-01-09 + +--- a/src/ColorFrameCtrl.cpp ++++ b/src/ColorFrameCtrl.cpp +@@ -61,7 +61,7 @@ + ///////////////////////////////////////////////////////////////////////////// + void CColorFrameCtrl::SetFrameBrushColour(const wxColour& colour) + { +- m_brushFrame = *(wxTheBrushList->FindOrCreateBrush(colour, wxSOLID)); ++ m_brushFrame = *(wxTheBrushList->FindOrCreateBrush(colour, wxBRUSHSTYLE_SOLID)); + + Refresh(FALSE); + } // SetFrameColor +@@ -70,7 +70,7 @@ + ///////////////////////////////////////////////////////////////////////////// + void CColorFrameCtrl::SetBackgroundBrushColour(const wxColour& colour) + { +- m_brushBack = *(wxTheBrushList->FindOrCreateBrush(colour, wxSOLID)); ++ m_brushBack = *(wxTheBrushList->FindOrCreateBrush(colour, wxBRUSHSTYLE_SOLID)); + + // clear out the existing garbage, re-start with a clean plot + Refresh(FALSE); +--- a/src/DownloadListCtrl.cpp ++++ b/src/DownloadListCtrl.cpp +@@ -850,7 +850,7 @@ + dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); + dc->SetPen( colour.Blend(65).GetPen() ); + } else { +- dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID))); ++ dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxBRUSHSTYLE_SOLID))); + dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + dc->SetPen(*wxTRANSPARENT_PEN); + } +@@ -1413,7 +1413,7 @@ + dc->DrawLine( rect.x, rect.y + 2, rect.x + width, rect.y + 2 ); + + // Draw the green line +- dc->SetPen( *(wxThePenList->FindOrCreatePen( crProgress , 1, wxSOLID ) )); ++ dc->SetPen( *(wxThePenList->FindOrCreatePen( crProgress , 1, wxPENSTYLE_SOLID ) )); + dc->DrawLine( rect.x, rect.y + 1, rect.x + width, rect.y + 1 ); + } + } +--- a/src/GenericClientListCtrl.cpp ++++ b/src/GenericClientListCtrl.cpp +@@ -660,7 +660,7 @@ + dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); + dc->SetPen( colour.Blend(65).GetPen() ); + } else { +- dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID))); ++ dc->SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxBRUSHSTYLE_SOLID))); + dc->SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); + dc->SetPen(*wxTRANSPARENT_PEN); + } +--- a/src/MuleColour.cpp ++++ b/src/MuleColour.cpp +@@ -35,7 +35,7 @@ + std::map wxPenCache; + std::map wxBrushCache; + +-const wxPen& CMuleColour::GetPen(int width, int style) const ++const wxPen& CMuleColour::GetPen(int width, wxPenStyle style) const + { + #if USE_MULE_PEN_CACHE + wxPen* result = NULL; +@@ -61,7 +61,7 @@ + #endif + } + +-const wxBrush& CMuleColour::GetBrush(int style) const ++const wxBrush& CMuleColour::GetBrush(wxBrushStyle style) const + { + #if USE_MULE_BRUSH_CACHE + wxBrush* result = NULL; +--- a/src/MuleColour.h ++++ b/src/MuleColour.h +@@ -27,6 +27,9 @@ + + #include + #include ++#include // needed for wxPenStyle enum values ++#include // needed for wxBrushStyle enum values ++#include // needed for wxFontStyle enum values + #include "Types.h" + + class wxPen; +@@ -95,8 +98,8 @@ + return wxColor(m_red, m_green, m_blue); + } + +- const wxPen& GetPen(int width = 1, int style = wxSOLID) const; +- const wxBrush& GetBrush(int style = wxSOLID) const; ++ const wxPen& GetPen(int width = 1, wxPenStyle style = wxPENSTYLE_SOLID) const; ++ const wxBrush& GetBrush(wxBrushStyle style = wxBRUSHSTYLE_SOLID) const; + + private: + uint8_t m_red; +--- a/src/MuleGifCtrl.cpp ++++ b/src/MuleGifCtrl.cpp +@@ -167,7 +167,7 @@ + int x = (clientsize.GetWidth()-gifsize.GetWidth())/2; + int y = (clientsize.GetHeight()-gifsize.GetHeight())/2; + +- dc.SetBackground(*(wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID))); ++ dc.SetBackground(*(wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID))); + dc.Clear(); + dc.DrawBitmap(m_frame, x, y, true); + } +--- a/src/OScopeCtrl.cpp ++++ b/src/OScopeCtrl.cpp +@@ -74,7 +74,7 @@ + PlotData_t* ppds = pdsTrends; + for(unsigned i=0; icrPlot = (i<15 ? crPreset[i] : *wxWHITE); +- ppds->penPlot=*(wxThePenList->FindOrCreatePen(ppds->crPlot, 1, wxSOLID)); ++ ppds->penPlot=*(wxThePenList->FindOrCreatePen(ppds->crPlot, 1, wxPENSTYLE_SOLID)); + ppds->fPrev = ppds->fLowerLimit = ppds->fUpperLimit = 0.0; + } + +@@ -166,7 +166,7 @@ + if (ppds->crPlot == cr) + return; + ppds->crPlot = cr; +- ppds->penPlot=*(wxThePenList->FindOrCreatePen(ppds->crPlot, 1, wxSOLID)); ++ ppds->penPlot=*(wxThePenList->FindOrCreatePen(ppds->crPlot, 1, wxPENSTYLE_SOLID)); + InvalidateGraph(); + } + +@@ -179,7 +179,7 @@ + } + + m_bgColour = cr; +- brushBack= *(wxTheBrushList->FindOrCreateBrush(cr, wxSOLID)); ++ brushBack= *(wxTheBrushList->FindOrCreateBrush(cr, wxBRUSHSTYLE_SOLID)); + InvalidateCtrl() ; + } + +@@ -196,7 +196,7 @@ + + wxMemoryDC dcGrid(m_bmapGrid); + +- wxPen solidPen = *(wxThePenList->FindOrCreatePen(m_gridColour, 1, wxSOLID)); ++ wxPen solidPen = *(wxThePenList->FindOrCreatePen(m_gridColour, 1, wxPENSTYLE_SOLID)); + wxString strTemp; + + // fill the grid background +@@ -213,7 +213,7 @@ + dcGrid.SetPen(wxNullPen); + + // create some fonts (horizontal and vertical) +- wxFont axisFont(10, wxSWISS, wxNORMAL, wxNORMAL, false); ++ wxFont axisFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false); + dcGrid.SetFont(axisFont); + + // y max +@@ -320,7 +320,7 @@ + // operation, preventing us from simply blitting the plot on top of + // the grid bitmap. + +- dc.SetPen(*(wxThePenList->FindOrCreatePen(m_gridColour, 1, wxLONG_DASH))); ++ dc.SetPen(*(wxThePenList->FindOrCreatePen(m_gridColour, 1, wxPENSTYLE_LONG_DASH))); + for (unsigned j = 1; j < (nYGrids + 1); ++j) { + unsigned GridPos = (m_rectPlot.GetHeight())*j/( nYGrids + 1 ) + m_rectPlot.GetTop(); + +--- a/src/SearchListCtrl.cpp ++++ b/src/SearchListCtrl.cpp +@@ -826,7 +826,7 @@ + + // Define the border of the drawn area + if (highlighted) { +- dc->SetPen(*(wxThePenList->FindOrCreatePen(CMuleColour(dc->GetBackground().GetColour()).Blend(65), 1, wxSOLID))); ++ dc->SetPen(*(wxThePenList->FindOrCreatePen(CMuleColour(dc->GetBackground().GetColour()).Blend(65), 1, wxPENSTYLE_SOLID))); + } else { + dc->SetPen(*wxTRANSPARENT_PEN); + dc->SetTextForeground(GetItemTextColour(item)); +@@ -912,7 +912,7 @@ + const int middle = cur_rec.y + ( cur_rec.height + 1 ) / 2; + + // Set up a new pen for drawing the tree +- dc->SetPen( *(wxThePenList->FindOrCreatePen(dc->GetTextForeground(), 1, wxSOLID)) ); ++ dc->SetPen( *(wxThePenList->FindOrCreatePen(dc->GetTextForeground(), 1, wxPENSTYLE_SOLID)) ); + + if (file->GetParent()) { + // Draw the line to the filename +--- a/src/ServerListCtrl.cpp ++++ b/src/ServerListCtrl.cpp +@@ -327,7 +327,7 @@ + wxFont font = GetFont(); + + if ( highlight ) { +- font.SetWeight( wxBOLD ); ++ font.SetWeight( wxFONTWEIGHT_BOLD ); + + m_connected = server; + } +--- a/src/extern/wxWidgets/listctrl.cpp ++++ b/src/extern/wxWidgets/listctrl.cpp +@@ -1453,7 +1453,7 @@ + if ( highlighted ) + dc->SetBrush( m_owner->GetHighlightBrush() ); + else +- dc->SetBrush(*(wxTheBrushList->FindOrCreateBrush(attr->GetBackgroundColour(), wxSOLID))); ++ dc->SetBrush(*(wxTheBrushList->FindOrCreateBrush(attr->GetBackgroundColour(), wxBRUSHSTYLE_SOLID))); + + dc->SetPen( *wxTRANSPARENT_PEN ); + +@@ -2325,7 +2325,7 @@ + ( + wxSYS_COLOUR_HIGHLIGHT + ), +- wxSOLID ++ wxBRUSHSTYLE_SOLID + )); + + m_highlightUnfocusedBrush = *(wxTheBrushList->FindOrCreateBrush( +@@ -2333,7 +2333,7 @@ + ( + wxSYS_COLOUR_BTNSHADOW + ), +- wxSOLID ++ wxBRUSHSTYLE_SOLID + )); + + SetScrollbars( 0, 0, 0, 0, 0, 0 ); +@@ -2734,7 +2734,7 @@ + + // Ensure an uniform background color, as to avoid differences between + // the automatically cleared parts and the rest of the canvas. +- dc.SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxSOLID))); ++ dc.SetBackground(*(wxTheBrushList->FindOrCreateBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOX), wxBRUSHSTYLE_SOLID))); + + // We need to clear the DC manually, since we intercept BG-erase events. + // Clearing must be done first thing because caching of the double-buffering causes artifacts otherwise. +@@ -2805,7 +2805,7 @@ + + if ( HasFlag(wxLC_HRULES) ) + { +- wxPen pen = *(wxThePenList->FindOrCreatePen(GetRuleColour(), 1, wxSOLID)); ++ wxPen pen = *(wxThePenList->FindOrCreatePen(GetRuleColour(), 1, wxPENSTYLE_SOLID)); + wxSize clientSize = GetClientSize(); + + size_t i = visibleFrom; +@@ -2831,7 +2831,7 @@ + // Draw vertical rules if required + if ( HasFlag(wxLC_VRULES) && !IsEmpty() ) + { +- wxPen pen = *(wxThePenList->FindOrCreatePen(GetRuleColour(), 1, wxSOLID)); ++ wxPen pen = *(wxThePenList->FindOrCreatePen(GetRuleColour(), 1, wxPENSTYLE_SOLID)); + wxRect firstItemRect, lastItemRect; + + GetItemRect(visibleFrom, firstItemRect); +@@ -4859,12 +4859,15 @@ + + void wxListMainWindow::OnScroll(wxScrollWinEvent& event) + { ++ // wxScrolledWindows::OnScroll is deprecated in wx 3.0.0 and it does not exist anymore in 3.1.0. ++ // Please also notice that call to ++ // - wxScrolledWindow::OnScroll ++ // - HandleOnScroll ++ // have been removed in code present in ++ // src/generic/listctrl.cpp, wxListMainWindow::OnScroll ++ // of wxWidgets 3.0 + // FIXME +-#if ( defined(__WXGTK__) || defined(__WXMAC__) ) && !defined(__WXUNIVERSAL__) +- wxScrolledWindow::OnScroll(event); +-#else + HandleOnScroll( event ); +-#endif + + // update our idea of which lines are shown when we redraw the window the + // next time +--- a/src/extern/wxWidgets/listctrl.h ++++ b/src/extern/wxWidgets/listctrl.h +@@ -16,7 +16,6 @@ + #include + + #define wxLC_OWNERDRAW 0x10000 +-#define WXWIN_COMPATIBILITY_2_8 1 + + #include + +--- a/src/muuli_wdr.cpp ++++ b/src/muuli_wdr.cpp +@@ -77,7 +77,7 @@ + + CMuleTextCtrl *item4 = new CMuleTextCtrl( parent, -1, wxT(""), wxDefaultPosition, wxSize(-1,20), wxTE_MULTILINE ); + item4->SetName( wxT("FastEd2kLinks") ); +- item2->Add( item4, 1, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 0 ); ++ item2->Add( item4, 1, wxALL|wxEXPAND, 5 ); + + wxButton *item5 = new wxButton( parent, ID_BUTTON_FAST, _("Commit"), wxDefaultPosition, wxDefaultSize, 0 ); + item5->SetToolTip( _("Click here to add the eD2k link in the text control to your download queue.") ); +@@ -474,7 +474,7 @@ + item0->Add( item1, 0, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); + + CSourceListCtrl *item6 = new CSourceListCtrl( parent, ID_CLIENTLIST, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER ); +- item0->Add( item6, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); ++ item0->Add( item6, 1, wxGROW, 5 ); + + if (set_sizer) + { +@@ -1048,7 +1048,7 @@ + wxWindow *item3 = new COScopeCtrl(3,1,GRAPH_DOWN,parent); + item3->SetName(wxT("dloadScope")); + wxASSERT( item3 ); +- item1->Add( item3, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); ++ item1->Add( item3, 1, wxGROW|wxALL, 5 ); + + wxFlexGridSizer *item4 = new wxFlexGridSizer( 2, 0, 0 ); + item4->AddGrowableCol( 0 ); +@@ -1089,7 +1089,7 @@ + + item1->Add( item4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + +- item0->Add( item1, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); ++ item0->Add( item1, 1, wxGROW|wxBOTTOM, 5 ); + + wxStaticBox *item15 = new wxStaticBox( parent, -1, _("Upload-Speed") ); + wxStaticBoxSizer *item14 = new wxStaticBoxSizer( item15, wxVERTICAL ); +@@ -1097,7 +1097,7 @@ + wxWindow *item16 = new COScopeCtrl(3,1,GRAPH_UP,parent); + item16->SetName(wxT("uloadScope")); + wxASSERT( item16 ); +- item14->Add( item16, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); ++ item14->Add( item16, 1, wxGROW|wxALL, 5 ); + + wxFlexGridSizer *item17 = new wxFlexGridSizer( 2, 0, 0 ); + item17->AddGrowableCol( 0 ); +@@ -1138,7 +1138,7 @@ + + item14->Add( item17, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + +- item0->Add( item14, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); ++ item0->Add( item14, 1, wxGROW|wxBOTTOM, 5 ); + + wxStaticBox *item28 = new wxStaticBox( parent, -1, _("Connections") ); + wxStaticBoxSizer *item27 = new wxStaticBoxSizer( item28, wxVERTICAL ); +@@ -1146,7 +1146,7 @@ + wxWindow *item29 = new COScopeCtrl(3,0,GRAPH_CONN,parent); + item29->SetName(wxT("otherScope")); + wxASSERT( item29 ); +- item27->Add( item29, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); ++ item27->Add( item29, 1, wxGROW|wxALL, 5 ); + + wxFlexGridSizer *item30 = new wxFlexGridSizer( 2, 0, 0 ); + item30->AddGrowableCol( 0 ); +@@ -1187,16 +1187,15 @@ + + item27->Add( item30, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxTOP, 5 ); + +- item0->Add( item27, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); ++ item0->Add( item27, 1, wxGROW|wxALL, 5 ); + + wxStaticBox *item41 = new wxStaticBox( parent, -1, _("Statistics Tree") ); + wxStaticBoxSizer *item40 = new wxStaticBoxSizer( item41, wxVERTICAL ); + + wxTreeCtrl *item42 = new wxTreeCtrl( parent, -1, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS|wxSUNKEN_BORDER ); + item42->SetName( wxT("statTree") ); +- item40->Add( item42, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); +- +- item0->Add( item40, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 ); ++ item40->Add( item42, 1, wxGROW|wxALL, 5 ); ++ item0->Add( item40, 1, wxGROW|wxALL, 5 ); + + if (set_sizer) + { +@@ -2030,7 +2029,7 @@ + + wxStaticText *item2 = new wxStaticText( parent, -1, _("!!! WARNING !!!"), wxDefaultPosition, wxDefaultSize, 0 ); + item2->SetForegroundColour( *wxRED ); +- item2->SetFont( wxFont( 24, wxROMAN, wxNORMAL, wxNORMAL ) ); ++ item2->SetFont( wxFont( 24, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ) ); + item1->Add( item2, 0, wxALIGN_CENTER, 5 ); + + wxStaticText *item3 = new wxStaticText( parent, IDC_AMULE_TWEAKS_WARNING, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); +--- a/src/utils/wxCas/src/wxcasframe.cpp ++++ b/src/utils/wxCas/src/wxcasframe.cpp +@@ -280,11 +280,11 @@ + #ifdef __WINDOWS__ + + memdc. +- SetFont ( wxFont ( 6, wxSWISS, wxNORMAL, wxBOLD ) ); ++ SetFont ( wxFont ( 6, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD ) ); + #else + + memdc. +- SetFont ( wxFont ( 8, wxSWISS, wxNORMAL, wxBOLD ) ); ++ SetFont ( wxFont ( 8, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD ) ); + #endif + + memdc. +--- a/src/amuleDlg.cpp ++++ b/src/amuleDlg.cpp +@@ -763,7 +763,7 @@ + if ( (true == skinChanged) || (currentState != s_oldState) ) { + wxWindowUpdateLocker freezer(m_wndToolbar); + +- wxToolBarToolBase* toolbarTool = m_wndToolbar->RemoveTool(ID_BUTTONCONNECT); ++ wxToolBarToolBase* toolbarTool = m_wndToolbar->FindById(ID_BUTTONCONNECT); + + switch (currentState) { + case ECS_Connecting: +@@ -784,8 +784,6 @@ + toolbarTool->SetNormalBitmap(m_tblist.GetBitmap(0)); + } + +- m_wndToolbar->InsertTool(0, toolbarTool); +- m_wndToolbar->Realize(); + m_wndToolbar->EnableTool(ID_BUTTONCONNECT, (thePrefs::GetNetworkED2K() || thePrefs::GetNetworkKademlia()) && theApp->ipfilter->IsReady()); + + s_oldState = currentState; +@@ -1416,7 +1414,7 @@ + wxWindowUpdateLocker freezer(this); + #endif + +- wxToolBarToolBase* toolbarTool = m_wndToolbar->RemoveTool(ID_BUTTONNETWORKS); ++ wxToolBarToolBase* toolbarTool = m_wndToolbar->FindById(ID_BUTTONNETWORKS); + + // set the log windows + wxNotebook* logs_notebook = CastChild( ID_SRVLOG_NOTEBOOK, wxNotebook); +@@ -1507,12 +1505,9 @@ + + // Tool bar + +- m_wndToolbar->InsertTool(2, toolbarTool); + m_wndToolbar->EnableTool(ID_BUTTONNETWORKS, (thePrefs::GetNetworkED2K() || thePrefs::GetNetworkKademlia())); + m_wndToolbar->EnableTool(ID_BUTTONCONNECT, (thePrefs::GetNetworkED2K() || thePrefs::GetNetworkKademlia()) && theApp->ipfilter->IsReady()); + +- m_wndToolbar->Realize(); +- + ShowConnectionState(); // status in the bottom right + m_searchwnd->FixSearchTypes(); + } +--- a/src/amule-gui.cpp ++++ b/src/amule-gui.cpp +@@ -28,6 +28,7 @@ + #include + + #include // Needed for wxClipBoard ++#include + #include // Needed for wxStringTokenizer + + #include "SharedFilesWnd.h" // Needed for CSharedFilesWnd +@@ -98,6 +99,11 @@ + + CamuleGuiBase::CamuleGuiBase() + { ++ // Disable these checks for now. The code really needs updating to ++ // eliminate these inconsistent flag uses, but these checks are new ++ // since wx3.0, and this should just return us to what 3.0 did. ++ wxSizerFlags::DisableConsistencyChecks(); ++ + amuledlg = NULL; + } + diff --git a/app-web/amule/autobuild/postinst b/app-web/amule/autobuild/postinst new file mode 100644 index 00000000000..1813a535ab6 --- /dev/null +++ b/app-web/amule/autobuild/postinst @@ -0,0 +1,2 @@ +systemd-sysusers amule.conf +systemd-tmpfiles --create amule.conf diff --git a/app-web/amule/autobuild/usergroup b/app-web/amule/autobuild/usergroup deleted file mode 100644 index 54187393da9..00000000000 --- a/app-web/amule/autobuild/usergroup +++ /dev/null @@ -1,2 +0,0 @@ -group amule 299 -user amule 299 amule /var/lib/amule "aMule daemon owner" /bin/false diff --git a/app-web/amule/spec b/app-web/amule/spec index 718ce2c74ca..ef23d6122ab 100644 --- a/app-web/amule/spec +++ b/app-web/amule/spec @@ -1,5 +1,5 @@ VER=2.3.3 -REL=1 +REL=2 SRCS="tbl::https://sourceforge.net/projects/amule/files/aMule/$VER/aMule-$VER.tar.xz" CHKSUMS="sha256::a647309642331f3e033fdf0196e7232cdc67f46739d12a0294be06885f70c8bd" CHKUPDATE="anitya::id=8426" diff --git a/lang-lua/wxlua/autobuild/defines b/lang-lua/wxlua/autobuild/defines index 5374dcf2045..b35e66335ac 100644 --- a/lang-lua/wxlua/autobuild/defines +++ b/lang-lua/wxlua/autobuild/defines @@ -1,13 +1,14 @@ PKGNAME=wxlua PKGSEC=libs -PKGDEP="desktop-file-utils lua webkit2gtk wxgtk2" +PKGDEP="desktop-file-utils lua webkit2gtk wxgtk3" PKGDES="A set of bindings to the wxWidgets library for Lua" +ABTYPE=cmakeninja CMAKE_AFTER="-DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config \ -DwxLua_LUA_INCLUDE_DIR=/usr/include/lua5.1 \ -DwxLua_LUA_LIBRARY=/usr/lib/liblua.so.5.1 \ -DwxLua_LUA_LIBRARY_USE_BUILTIN=0 \ -DwxLua_LUA_LIBRARY_VERSION=5.1 \ -DBUILD_SHARED_LIBS=TRUE" -ABSHADOW=0 + PKGEPOCH=1 diff --git a/lang-lua/wxlua/spec b/lang-lua/wxlua/spec index b4e57d8e825..1f0f1e3f03f 100644 --- a/lang-lua/wxlua/spec +++ b/lang-lua/wxlua/spec @@ -1,5 +1,5 @@ -VER=3.0.0.9 -SRCS="https://github.com/pkulchenko/wxlua/archive/refs/tags/v$VER.tar.gz" -CHKSUMS="sha256::28c54297824d6691273a6470f0330a5c6dd6c977e30fb533aaf3350d995ec994" -SUBDIR="wxlua-$VER/wxLua" +VER=3.2.0.2 +SRCS="git::commit=tags/v$VER::https://github.com/pkulchenko/wxlua" +CHKSUMS="SKIP" +SUBDIR="wxlua/wxLua" CHKUPDATE="anitya::id=230561" diff --git a/lang-python/wxpython-phoenix/autobuild/build b/lang-python/wxpython-phoenix/autobuild/build deleted file mode 100644 index 456caf4021f..00000000000 --- a/lang-python/wxpython-phoenix/autobuild/build +++ /dev/null @@ -1,8 +0,0 @@ -abinfo "Building wxPython Phoenix ..." -python3 ./build.py build_py --verbose --no_magic --use_syswx --gtk3 --release --prefix=/usr - -abinfo "Installing wxPython Phoenix ..." -python3 ./build.py install_py --verbose --no_magic --use_syswx --gtk3 --release --prefix=/usr --destdir="$PKGDIR" - -abinfo "Removing conflicting files with original wxPython ..." -rm -v "$PKGDIR"/usr/bin/{helpviewer,img2png,img2py,img2xpm,pycrust,pyshell,pywxrc} diff --git a/lang-python/wxpython-phoenix/autobuild/defines b/lang-python/wxpython-phoenix/autobuild/defines index 3991c50d820..0d26b0c72d6 100644 --- a/lang-python/wxpython-phoenix/autobuild/defines +++ b/lang-python/wxpython-phoenix/autobuild/defines @@ -1,5 +1,8 @@ PKGNAME=wxpython-phoenix -PKGDES="New generation of wxPython, wrapper for wxWidgets library" PKGSEC=python -PKGDEP="python-3 wxgtk3 pillow six numpy" -NOPYTHON2=1 +PKGDES="Python wrapper for wxWidgets (transitional package for wxpython)" +PKGDEP="wxpython" + +ABTYPE=dummy +ABHOST=noarch +PKGEPOCH=1 diff --git a/lang-python/wxpython-phoenix/spec b/lang-python/wxpython-phoenix/spec index 902e892c9d5..16b35030be7 100644 --- a/lang-python/wxpython-phoenix/spec +++ b/lang-python/wxpython-phoenix/spec @@ -1,4 +1,2 @@ -VER=4.0.7+post2 -SRCS="tbl::https://files.pythonhosted.org/packages/b9/8b/31267dd6d026a082faed35ec8d97522c0236f2e083bf15aff64d982215e1/wxPython-4.0.7.post2.tar.gz" -CHKSUMS="sha256::5a229e695b64f9864d30a5315e0c1e4ff5e02effede0a07f16e8d856737a0c4e" -CHKUPDATE="anitya::id=16928" +VER=0 +DUMMYSRC=1 diff --git a/lang-python/wxpython/autobuild/build b/lang-python/wxpython/autobuild/build index c1541c61e98..6465e3a7cc6 100644 --- a/lang-python/wxpython/autobuild/build +++ b/lang-python/wxpython/autobuild/build @@ -1,8 +1,18 @@ -./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \ - --enable-graphics_ctx --enable-mediactrl --disable-precomp-headers \ - --with-regex=sys --with-libpng=sys --with-libxpm=sys --with-libjpeg=sys \ - --with-libtiff=sys --enable-sdl --enable-libmspack +abinfo "Building wxPython Phoenix ..." +python3 "$SRCDIR"/build.py build_py \ + --verbose \ + --no_magic \ + --use_syswx \ + --gtk3 \ + --release \ + --prefix=/usr -cd wxPython -python2 setup.py WXPORT=gtk2 UNICODE=1 build -python2 setup.py WXPORT=gtk2 UNICODE=1 install --root="$PKGDIR" +abinfo "Installing wxPython Phoenix ..." +python3 "$SRCDIR"/build.py install_py \ + --verbose \ + --no_magic \ + --use_syswx \ + --gtk3 \ + --release \ + --prefix=/usr \ + --destdir="$PKGDIR" diff --git a/lang-python/wxpython/autobuild/defines b/lang-python/wxpython/autobuild/defines index 2aa9ebad8c2..ee1e8ad56a9 100644 --- a/lang-python/wxpython/autobuild/defines +++ b/lang-python/wxpython/autobuild/defines @@ -1,4 +1,9 @@ PKGNAME=wxpython +PKGDES="New generation of wxPython, wrapper for wxWidgets library" PKGSEC=python -PKGDEP="wxgtk2 python-2 gst-plugins-base-0-10" -PKGDES="A wxWidgets GUI toolkit for Python" +PKGDEP="python-3 wxgtk3 pillow six numpy" + +ABTYPE=self + +PKGBREAK="wxpython-phoenix<=4.0.7+post2" +PKGREP="wxpython-phoenix<=4.0.7+post2" diff --git a/lang-python/wxpython/autobuild/patches/0001-fix-cython-3-compatibility.patch b/lang-python/wxpython/autobuild/patches/0001-fix-cython-3-compatibility.patch new file mode 100644 index 00000000000..c31d7f1fd72 --- /dev/null +++ b/lang-python/wxpython/autobuild/patches/0001-fix-cython-3-compatibility.patch @@ -0,0 +1,5856 @@ +From aeb557d01e7cd37176ebbf0f1ae6d0b53c115378 Mon Sep 17 00:00:00 2001 +From: Scott Talbert +Date: Tue, 25 Jul 2023 12:42:32 -0400 +Subject: [PATCH] Fix compatibility with Cython 3.0.0 + +Remove unused import which seems to be removed in Cython 3. +--- + wx/svg/_nanosvg.c | 1564 +++++++++++++++++++++---------------------- + wx/svg/_nanosvg.pyx | 1 - + 2 files changed, 782 insertions(+), 783 deletions(-) + +diff --git a/wx/svg/_nanosvg.c b/wx/svg/_nanosvg.c +index b91bfd0e4..34afc1e0d 100644 +--- a/wx/svg/_nanosvg.c ++++ b/wx/svg/_nanosvg.c +@@ -1002,7 +1002,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":55 ++/* "wx/svg/_nanosvg.pyx":54 + * # Replicate the C enums and values for Python, dropping the leading 'N' + * + * cpdef enum SVGpaintType: # <<<<<<<<<<<<<< +@@ -1011,7 +1011,7 @@ struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr; + */ + enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType { + +- /* "wx/svg/_nanosvg.pyx":59 ++ /* "wx/svg/_nanosvg.pyx":58 + * SVG_PAINT_COLOR = NSVG_PAINT_COLOR + * SVG_PAINT_LINEAR_GRADIENT = NSVG_PAINT_LINEAR_GRADIENT + * SVG_PAINT_RADIAL_GRADIENT = NSVG_PAINT_RADIAL_GRADIENT # <<<<<<<<<<<<<< +@@ -1024,7 +1024,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":61 ++/* "wx/svg/_nanosvg.pyx":60 + * SVG_PAINT_RADIAL_GRADIENT = NSVG_PAINT_RADIAL_GRADIENT + * + * cpdef enum SVGspreadType: # <<<<<<<<<<<<<< +@@ -1033,7 +1033,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGpaintType { + */ + enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType { + +- /* "wx/svg/_nanosvg.pyx":64 ++ /* "wx/svg/_nanosvg.pyx":63 + * SVG_SPREAD_PAD = NSVG_SPREAD_PAD + * SVG_SPREAD_REFLECT = NSVG_SPREAD_REFLECT + * SVG_SPREAD_REPEAT = NSVG_SPREAD_REPEAT # <<<<<<<<<<<<<< +@@ -1045,7 +1045,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":66 ++/* "wx/svg/_nanosvg.pyx":65 + * SVG_SPREAD_REPEAT = NSVG_SPREAD_REPEAT + * + * cpdef enum SVGlineJoin: # <<<<<<<<<<<<<< +@@ -1054,7 +1054,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGspreadType { + */ + enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin { + +- /* "wx/svg/_nanosvg.pyx":69 ++ /* "wx/svg/_nanosvg.pyx":68 + * SVG_JOIN_MITER = NSVG_JOIN_MITER + * SVG_JOIN_ROUND = NSVG_JOIN_ROUND + * SVG_JOIN_BEVEL = NSVG_JOIN_BEVEL # <<<<<<<<<<<<<< +@@ -1066,7 +1066,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":71 ++/* "wx/svg/_nanosvg.pyx":70 + * SVG_JOIN_BEVEL = NSVG_JOIN_BEVEL + * + * cpdef enum SVGlineCap: # <<<<<<<<<<<<<< +@@ -1075,7 +1075,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineJoin { + */ + enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap { + +- /* "wx/svg/_nanosvg.pyx":74 ++ /* "wx/svg/_nanosvg.pyx":73 + * SVG_CAP_BUTT = NSVG_CAP_BUTT + * SVG_CAP_ROUND = NSVG_CAP_ROUND + * SVG_CAP_SQUARE = NSVG_CAP_SQUARE # <<<<<<<<<<<<<< +@@ -1087,7 +1087,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":76 ++/* "wx/svg/_nanosvg.pyx":75 + * SVG_CAP_SQUARE = NSVG_CAP_SQUARE + * + * cpdef enum SVGfillRule: # <<<<<<<<<<<<<< +@@ -1096,7 +1096,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGlineCap { + */ + enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule { + +- /* "wx/svg/_nanosvg.pyx":78 ++ /* "wx/svg/_nanosvg.pyx":77 + * cpdef enum SVGfillRule: + * SVG_FILLRULE_NONZERO = NSVG_FILLRULE_NONZERO + * SVG_FILLRULE_EVENODD = NSVG_FILLRULE_EVENODD # <<<<<<<<<<<<<< +@@ -1107,7 +1107,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":80 ++/* "wx/svg/_nanosvg.pyx":79 + * SVG_FILLRULE_EVENODD = NSVG_FILLRULE_EVENODD + * + * cpdef enum SVGflags: # <<<<<<<<<<<<<< +@@ -1116,7 +1116,7 @@ enum __pyx_t_2wx_3svg_8_nanosvg_SVGfillRule { + */ + enum __pyx_t_2wx_3svg_8_nanosvg_SVGflags { + +- /* "wx/svg/_nanosvg.pyx":81 ++ /* "wx/svg/_nanosvg.pyx":80 + * + * cpdef enum SVGflags: + * SVG_FLAGS_VISIBLE = NSVG_FLAGS_VISIBLE # <<<<<<<<<<<<<< +@@ -1126,7 +1126,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":115 ++/* "wx/svg/_nanosvg.pyx":114 + * raise ValueError("SVG not yet loaded") + * + * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): # <<<<<<<<<<<<<< +@@ -1138,7 +1138,7 @@ struct __pyx_opt_args_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr { + PyObject *errmsg; + }; + +-/* "wx/svg/_nanosvg.pyx":87 ++/* "wx/svg/_nanosvg.pyx":86 + * # Cython classes for wrapping the nanosvg structs + * + * cdef class SVGimageBase: # <<<<<<<<<<<<<< +@@ -1153,7 +1153,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase { + }; + + +-/* "wx/svg/_nanosvg.pyx":297 ++/* "wx/svg/_nanosvg.pyx":296 + * #---------------------------------------------------------------------------- + * + * cdef class SVGshape: # <<<<<<<<<<<<<< +@@ -1167,7 +1167,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape { + }; + + +-/* "wx/svg/_nanosvg.pyx":436 ++/* "wx/svg/_nanosvg.pyx":435 + * + * #---------------------------------------------------------------------------- + * cdef class SVGpath: # <<<<<<<<<<<<<< +@@ -1181,7 +1181,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath { + }; + + +-/* "wx/svg/_nanosvg.pyx":522 ++/* "wx/svg/_nanosvg.pyx":521 + * + * #---------------------------------------------------------------------------- + * cdef class SVGpaint: # <<<<<<<<<<<<<< +@@ -1195,7 +1195,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint { + }; + + +-/* "wx/svg/_nanosvg.pyx":574 ++/* "wx/svg/_nanosvg.pyx":573 + * + * #---------------------------------------------------------------------------- + * cdef class SVGgradient: # <<<<<<<<<<<<<< +@@ -1209,7 +1209,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient { + }; + + +-/* "wx/svg/_nanosvg.pyx":626 ++/* "wx/svg/_nanosvg.pyx":625 + * + * #---------------------------------------------------------------------------- + * cdef class SVGgradientStop: # <<<<<<<<<<<<<< +@@ -1223,7 +1223,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop { + }; + + +-/* "wx/svg/_nanosvg.pyx":284 ++/* "wx/svg/_nanosvg.pyx":283 + * + * @property + * def shapes(self): # <<<<<<<<<<<<<< +@@ -1237,7 +1237,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct____get__ { + }; + + +-/* "wx/svg/_nanosvg.pyx":424 ++/* "wx/svg/_nanosvg.pyx":423 + * + * @property + * def paths(self): # <<<<<<<<<<<<<< +@@ -1251,7 +1251,7 @@ struct __pyx_obj_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__ { + }; + + +-/* "wx/svg/_nanosvg.pyx":616 ++/* "wx/svg/_nanosvg.pyx":615 + * + * @property + * def stops(self): # <<<<<<<<<<<<<< +@@ -1281,7 +1281,7 @@ struct __pyx_obj___Pyx_EnumMeta { + + + +-/* "wx/svg/_nanosvg.pyx":87 ++/* "wx/svg/_nanosvg.pyx":86 + * # Cython classes for wrapping the nanosvg structs + * + * cdef class SVGimageBase: # <<<<<<<<<<<<<< +@@ -1297,7 +1297,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":297 ++/* "wx/svg/_nanosvg.pyx":296 + * #---------------------------------------------------------------------------- + * + * cdef class SVGshape: # <<<<<<<<<<<<<< +@@ -1311,7 +1311,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":436 ++/* "wx/svg/_nanosvg.pyx":435 + * + * #---------------------------------------------------------------------------- + * cdef class SVGpath: # <<<<<<<<<<<<<< +@@ -1325,7 +1325,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":522 ++/* "wx/svg/_nanosvg.pyx":521 + * + * #---------------------------------------------------------------------------- + * cdef class SVGpaint: # <<<<<<<<<<<<<< +@@ -1339,7 +1339,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":574 ++/* "wx/svg/_nanosvg.pyx":573 + * + * #---------------------------------------------------------------------------- + * cdef class SVGgradient: # <<<<<<<<<<<<<< +@@ -1353,7 +1353,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":626 ++/* "wx/svg/_nanosvg.pyx":625 + * + * #---------------------------------------------------------------------------- + * cdef class SVGgradientStop: # <<<<<<<<<<<<<< +@@ -2524,7 +2524,7 @@ static PyObject *__pyx_codeobj__31; + static PyObject *__pyx_codeobj__33; + /* Late includes */ + +-/* "wx/svg/_nanosvg.pyx":101 ++/* "wx/svg/_nanosvg.pyx":100 + * cdef NSVGrasterizer *_rasterizer + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -2553,7 +2553,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase___cinit__(struct __pyx_obj + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + +- /* "wx/svg/_nanosvg.pyx":102 ++ /* "wx/svg/_nanosvg.pyx":101 + * + * def __cinit__(self): + * self._ptr = NULL # <<<<<<<<<<<<<< +@@ -2562,7 +2562,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase___cinit__(struct __pyx_obj + */ + __pyx_v_self->_ptr = NULL; + +- /* "wx/svg/_nanosvg.pyx":103 ++ /* "wx/svg/_nanosvg.pyx":102 + * def __cinit__(self): + * self._ptr = NULL + * self._rasterizer = NULL # <<<<<<<<<<<<<< +@@ -2571,7 +2571,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase___cinit__(struct __pyx_obj + */ + __pyx_v_self->_rasterizer = NULL; + +- /* "wx/svg/_nanosvg.pyx":101 ++ /* "wx/svg/_nanosvg.pyx":100 + * cdef NSVGrasterizer *_rasterizer + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -2585,7 +2585,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase___cinit__(struct __pyx_obj + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":105 ++/* "wx/svg/_nanosvg.pyx":104 + * self._rasterizer = NULL + * + * def __dealloc__(self): # <<<<<<<<<<<<<< +@@ -2609,7 +2609,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":106 ++ /* "wx/svg/_nanosvg.pyx":105 + * + * def __dealloc__(self): + * if self._ptr != NULL: # <<<<<<<<<<<<<< +@@ -2619,7 +2619,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":107 ++ /* "wx/svg/_nanosvg.pyx":106 + * def __dealloc__(self): + * if self._ptr != NULL: + * nsvgDelete(self._ptr) # <<<<<<<<<<<<<< +@@ -2628,7 +2628,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx + */ + nsvgDelete(__pyx_v_self->_ptr); + +- /* "wx/svg/_nanosvg.pyx":106 ++ /* "wx/svg/_nanosvg.pyx":105 + * + * def __dealloc__(self): + * if self._ptr != NULL: # <<<<<<<<<<<<<< +@@ -2637,7 +2637,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx + */ + } + +- /* "wx/svg/_nanosvg.pyx":108 ++ /* "wx/svg/_nanosvg.pyx":107 + * if self._ptr != NULL: + * nsvgDelete(self._ptr) + * if self._rasterizer != NULL: # <<<<<<<<<<<<<< +@@ -2647,7 +2647,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":109 ++ /* "wx/svg/_nanosvg.pyx":108 + * nsvgDelete(self._ptr) + * if self._rasterizer != NULL: + * nsvgDeleteRasterizer(self._rasterizer) # <<<<<<<<<<<<<< +@@ -2656,7 +2656,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx + */ + nsvgDeleteRasterizer(__pyx_v_self->_rasterizer); + +- /* "wx/svg/_nanosvg.pyx":108 ++ /* "wx/svg/_nanosvg.pyx":107 + * if self._ptr != NULL: + * nsvgDelete(self._ptr) + * if self._rasterizer != NULL: # <<<<<<<<<<<<<< +@@ -2665,7 +2665,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx + */ + } + +- /* "wx/svg/_nanosvg.pyx":105 ++ /* "wx/svg/_nanosvg.pyx":104 + * self._rasterizer = NULL + * + * def __dealloc__(self): # <<<<<<<<<<<<<< +@@ -2677,7 +2677,7 @@ static void __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_2__dealloc__(struct __pyx + __Pyx_RefNannyFinishContext(); + } + +-/* "wx/svg/_nanosvg.pyx":111 ++/* "wx/svg/_nanosvg.pyx":110 + * nsvgDeleteRasterizer(self._rasterizer) + * + * cdef _check_ptr(self): # <<<<<<<<<<<<<< +@@ -2695,7 +2695,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__check_ptr(struct __p + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_check_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":112 ++ /* "wx/svg/_nanosvg.pyx":111 + * + * cdef _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -2705,20 +2705,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":113 ++ /* "wx/svg/_nanosvg.pyx":112 + * 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, 113, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __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, 113, __pyx_L1_error) ++ __PYX_ERR(0, 112, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":112 ++ /* "wx/svg/_nanosvg.pyx":111 + * + * cdef _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -2727,7 +2727,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__check_ptr(struct __p + */ + } + +- /* "wx/svg/_nanosvg.pyx":111 ++ /* "wx/svg/_nanosvg.pyx":110 + * nsvgDeleteRasterizer(self._rasterizer) + * + * cdef _check_ptr(self): # <<<<<<<<<<<<<< +@@ -2748,7 +2748,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__check_ptr(struct __p + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":115 ++/* "wx/svg/_nanosvg.pyx":114 + * raise ValueError("SVG not yet loaded") + * + * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): # <<<<<<<<<<<<<< +@@ -2772,7 +2772,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx + } + } + +- /* "wx/svg/_nanosvg.pyx":116 ++ /* "wx/svg/_nanosvg.pyx":115 + * + * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): + * if self._ptr != NULL: # <<<<<<<<<<<<<< +@@ -2782,7 +2782,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":117 ++ /* "wx/svg/_nanosvg.pyx":116 + * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): + * if self._ptr != NULL: + * nsvgDelete(self._ptr) # <<<<<<<<<<<<<< +@@ -2791,7 +2791,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx + */ + nsvgDelete(__pyx_v_self->_ptr); + +- /* "wx/svg/_nanosvg.pyx":116 ++ /* "wx/svg/_nanosvg.pyx":115 + * + * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): + * if self._ptr != NULL: # <<<<<<<<<<<<<< +@@ -2800,7 +2800,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx + */ + } + +- /* "wx/svg/_nanosvg.pyx":118 ++ /* "wx/svg/_nanosvg.pyx":117 + * if self._ptr != NULL: + * nsvgDelete(self._ptr) + * if self._rasterizer != NULL: # <<<<<<<<<<<<<< +@@ -2810,7 +2810,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":119 ++ /* "wx/svg/_nanosvg.pyx":118 + * nsvgDelete(self._ptr) + * if self._rasterizer != NULL: + * nsvgDeleteRasterizer(self._rasterizer) # <<<<<<<<<<<<<< +@@ -2819,7 +2819,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx + */ + nsvgDeleteRasterizer(__pyx_v_self->_rasterizer); + +- /* "wx/svg/_nanosvg.pyx":120 ++ /* "wx/svg/_nanosvg.pyx":119 + * if self._rasterizer != NULL: + * nsvgDeleteRasterizer(self._rasterizer) + * self._rasterizer = NULL # <<<<<<<<<<<<<< +@@ -2828,7 +2828,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx + */ + __pyx_v_self->_rasterizer = NULL; + +- /* "wx/svg/_nanosvg.pyx":118 ++ /* "wx/svg/_nanosvg.pyx":117 + * if self._ptr != NULL: + * nsvgDelete(self._ptr) + * if self._rasterizer != NULL: # <<<<<<<<<<<<<< +@@ -2837,7 +2837,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx + */ + } + +- /* "wx/svg/_nanosvg.pyx":121 ++ /* "wx/svg/_nanosvg.pyx":120 + * nsvgDeleteRasterizer(self._rasterizer) + * self._rasterizer = NULL + * if ptr == NULL: # <<<<<<<<<<<<<< +@@ -2847,20 +2847,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":122 ++ /* "wx/svg/_nanosvg.pyx":121 + * 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, 122, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_v_errmsg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __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, 122, __pyx_L1_error) ++ __PYX_ERR(0, 121, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":121 ++ /* "wx/svg/_nanosvg.pyx":120 + * nsvgDeleteRasterizer(self._rasterizer) + * self._rasterizer = NULL + * if ptr == NULL: # <<<<<<<<<<<<<< +@@ -2869,7 +2869,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx + */ + } + +- /* "wx/svg/_nanosvg.pyx":123 ++ /* "wx/svg/_nanosvg.pyx":122 + * if ptr == NULL: + * raise ValueError(errmsg) + * self._ptr = ptr # <<<<<<<<<<<<<< +@@ -2878,7 +2878,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":115 ++ /* "wx/svg/_nanosvg.pyx":114 + * raise ValueError("SVG not yet loaded") + * + * cdef _set_ptr(self, NSVGimage *ptr, str errmsg='Unable to parse SVG'): # <<<<<<<<<<<<<< +@@ -2899,7 +2899,7 @@ static PyObject *__pyx_f_2wx_3svg_8_nanosvg_12SVGimageBase__set_ptr(struct __pyx + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":127 ++/* "wx/svg/_nanosvg.pyx":126 + * + * @staticmethod + * cdef SVGimageBase from_ptr(NSVGimage *ptr): # <<<<<<<<<<<<<< +@@ -2917,19 +2917,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_f_2wx_3svg_8_nano + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":128 ++ /* "wx/svg/_nanosvg.pyx":127 + * @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, 128, __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, 127, __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":129 ++ /* "wx/svg/_nanosvg.pyx":128 + * cdef SVGimageBase from_ptr(NSVGimage *ptr): + * obj = SVGimageBase() + * obj._ptr = ptr # <<<<<<<<<<<<<< +@@ -2938,7 +2938,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":130 ++ /* "wx/svg/_nanosvg.pyx":129 + * obj = SVGimageBase() + * obj._ptr = ptr + * return obj # <<<<<<<<<<<<<< +@@ -2950,7 +2950,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":127 ++ /* "wx/svg/_nanosvg.pyx":126 + * + * @staticmethod + * cdef SVGimageBase from_ptr(NSVGimage *ptr): # <<<<<<<<<<<<<< +@@ -2970,7 +2970,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGimageBase *__pyx_f_2wx_3svg_8_nano + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":134 ++/* "wx/svg/_nanosvg.pyx":133 + * + * @classmethod + * def CreateFromFile(cls, str filename, str units='px', float dpi=96): # <<<<<<<<<<<<<< +@@ -3027,7 +3027,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, 134, __pyx_L3_error) ++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "CreateFromFile") < 0)) __PYX_ERR(0, 133, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { +@@ -3043,21 +3043,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, 134, __pyx_L3_error) ++ __pyx_v_dpi = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_dpi == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __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, 134, __pyx_L3_error) ++ __Pyx_RaiseArgtupleInvalid("CreateFromFile", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 133, __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, 134, __pyx_L1_error) +- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_units), (&PyString_Type), 1, "units", 1))) __PYX_ERR(0, 134, __pyx_L1_error) ++ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyString_Type), 1, "filename", 1))) __PYX_ERR(0, 133, __pyx_L1_error) ++ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_units), (&PyString_Type), 1, "units", 1))) __PYX_ERR(0, 133, __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 */ +@@ -3086,16 +3086,16 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("CreateFromFile", 0); + +- /* "wx/svg/_nanosvg.pyx":144 ++ /* "wx/svg/_nanosvg.pyx":143 + * :rtype: An instance of ``cls`` (usually a :class:`SVGimage`) + * """ + * name = filename.encode(sys.getfilesystemencoding()) # <<<<<<<<<<<<<< + * units_b = units.encode('utf-8') + * cdef SVGimageBase img = cls() + */ +- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error) ++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __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, 144, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getfilesystemencoding); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; +@@ -3110,58 +3110,58 @@ 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, 144, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __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, 144, __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, 143, __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":145 ++ /* "wx/svg/_nanosvg.pyx":144 + * """ + * 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_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, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_units_b = __pyx_t_3; + __pyx_t_3 = 0; + +- /* "wx/svg/_nanosvg.pyx":146 ++ /* "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), + * '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, 146, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __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, 146, __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, 145, __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":147 ++ /* "wx/svg/_nanosvg.pyx":146 + * units_b = units.encode('utf-8') + * cdef SVGimageBase img = cls() + * 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, 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) ++ __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L1_error) ++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_units_b); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":148 ++ /* "wx/svg/_nanosvg.pyx":147 + * cdef SVGimageBase img = cls() + * img._set_ptr(nsvgParseFromFile(name, units_b, dpi), + * 'Unable to parse SVG file {}'.format(filename)) # <<<<<<<<<<<<<< + * return img + * + */ +- __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_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, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { +@@ -3175,12 +3175,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy + } + __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) ++ if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; +- if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 148, __pyx_L1_error) ++ if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 147, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":147 ++ /* "wx/svg/_nanosvg.pyx":146 + * units_b = units.encode('utf-8') + * cdef SVGimageBase img = cls() + * img._set_ptr(nsvgParseFromFile(name, units_b, dpi), # <<<<<<<<<<<<<< +@@ -3189,12 +3189,12 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy + */ + __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_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, 146, __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":149 ++ /* "wx/svg/_nanosvg.pyx":148 + * img._set_ptr(nsvgParseFromFile(name, units_b, dpi), + * 'Unable to parse SVG file {}'.format(filename)) + * return img # <<<<<<<<<<<<<< +@@ -3206,7 +3206,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":134 ++ /* "wx/svg/_nanosvg.pyx":133 + * + * @classmethod + * def CreateFromFile(cls, str filename, str units='px', float dpi=96): # <<<<<<<<<<<<<< +@@ -3230,7 +3230,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_4CreateFromFile(PyTy + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":153 ++/* "wx/svg/_nanosvg.pyx":152 + * + * @classmethod + * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96, bint do_copy=True): # <<<<<<<<<<<<<< +@@ -3296,7 +3296,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, 153, __pyx_L3_error) ++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "CreateFromBytes") < 0)) __PYX_ERR(0, 152, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { +@@ -3314,26 +3314,26 @@ 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, 153, __pyx_L3_error) ++ __pyx_v_dpi = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_dpi == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L3_error) + } else { + __pyx_v_dpi = ((float)96.0); + } + if (values[3]) { +- __pyx_v_do_copy = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_do_copy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 153, __pyx_L3_error) ++ __pyx_v_do_copy = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_do_copy == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L3_error) + } else { + __pyx_v_do_copy = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; +- __Pyx_RaiseArgtupleInvalid("CreateFromBytes", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 153, __pyx_L3_error) ++ __Pyx_RaiseArgtupleInvalid("CreateFromBytes", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 152, __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, 153, __pyx_L1_error) +- if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_units), (&PyString_Type), 1, "units", 1))) __PYX_ERR(0, 153, __pyx_L1_error) ++ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_buffer), (&PyBytes_Type), 1, "buffer", 1))) __PYX_ERR(0, 152, __pyx_L1_error) ++ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_units), (&PyString_Type), 1, "units", 1))) __PYX_ERR(0, 152, __pyx_L1_error) + __pyx_r = __pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(((PyTypeObject*)__pyx_v_cls), __pyx_v_buffer, __pyx_v_units, __pyx_v_dpi, __pyx_v_do_copy); + + /* function exit code */ +@@ -3362,7 +3362,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyT + __Pyx_RefNannySetupContext("CreateFromBytes", 0); + __Pyx_INCREF(__pyx_v_buffer); + +- /* "wx/svg/_nanosvg.pyx":169 ++ /* "wx/svg/_nanosvg.pyx":168 + * """ + * + * if do_copy: # <<<<<<<<<<<<<< +@@ -3372,22 +3372,22 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyT + __pyx_t_1 = (__pyx_v_do_copy != 0); + if (__pyx_t_1) { + +- /* "wx/svg/_nanosvg.pyx":178 ++ /* "wx/svg/_nanosvg.pyx":177 + * # get a different byte string we'll copy it via converting to a bytearray + * # and back: + * buffer = bytes(bytearray(buffer)) # <<<<<<<<<<<<<< + * + * units_b = units.encode('utf-8') + */ +- __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_v_buffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_v_buffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_buffer, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + +- /* "wx/svg/_nanosvg.pyx":169 ++ /* "wx/svg/_nanosvg.pyx":168 + * """ + * + * if do_copy: # <<<<<<<<<<<<<< +@@ -3396,32 +3396,32 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyT + */ + } + +- /* "wx/svg/_nanosvg.pyx":180 ++ /* "wx/svg/_nanosvg.pyx":179 + * buffer = bytes(bytearray(buffer)) + * + * units_b = units.encode('utf-8') # <<<<<<<<<<<<<< + * cdef SVGimageBase img = cls() + * img._set_ptr(nsvgParse(buffer, 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, 180, __pyx_L1_error) ++ __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, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_units_b = __pyx_t_3; + __pyx_t_3 = 0; + +- /* "wx/svg/_nanosvg.pyx":181 ++ /* "wx/svg/_nanosvg.pyx":180 + * + * units_b = units.encode('utf-8') + * cdef SVGimageBase img = cls() # <<<<<<<<<<<<<< + * img._set_ptr(nsvgParse(buffer, units_b, dpi), + * 'Unable to parse SVG buffer') + */ +- __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_v_cls)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); +- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase))))) __PYX_ERR(0, 181, __pyx_L1_error) ++ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase))))) __PYX_ERR(0, 180, __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":182 ++ /* "wx/svg/_nanosvg.pyx":181 + * units_b = units.encode('utf-8') + * cdef SVGimageBase img = cls() + * img._set_ptr(nsvgParse(buffer, units_b, dpi), # <<<<<<<<<<<<<< +@@ -3430,17 +3430,17 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyT + */ + if (unlikely(__pyx_v_buffer == Py_None)) { + PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); +- __PYX_ERR(0, 182, __pyx_L1_error) ++ __PYX_ERR(0, 181, __pyx_L1_error) + } +- __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_buffer); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L1_error) +- __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_units_b); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_buffer); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L1_error) ++ __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_v_units_b); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_6.__pyx_n = 1; + __pyx_t_6.errmsg = __pyx_kp_s_Unable_to_parse_SVG_buffer; +- __pyx_t_3 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_img->__pyx_vtab)->_set_ptr(__pyx_v_img, nsvgParse(__pyx_t_4, __pyx_t_5, __pyx_v_dpi), &__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) ++ __pyx_t_3 = ((struct __pyx_vtabstruct_2wx_3svg_8_nanosvg_SVGimageBase *)__pyx_v_img->__pyx_vtab)->_set_ptr(__pyx_v_img, nsvgParse(__pyx_t_4, __pyx_t_5, __pyx_v_dpi), &__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + +- /* "wx/svg/_nanosvg.pyx":184 ++ /* "wx/svg/_nanosvg.pyx":183 + * img._set_ptr(nsvgParse(buffer, units_b, dpi), + * 'Unable to parse SVG buffer') + * return img # <<<<<<<<<<<<<< +@@ -3452,7 +3452,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":153 ++ /* "wx/svg/_nanosvg.pyx":152 + * + * @classmethod + * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96, bint do_copy=True): # <<<<<<<<<<<<<< +@@ -3475,7 +3475,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6CreateFromBytes(PyT + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":187 ++/* "wx/svg/_nanosvg.pyx":186 + * + * + * def __repr__(self) -> str: # <<<<<<<<<<<<<< +@@ -3512,7 +3512,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + +- /* "wx/svg/_nanosvg.pyx":188 ++ /* "wx/svg/_nanosvg.pyx":187 + * + * def __repr__(self) -> str: + * if self._ptr: # <<<<<<<<<<<<<< +@@ -3522,7 +3522,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":189 ++ /* "wx/svg/_nanosvg.pyx":188 + * def __repr__(self) -> str: + * if self._ptr: + * return "SVGimageBase: size ({}, {})".format(self.width, self.height) # <<<<<<<<<<<<<< +@@ -3530,11 +3530,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, 189, __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, 188, __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, 189, __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, 188, __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, 189, __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, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; +@@ -3551,7 +3551,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, 189, __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, 188, __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; +@@ -3561,7 +3561,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, 189, __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, 188, __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; +@@ -3569,7 +3569,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, 189, __pyx_L1_error) ++ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 188, __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; +@@ -3580,7 +3580,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, 189, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } +@@ -3589,7 +3589,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":188 ++ /* "wx/svg/_nanosvg.pyx":187 + * + * def __repr__(self) -> str: + * if self._ptr: # <<<<<<<<<<<<<< +@@ -3598,7 +3598,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p + */ + } + +- /* "wx/svg/_nanosvg.pyx":191 ++ /* "wx/svg/_nanosvg.pyx":190 + * return "SVGimageBase: size ({}, {})".format(self.width, self.height) + * else: + * return "SVGimageBase: " # <<<<<<<<<<<<<< +@@ -3612,7 +3612,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p + goto __pyx_L0; + } + +- /* "wx/svg/_nanosvg.pyx":187 ++ /* "wx/svg/_nanosvg.pyx":186 + * + * + * def __repr__(self) -> str: # <<<<<<<<<<<<<< +@@ -3636,7 +3636,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_8__repr__(struct __p + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":194 ++/* "wx/svg/_nanosvg.pyx":193 + * + * + * def RasterizeToBuffer(self, object buf, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< +@@ -3728,7 +3728,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, 194, __pyx_L3_error) ++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "RasterizeToBuffer") < 0)) __PYX_ERR(0, 193, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { +@@ -3751,39 +3751,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, 194, __pyx_L3_error) ++ __pyx_v_tx = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_tx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 193, __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, 194, __pyx_L3_error) ++ __pyx_v_ty = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_ty == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 193, __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, 194, __pyx_L3_error) ++ __pyx_v_scale = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_scale == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 193, __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, 195, __pyx_L3_error) ++ __pyx_v_width = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __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, 195, __pyx_L3_error) ++ __pyx_v_height = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __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, 195, __pyx_L3_error) ++ __pyx_v_stride = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_stride == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __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, 194, __pyx_L3_error) ++ __Pyx_RaiseArgtupleInvalid("RasterizeToBuffer", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 193, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.RasterizeToBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); +@@ -3808,18 +3808,18 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("RasterizeToBuffer", 0); + +- /* "wx/svg/_nanosvg.pyx":211 ++ /* "wx/svg/_nanosvg.pyx":210 + * :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, 211, __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, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + +- /* "wx/svg/_nanosvg.pyx":212 ++ /* "wx/svg/_nanosvg.pyx":211 + * """ + * self._check_ptr() + * if self._rasterizer == NULL: # <<<<<<<<<<<<<< +@@ -3829,7 +3829,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":213 ++ /* "wx/svg/_nanosvg.pyx":212 + * self._check_ptr() + * if self._rasterizer == NULL: + * self._rasterizer = nsvgCreateRasterizer() # <<<<<<<<<<<<<< +@@ -3838,7 +3838,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + __pyx_v_self->_rasterizer = nsvgCreateRasterizer(); + +- /* "wx/svg/_nanosvg.pyx":212 ++ /* "wx/svg/_nanosvg.pyx":211 + * """ + * self._check_ptr() + * if self._rasterizer == NULL: # <<<<<<<<<<<<<< +@@ -3847,7 +3847,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + } + +- /* "wx/svg/_nanosvg.pyx":215 ++ /* "wx/svg/_nanosvg.pyx":214 + * self._rasterizer = nsvgCreateRasterizer() + * + * if width == -1: # <<<<<<<<<<<<<< +@@ -3857,20 +3857,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":216 ++ /* "wx/svg/_nanosvg.pyx":215 + * + * 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, 216, __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, 215, __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, 216, __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, 215, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_width = __pyx_t_3; + +- /* "wx/svg/_nanosvg.pyx":215 ++ /* "wx/svg/_nanosvg.pyx":214 + * self._rasterizer = nsvgCreateRasterizer() + * + * if width == -1: # <<<<<<<<<<<<<< +@@ -3879,7 +3879,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + } + +- /* "wx/svg/_nanosvg.pyx":217 ++ /* "wx/svg/_nanosvg.pyx":216 + * if width == -1: + * width = self.width + * if height == -1: # <<<<<<<<<<<<<< +@@ -3889,20 +3889,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":218 ++ /* "wx/svg/_nanosvg.pyx":217 + * 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, 218, __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, 217, __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, 218, __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, 217, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_height = __pyx_t_3; + +- /* "wx/svg/_nanosvg.pyx":217 ++ /* "wx/svg/_nanosvg.pyx":216 + * if width == -1: + * width = self.width + * if height == -1: # <<<<<<<<<<<<<< +@@ -3911,7 +3911,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + } + +- /* "wx/svg/_nanosvg.pyx":219 ++ /* "wx/svg/_nanosvg.pyx":218 + * if height == -1: + * height = self.height + * if stride == -1: # <<<<<<<<<<<<<< +@@ -3921,7 +3921,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":220 ++ /* "wx/svg/_nanosvg.pyx":219 + * height = self.height + * if stride == -1: + * stride = width * 4; # <<<<<<<<<<<<<< +@@ -3930,7 +3930,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + __pyx_v_stride = (__pyx_v_width * 4); + +- /* "wx/svg/_nanosvg.pyx":219 ++ /* "wx/svg/_nanosvg.pyx":218 + * if height == -1: + * height = self.height + * if stride == -1: # <<<<<<<<<<<<<< +@@ -3939,7 +3939,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + } + +- /* "wx/svg/_nanosvg.pyx":222 ++ /* "wx/svg/_nanosvg.pyx":221 + * stride = width * 4; + * + * if not PyObject_CheckBuffer(buf): # <<<<<<<<<<<<<< +@@ -3949,20 +3949,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":223 ++ /* "wx/svg/_nanosvg.pyx":222 + * + * 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, 223, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __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, 223, __pyx_L1_error) ++ __PYX_ERR(0, 222, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":222 ++ /* "wx/svg/_nanosvg.pyx":221 + * stride = width * 4; + * + * if not PyObject_CheckBuffer(buf): # <<<<<<<<<<<<<< +@@ -3971,31 +3971,31 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + } + +- /* "wx/svg/_nanosvg.pyx":226 ++ /* "wx/svg/_nanosvg.pyx":225 + * + * 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, 226, __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, 225, __pyx_L1_error) + __pyx_t_2 = ((__pyx_t_3 != 0) != 0); + if (unlikely(__pyx_t_2)) { + +- /* "wx/svg/_nanosvg.pyx":227 ++ /* "wx/svg/_nanosvg.pyx":226 + * cdef Py_buffer view + * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: + * raise ValueError("PyObject_GetBuffer failed") # <<<<<<<<<<<<<< + * if view.len < height * stride: + * PyBuffer_Release(&view) + */ +- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __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, 227, __pyx_L1_error) ++ __PYX_ERR(0, 226, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":226 ++ /* "wx/svg/_nanosvg.pyx":225 + * + * cdef Py_buffer view + * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: # <<<<<<<<<<<<<< +@@ -4004,7 +4004,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + } + +- /* "wx/svg/_nanosvg.pyx":228 ++ /* "wx/svg/_nanosvg.pyx":227 + * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: + * raise ValueError("PyObject_GetBuffer failed") + * if view.len < height * stride: # <<<<<<<<<<<<<< +@@ -4014,7 +4014,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":229 ++ /* "wx/svg/_nanosvg.pyx":228 + * raise ValueError("PyObject_GetBuffer failed") + * if view.len < height * stride: + * PyBuffer_Release(&view) # <<<<<<<<<<<<<< +@@ -4023,20 +4023,20 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + PyBuffer_Release((&__pyx_v_view)); + +- /* "wx/svg/_nanosvg.pyx":230 ++ /* "wx/svg/_nanosvg.pyx":229 + * 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, 230, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __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, 230, __pyx_L1_error) ++ __PYX_ERR(0, 229, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":228 ++ /* "wx/svg/_nanosvg.pyx":227 + * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: + * raise ValueError("PyObject_GetBuffer failed") + * if view.len < height * stride: # <<<<<<<<<<<<<< +@@ -4045,7 +4045,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + } + +- /* "wx/svg/_nanosvg.pyx":232 ++ /* "wx/svg/_nanosvg.pyx":231 + * raise ValueError("Buffer object is smaller than height * stride") + * + * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, view.buf, # <<<<<<<<<<<<<< +@@ -4054,7 +4054,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":234 ++ /* "wx/svg/_nanosvg.pyx":233 + * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, view.buf, + * width, height, stride) + * PyBuffer_Release(&view) # <<<<<<<<<<<<<< +@@ -4063,7 +4063,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + */ + PyBuffer_Release((&__pyx_v_view)); + +- /* "wx/svg/_nanosvg.pyx":194 ++ /* "wx/svg/_nanosvg.pyx":193 + * + * + * def RasterizeToBuffer(self, object buf, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< +@@ -4084,7 +4084,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_10RasterizeToBuffer( + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":237 ++/* "wx/svg/_nanosvg.pyx":236 + * + * + * def Rasterize(self, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< +@@ -4169,7 +4169,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, 237, __pyx_L3_error) ++ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Rasterize") < 0)) __PYX_ERR(0, 236, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { +@@ -4190,39 +4190,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, 237, __pyx_L3_error) ++ __pyx_v_tx = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_tx == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 236, __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, 237, __pyx_L3_error) ++ __pyx_v_ty = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_ty == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 236, __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, 237, __pyx_L3_error) ++ __pyx_v_scale = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_scale == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 236, __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, 238, __pyx_L3_error) ++ __pyx_v_width = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 237, __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, 238, __pyx_L3_error) ++ __pyx_v_height = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 237, __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, 238, __pyx_L3_error) ++ __pyx_v_stride = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_stride == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 237, __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, 237, __pyx_L3_error) ++ __Pyx_RaiseArgtupleInvalid("Rasterize", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 236, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("wx.svg._nanosvg.SVGimageBase.Rasterize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); +@@ -4249,18 +4249,18 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("Rasterize", 0); + +- /* "wx/svg/_nanosvg.pyx":251 ++ /* "wx/svg/_nanosvg.pyx":250 + * :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, 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, 250, __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":251 + * """ + * self._check_ptr() + * if self._rasterizer == NULL: # <<<<<<<<<<<<<< +@@ -4270,7 +4270,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":253 ++ /* "wx/svg/_nanosvg.pyx":252 + * self._check_ptr() + * if self._rasterizer == NULL: + * self._rasterizer = nsvgCreateRasterizer() # <<<<<<<<<<<<<< +@@ -4279,7 +4279,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + */ + __pyx_v_self->_rasterizer = nsvgCreateRasterizer(); + +- /* "wx/svg/_nanosvg.pyx":252 ++ /* "wx/svg/_nanosvg.pyx":251 + * """ + * self._check_ptr() + * if self._rasterizer == NULL: # <<<<<<<<<<<<<< +@@ -4288,7 +4288,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + */ + } + +- /* "wx/svg/_nanosvg.pyx":255 ++ /* "wx/svg/_nanosvg.pyx":254 + * self._rasterizer = nsvgCreateRasterizer() + * + * if width == -1: # <<<<<<<<<<<<<< +@@ -4298,20 +4298,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":256 ++ /* "wx/svg/_nanosvg.pyx":255 + * + * 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, 256, __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, 255, __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, 256, __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, 255, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_width = __pyx_t_3; + +- /* "wx/svg/_nanosvg.pyx":255 ++ /* "wx/svg/_nanosvg.pyx":254 + * self._rasterizer = nsvgCreateRasterizer() + * + * if width == -1: # <<<<<<<<<<<<<< +@@ -4320,7 +4320,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + */ + } + +- /* "wx/svg/_nanosvg.pyx":257 ++ /* "wx/svg/_nanosvg.pyx":256 + * if width == -1: + * width = self.width + * if height == -1: # <<<<<<<<<<<<<< +@@ -4330,20 +4330,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":258 ++ /* "wx/svg/_nanosvg.pyx":257 + * 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, 258, __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, 257, __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, 258, __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, 257, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_height = __pyx_t_3; + +- /* "wx/svg/_nanosvg.pyx":257 ++ /* "wx/svg/_nanosvg.pyx":256 + * if width == -1: + * width = self.width + * if height == -1: # <<<<<<<<<<<<<< +@@ -4352,7 +4352,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + */ + } + +- /* "wx/svg/_nanosvg.pyx":259 ++ /* "wx/svg/_nanosvg.pyx":258 + * if height == -1: + * height = self.height + * if stride == -1: # <<<<<<<<<<<<<< +@@ -4362,7 +4362,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + __pyx_t_2 = ((__pyx_v_stride == -1L) != 0); + if (__pyx_t_2) { + +- /* "wx/svg/_nanosvg.pyx":260 ++ /* "wx/svg/_nanosvg.pyx":259 + * height = self.height + * if stride == -1: + * stride = width * 4; # <<<<<<<<<<<<<< +@@ -4371,7 +4371,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + */ + __pyx_v_stride = (__pyx_v_width * 4); + +- /* "wx/svg/_nanosvg.pyx":259 ++ /* "wx/svg/_nanosvg.pyx":258 + * if height == -1: + * height = self.height + * if stride == -1: # <<<<<<<<<<<<<< +@@ -4380,34 +4380,34 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + */ + } + +- /* "wx/svg/_nanosvg.pyx":262 ++ /* "wx/svg/_nanosvg.pyx":261 + * stride = width * 4; + * + * buf = bytes(bytearray(height * stride)) # <<<<<<<<<<<<<< + * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, + * width, height, stride) + */ +- __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_height * __pyx_v_stride)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_height * __pyx_v_stride)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); +- __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 262, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; +- __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __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":263 ++ /* "wx/svg/_nanosvg.pyx":262 + * + * 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, 263, __pyx_L1_error) ++ __pyx_t_5 = __Pyx_PyBytes_AsWritableUString(__pyx_v_buf); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 262, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":264 ++ /* "wx/svg/_nanosvg.pyx":263 + * buf = bytes(bytearray(height * stride)) + * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, + * width, height, stride) # <<<<<<<<<<<<<< +@@ -4416,7 +4416,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":265 ++ /* "wx/svg/_nanosvg.pyx":264 + * nsvgRasterize(self._rasterizer, self._ptr, tx, ty, scale, buf, + * width, height, stride) + * return buf # <<<<<<<<<<<<<< +@@ -4428,7 +4428,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + __pyx_r = __pyx_v_buf; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":237 ++ /* "wx/svg/_nanosvg.pyx":236 + * + * + * def Rasterize(self, float tx=0.0, float ty=0.0, float scale=1.0, # <<<<<<<<<<<<<< +@@ -4449,7 +4449,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_12Rasterize(struct _ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":268 ++/* "wx/svg/_nanosvg.pyx":267 + * + * @property + * def width(self) -> float: # <<<<<<<<<<<<<< +@@ -4479,18 +4479,18 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_5width___get__(struc + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":272 ++ /* "wx/svg/_nanosvg.pyx":271 + * 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, 272, __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, 271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + +- /* "wx/svg/_nanosvg.pyx":273 ++ /* "wx/svg/_nanosvg.pyx":272 + * """ + * self._check_ptr() + * return self._ptr.width # <<<<<<<<<<<<<< +@@ -4498,13 +4498,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, 273, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":268 ++ /* "wx/svg/_nanosvg.pyx":267 + * + * @property + * def width(self) -> float: # <<<<<<<<<<<<<< +@@ -4523,7 +4523,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_5width___get__(struc + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":276 ++/* "wx/svg/_nanosvg.pyx":275 + * + * @property + * def height(self) -> float: # <<<<<<<<<<<<<< +@@ -4553,18 +4553,18 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_6height___get__(stru + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":280 ++ /* "wx/svg/_nanosvg.pyx":279 + * 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, 280, __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, 279, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + +- /* "wx/svg/_nanosvg.pyx":281 ++ /* "wx/svg/_nanosvg.pyx":280 + * """ + * self._check_ptr() + * return self._ptr.height # <<<<<<<<<<<<<< +@@ -4572,13 +4572,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, 281, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":276 ++ /* "wx/svg/_nanosvg.pyx":275 + * + * @property + * def height(self) -> float: # <<<<<<<<<<<<<< +@@ -4598,7 +4598,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":284 ++/* "wx/svg/_nanosvg.pyx":283 + * + * @property + * def shapes(self): # <<<<<<<<<<<<<< +@@ -4631,7 +4631,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, 284, __pyx_L1_error) ++ __PYX_ERR(0, 283, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } +@@ -4639,7 +4639,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, 284, __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, 283, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; +@@ -4675,20 +4675,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, 284, __pyx_L1_error) ++ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 283, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":288 ++ /* "wx/svg/_nanosvg.pyx":287 + * 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, 288, __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, 287, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + +- /* "wx/svg/_nanosvg.pyx":289 ++ /* "wx/svg/_nanosvg.pyx":288 + * """ + * self._check_ptr() + * cdef NSVGshape *shape = self._ptr.shapes # <<<<<<<<<<<<<< +@@ -4698,7 +4698,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":290 ++ /* "wx/svg/_nanosvg.pyx":289 + * self._check_ptr() + * cdef NSVGshape *shape = self._ptr.shapes + * while shape != NULL: # <<<<<<<<<<<<<< +@@ -4709,14 +4709,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":291 ++ /* "wx/svg/_nanosvg.pyx":290 + * 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, 291, __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, 290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; +@@ -4727,9 +4727,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, 291, __pyx_L1_error) ++ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 290, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":292 ++ /* "wx/svg/_nanosvg.pyx":291 + * while shape != NULL: + * yield SVGshape.from_ptr(shape) + * shape = shape.next # <<<<<<<<<<<<<< +@@ -4741,7 +4741,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_12SVGimageBase_6shapes_2generator(_ + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + +- /* "wx/svg/_nanosvg.pyx":284 ++ /* "wx/svg/_nanosvg.pyx":283 + * + * @property + * def shapes(self): # <<<<<<<<<<<<<< +@@ -4881,7 +4881,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_12SVGimageBase_16__setstate_cython_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":305 ++/* "wx/svg/_nanosvg.pyx":304 + * cdef NSVGshape *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -4910,7 +4910,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":306 ++ /* "wx/svg/_nanosvg.pyx":305 + * + * def __cinit__(self): + * self._ptr = NULL # <<<<<<<<<<<<<< +@@ -4919,7 +4919,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGshape___cinit__(struct __pyx_obj_2wx_ + */ + __pyx_v_self->_ptr = NULL; + +- /* "wx/svg/_nanosvg.pyx":305 ++ /* "wx/svg/_nanosvg.pyx":304 + * cdef NSVGshape *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -4933,7 +4933,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGshape___cinit__(struct __pyx_obj_2wx_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":308 ++/* "wx/svg/_nanosvg.pyx":307 + * self._ptr = NULL + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -4965,7 +4965,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_check_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":309 ++ /* "wx/svg/_nanosvg.pyx":308 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -4975,20 +4975,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":310 ++ /* "wx/svg/_nanosvg.pyx":309 + * 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, 310, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __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, 310, __pyx_L1_error) ++ __PYX_ERR(0, 309, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":309 ++ /* "wx/svg/_nanosvg.pyx":308 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -4997,7 +4997,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ + */ + } + +- /* "wx/svg/_nanosvg.pyx":308 ++ /* "wx/svg/_nanosvg.pyx":307 + * self._ptr = NULL + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -5018,7 +5018,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2_check_ptr(struct __pyx_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":313 ++/* "wx/svg/_nanosvg.pyx":312 + * + * @staticmethod + * cdef SVGshape from_ptr(NSVGshape *ptr): # <<<<<<<<<<<<<< +@@ -5036,19 +5036,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *__pyx_f_2wx_3svg_8_nanosvg_ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":314 ++ /* "wx/svg/_nanosvg.pyx":313 + * @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, 314, __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, 313, __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":315 ++ /* "wx/svg/_nanosvg.pyx":314 + * cdef SVGshape from_ptr(NSVGshape *ptr): + * obj = SVGshape() + * obj._ptr = ptr # <<<<<<<<<<<<<< +@@ -5057,7 +5057,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":316 ++ /* "wx/svg/_nanosvg.pyx":315 + * obj = SVGshape() + * obj._ptr = ptr + * return obj # <<<<<<<<<<<<<< +@@ -5069,7 +5069,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":313 ++ /* "wx/svg/_nanosvg.pyx":312 + * + * @staticmethod + * cdef SVGshape from_ptr(NSVGshape *ptr): # <<<<<<<<<<<<<< +@@ -5089,7 +5089,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGshape *__pyx_f_2wx_3svg_8_nanosvg_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":318 ++/* "wx/svg/_nanosvg.pyx":317 + * return obj + * + * def __repr__(self): # <<<<<<<<<<<<<< +@@ -5126,7 +5126,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + +- /* "wx/svg/_nanosvg.pyx":319 ++ /* "wx/svg/_nanosvg.pyx":318 + * + * def __repr__(self): + * if self._ptr: # <<<<<<<<<<<<<< +@@ -5136,7 +5136,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":320 ++ /* "wx/svg/_nanosvg.pyx":319 + * def __repr__(self): + * if self._ptr: + * return "SVGshape: id:{} bounds:{}".format(self.id.decode('utf-8'), self.bounds) # <<<<<<<<<<<<<< +@@ -5144,11 +5144,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, 320, __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, 319, __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, 320, __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, 319, __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, 320, __pyx_L1_error) ++ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; +@@ -5163,10 +5163,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, 320, __pyx_L1_error) ++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 319, __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, 320, __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, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; + __pyx_t_7 = 0; +@@ -5183,7 +5183,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, 320, __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, 319, __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; +@@ -5193,7 +5193,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, 320, __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, 319, __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; +@@ -5201,7 +5201,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, 320, __pyx_L1_error) ++ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 319, __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; +@@ -5212,7 +5212,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, 320, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + } +@@ -5221,7 +5221,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":319 ++ /* "wx/svg/_nanosvg.pyx":318 + * + * def __repr__(self): + * if self._ptr: # <<<<<<<<<<<<<< +@@ -5230,7 +5230,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob + */ + } + +- /* "wx/svg/_nanosvg.pyx":322 ++ /* "wx/svg/_nanosvg.pyx":321 + * return "SVGshape: id:{} bounds:{}".format(self.id.decode('utf-8'), self.bounds) + * else: + * return "SVGshape: " # <<<<<<<<<<<<<< +@@ -5244,7 +5244,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob + goto __pyx_L0; + } + +- /* "wx/svg/_nanosvg.pyx":318 ++ /* "wx/svg/_nanosvg.pyx":317 + * return obj + * + * def __repr__(self): # <<<<<<<<<<<<<< +@@ -5268,7 +5268,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4__repr__(struct __pyx_ob + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":325 ++/* "wx/svg/_nanosvg.pyx":324 + * + * @property + * def id(self): # <<<<<<<<<<<<<< +@@ -5300,14 +5300,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2id___get__(struct __pyx_ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":327 ++ /* "wx/svg/_nanosvg.pyx":326 + * 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, 327, __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, 326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -5321,12 +5321,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, 327, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __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":328 ++ /* "wx/svg/_nanosvg.pyx":327 + * """Optional 'id' attr of the shape or its group""" + * self._check_ptr() + * return self._ptr.id # <<<<<<<<<<<<<< +@@ -5334,13 +5334,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, 328, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyObject_FromString(__pyx_v_self->_ptr->id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":325 ++ /* "wx/svg/_nanosvg.pyx":324 + * + * @property + * def id(self): # <<<<<<<<<<<<<< +@@ -5361,7 +5361,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_2id___get__(struct __pyx_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":331 ++/* "wx/svg/_nanosvg.pyx":330 + * + * @property + * def fill(self) -> SVGpaint: # <<<<<<<<<<<<<< +@@ -5393,14 +5393,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4fill___get__(struct __py + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":333 ++ /* "wx/svg/_nanosvg.pyx":332 + * 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, 333, __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, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -5414,12 +5414,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, 333, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __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":334 ++ /* "wx/svg/_nanosvg.pyx":333 + * """:class:`SVGpaint` for the fill""" + * self._check_ptr() + * return SVGpaint.from_ptr(&self._ptr.fill) # <<<<<<<<<<<<<< +@@ -5427,13 +5427,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, 334, __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, 333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":331 ++ /* "wx/svg/_nanosvg.pyx":330 + * + * @property + * def fill(self) -> SVGpaint: # <<<<<<<<<<<<<< +@@ -5454,7 +5454,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4fill___get__(struct __py + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":337 ++/* "wx/svg/_nanosvg.pyx":336 + * + * @property + * def stroke(self) -> SVGpaint: # <<<<<<<<<<<<<< +@@ -5486,14 +5486,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6stroke___get__(struct __ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":339 ++ /* "wx/svg/_nanosvg.pyx":338 + * 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, 339, __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, 338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -5507,12 +5507,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, 339, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __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":340 ++ /* "wx/svg/_nanosvg.pyx":339 + * """:class:`SVGpaint` for the stroke""" + * self._check_ptr() + * return SVGpaint.from_ptr(&self._ptr.stroke) # <<<<<<<<<<<<<< +@@ -5520,13 +5520,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, 340, __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, 339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":337 ++ /* "wx/svg/_nanosvg.pyx":336 + * + * @property + * def stroke(self) -> SVGpaint: # <<<<<<<<<<<<<< +@@ -5547,7 +5547,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6stroke___get__(struct __ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":343 ++/* "wx/svg/_nanosvg.pyx":342 + * + * @property + * def opacity(self) -> float: # <<<<<<<<<<<<<< +@@ -5579,14 +5579,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_7opacity___get__(struct _ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":345 ++ /* "wx/svg/_nanosvg.pyx":344 + * 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, 345, __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, 344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -5600,12 +5600,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, 345, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __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":346 ++ /* "wx/svg/_nanosvg.pyx":345 + * """Opacity of the shape""" + * self._check_ptr() + * return self._ptr.opacity # <<<<<<<<<<<<<< +@@ -5613,13 +5613,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, 346, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->opacity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":343 ++ /* "wx/svg/_nanosvg.pyx":342 + * + * @property + * def opacity(self) -> float: # <<<<<<<<<<<<<< +@@ -5640,7 +5640,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_7opacity___get__(struct _ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":349 ++/* "wx/svg/_nanosvg.pyx":348 + * + * @property + * def strokeWidth(self) -> float: # <<<<<<<<<<<<<< +@@ -5672,14 +5672,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_11strokeWidth___get__(str + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":351 ++ /* "wx/svg/_nanosvg.pyx":350 + * 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, 351, __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, 350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -5693,12 +5693,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, 351, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __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":352 ++ /* "wx/svg/_nanosvg.pyx":351 + * """Stroke width (scaled)""" + * self._check_ptr() + * return self._ptr.strokeWidth # <<<<<<<<<<<<<< +@@ -5706,13 +5706,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, 352, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->strokeWidth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":349 ++ /* "wx/svg/_nanosvg.pyx":348 + * + * @property + * def strokeWidth(self) -> float: # <<<<<<<<<<<<<< +@@ -5733,7 +5733,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_11strokeWidth___get__(str + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":355 ++/* "wx/svg/_nanosvg.pyx":354 + * + * @property + * def strokeDashOffset(self) -> float: # <<<<<<<<<<<<<< +@@ -5765,14 +5765,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_16strokeDashOffset___get_ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":357 ++ /* "wx/svg/_nanosvg.pyx":356 + * 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, 357, __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, 356, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -5786,12 +5786,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, 357, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __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":358 ++ /* "wx/svg/_nanosvg.pyx":357 + * """Stroke dash offset (scaled)""" + * self._check_ptr() + * return self._ptr.strokeDashOffset # <<<<<<<<<<<<<< +@@ -5799,13 +5799,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, 358, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->strokeDashOffset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":355 ++ /* "wx/svg/_nanosvg.pyx":354 + * + * @property + * def strokeDashOffset(self) -> float: # <<<<<<<<<<<<<< +@@ -5826,7 +5826,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_16strokeDashOffset___get_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":361 ++/* "wx/svg/_nanosvg.pyx":360 + * + * @property + * def strokeDashArray(self) -> list: # <<<<<<<<<<<<<< +@@ -5862,14 +5862,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_15strokeDashArray___get__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":363 ++ /* "wx/svg/_nanosvg.pyx":362 + * 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, 363, __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, 362, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -5883,12 +5883,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, 363, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __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":364 ++ /* "wx/svg/_nanosvg.pyx":363 + * """Stroke dash array (scaled)""" + * self._check_ptr() + * return [self._ptr.strokeDashArray[i] # <<<<<<<<<<<<<< +@@ -5896,10 +5896,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, 364, __pyx_L1_error) ++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + +- /* "wx/svg/_nanosvg.pyx":365 ++ /* "wx/svg/_nanosvg.pyx":364 + * self._check_ptr() + * return [self._ptr.strokeDashArray[i] + * for i in range(self._ptr.strokeDashCount)] # <<<<<<<<<<<<<< +@@ -5911,23 +5911,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":364 ++ /* "wx/svg/_nanosvg.pyx":363 + * """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, 364, __pyx_L1_error) ++ __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->strokeDashArray[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 363, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 364, __pyx_L1_error) ++ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 363, __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":361 ++ /* "wx/svg/_nanosvg.pyx":360 + * + * @property + * def strokeDashArray(self) -> list: # <<<<<<<<<<<<<< +@@ -5948,7 +5948,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_15strokeDashArray___get__ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":368 ++/* "wx/svg/_nanosvg.pyx":367 + * + * @property + * def strokeLineJoin(self) -> SVGlineJoin: # <<<<<<<<<<<<<< +@@ -5981,14 +5981,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_14strokeLineJoin___get__( + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":370 ++ /* "wx/svg/_nanosvg.pyx":369 + * 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, 370, __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, 369, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6002,12 +6002,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, 370, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __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":371 ++ /* "wx/svg/_nanosvg.pyx":370 + * """Stroke join type""" + * self._check_ptr() + * return SVGlineJoin(self._ptr.strokeLineJoin) # <<<<<<<<<<<<<< +@@ -6015,9 +6015,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, 371, __pyx_L1_error) ++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineJoin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __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, 371, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->strokeLineJoin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { +@@ -6032,14 +6032,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, 371, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":368 ++ /* "wx/svg/_nanosvg.pyx":367 + * + * @property + * def strokeLineJoin(self) -> SVGlineJoin: # <<<<<<<<<<<<<< +@@ -6061,7 +6061,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_14strokeLineJoin___get__( + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":374 ++/* "wx/svg/_nanosvg.pyx":373 + * + * @property + * def strokeLineCap(self) -> SVGlineCap: # <<<<<<<<<<<<<< +@@ -6094,14 +6094,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_13strokeLineCap___get__(s + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":376 ++ /* "wx/svg/_nanosvg.pyx":375 + * 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, 376, __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, 375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6115,12 +6115,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, 376, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __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":377 ++ /* "wx/svg/_nanosvg.pyx":376 + * """Stroke cap type""" + * self._check_ptr() + * return SVGlineCap(self._ptr.strokeLineCap) # <<<<<<<<<<<<<< +@@ -6128,9 +6128,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, 377, __pyx_L1_error) ++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGlineCap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __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, 377, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->strokeLineCap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { +@@ -6145,14 +6145,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, 377, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":374 ++ /* "wx/svg/_nanosvg.pyx":373 + * + * @property + * def strokeLineCap(self) -> SVGlineCap: # <<<<<<<<<<<<<< +@@ -6174,7 +6174,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_13strokeLineCap___get__(s + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":380 ++/* "wx/svg/_nanosvg.pyx":379 + * + * @property + * def fillRule(self) -> SVGfillRule: # <<<<<<<<<<<<<< +@@ -6207,14 +6207,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8fillRule___get__(struct + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":382 ++ /* "wx/svg/_nanosvg.pyx":381 + * 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, 382, __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, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6228,12 +6228,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, 382, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 381, __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":383 ++ /* "wx/svg/_nanosvg.pyx":382 + * """Fill rule""" + * self._check_ptr() + * return SVGfillRule(self._ptr.fillRule) # <<<<<<<<<<<<<< +@@ -6241,9 +6241,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, 383, __pyx_L1_error) ++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGfillRule); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __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, 383, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->fillRule); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { +@@ -6258,14 +6258,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, 383, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":380 ++ /* "wx/svg/_nanosvg.pyx":379 + * + * @property + * def fillRule(self) -> SVGfillRule: # <<<<<<<<<<<<<< +@@ -6287,7 +6287,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8fillRule___get__(struct + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":386 ++/* "wx/svg/_nanosvg.pyx":385 + * + * @property + * def miterLimit(self) -> float: # <<<<<<<<<<<<<< +@@ -6319,14 +6319,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_10miterLimit___get__(stru + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":388 ++ /* "wx/svg/_nanosvg.pyx":387 + * 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, 388, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6340,12 +6340,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, 388, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + +- /* "wx/svg/_nanosvg.pyx":389 ++ /* "wx/svg/_nanosvg.pyx":388 + * """Miter limit""" + * self._check_ptr() + * return self._ptr.miterLimit # <<<<<<<<<<<<<< +@@ -6353,13 +6353,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, 389, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->miterLimit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":386 ++ /* "wx/svg/_nanosvg.pyx":385 + * + * @property + * def miterLimit(self) -> float: # <<<<<<<<<<<<<< +@@ -6380,7 +6380,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_10miterLimit___get__(stru + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":392 ++/* "wx/svg/_nanosvg.pyx":391 + * + * @property + * def flags(self) -> int: # <<<<<<<<<<<<<< +@@ -6412,14 +6412,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5flags___get__(struct __p + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":394 ++ /* "wx/svg/_nanosvg.pyx":393 + * 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, 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, 393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6433,12 +6433,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, 394, __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":395 ++ /* "wx/svg/_nanosvg.pyx":394 + * """Logical OR of SVG_FLAGS_* flags""" + * self._check_ptr() + * return int(self._ptr.flags) # <<<<<<<<<<<<<< +@@ -6446,16 +6446,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, 395, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_unsigned_char(__pyx_v_self->_ptr->flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __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, 395, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __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":392 ++ /* "wx/svg/_nanosvg.pyx":391 + * + * @property + * def flags(self) -> int: # <<<<<<<<<<<<<< +@@ -6476,7 +6476,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_5flags___get__(struct __p + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":398 ++/* "wx/svg/_nanosvg.pyx":397 + * + * @property + * def bounds(self) -> list: # <<<<<<<<<<<<<< +@@ -6510,14 +6510,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6bounds___get__(struct __ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":400 ++ /* "wx/svg/_nanosvg.pyx":399 + * 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, 400, __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, 399, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6531,12 +6531,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, 400, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __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":401 ++ /* "wx/svg/_nanosvg.pyx":400 + * """Tight bounding box of the shape [minx,miny,maxx,maxy]""" + * self._check_ptr() + * return [self._ptr.bounds[i] for i in range(4)] # <<<<<<<<<<<<<< +@@ -6544,20 +6544,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, 401, __pyx_L1_error) ++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __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, 401, __pyx_L1_error) ++ __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 401, __pyx_L1_error) ++ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 400, __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":398 ++ /* "wx/svg/_nanosvg.pyx":397 + * + * @property + * def bounds(self) -> list: # <<<<<<<<<<<<<< +@@ -6578,7 +6578,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_6bounds___get__(struct __ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":404 ++/* "wx/svg/_nanosvg.pyx":403 + * + * @property + * def minx(self) -> float: # <<<<<<<<<<<<<< +@@ -6610,14 +6610,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4minx___get__(struct __py + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":405 ++ /* "wx/svg/_nanosvg.pyx":404 + * @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, 405, __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, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6631,12 +6631,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, 405, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __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":406 ++ /* "wx/svg/_nanosvg.pyx":405 + * def minx(self) -> float: + * self._check_ptr() + * return self._ptr.bounds[0] # <<<<<<<<<<<<<< +@@ -6644,13 +6644,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, 406, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":404 ++ /* "wx/svg/_nanosvg.pyx":403 + * + * @property + * def minx(self) -> float: # <<<<<<<<<<<<<< +@@ -6671,7 +6671,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4minx___get__(struct __py + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":409 ++/* "wx/svg/_nanosvg.pyx":408 + * + * @property + * def miny(self) -> float: # <<<<<<<<<<<<<< +@@ -6703,14 +6703,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4miny___get__(struct __py + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":410 ++ /* "wx/svg/_nanosvg.pyx":409 + * @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, 410, __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, 409, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6724,12 +6724,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, 410, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __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":411 ++ /* "wx/svg/_nanosvg.pyx":410 + * def miny(self) -> float: + * self._check_ptr() + * return self._ptr.bounds[1] # <<<<<<<<<<<<<< +@@ -6737,13 +6737,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, 411, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[1])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":409 ++ /* "wx/svg/_nanosvg.pyx":408 + * + * @property + * def miny(self) -> float: # <<<<<<<<<<<<<< +@@ -6764,7 +6764,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4miny___get__(struct __py + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":414 ++/* "wx/svg/_nanosvg.pyx":413 + * + * @property + * def maxx(self) -> float: # <<<<<<<<<<<<<< +@@ -6796,14 +6796,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxx___get__(struct __py + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":415 ++ /* "wx/svg/_nanosvg.pyx":414 + * @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, 415, __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, 414, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6817,12 +6817,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, 415, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __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":416 ++ /* "wx/svg/_nanosvg.pyx":415 + * def maxx(self) -> float: + * self._check_ptr() + * return self._ptr.bounds[2] # <<<<<<<<<<<<<< +@@ -6830,13 +6830,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, 416, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":414 ++ /* "wx/svg/_nanosvg.pyx":413 + * + * @property + * def maxx(self) -> float: # <<<<<<<<<<<<<< +@@ -6857,7 +6857,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxx___get__(struct __py + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":419 ++/* "wx/svg/_nanosvg.pyx":418 + * + * @property + * def maxy(self) -> float: # <<<<<<<<<<<<<< +@@ -6889,14 +6889,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_4maxy___get__(struct __py + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":420 ++ /* "wx/svg/_nanosvg.pyx":419 + * @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, 420, __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, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -6910,12 +6910,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, 420, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __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":421 ++ /* "wx/svg/_nanosvg.pyx":420 + * def maxy(self) -> float: + * self._check_ptr() + * return self._ptr.bounds[3] # <<<<<<<<<<<<<< +@@ -6923,13 +6923,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, 421, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":419 ++ /* "wx/svg/_nanosvg.pyx":418 + * + * @property + * def maxy(self) -> float: # <<<<<<<<<<<<<< +@@ -6951,7 +6951,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":424 ++/* "wx/svg/_nanosvg.pyx":423 + * + * @property + * def paths(self): # <<<<<<<<<<<<<< +@@ -6984,7 +6984,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, 424, __pyx_L1_error) ++ __PYX_ERR(0, 423, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } +@@ -6992,7 +6992,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, 424, __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, 423, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; +@@ -7030,16 +7030,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, 424, __pyx_L1_error) ++ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 423, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":428 ++ /* "wx/svg/_nanosvg.pyx":427 + * 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, 428, __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, 427, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -7053,12 +7053,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, 428, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __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":429 ++ /* "wx/svg/_nanosvg.pyx":428 + * """ + * self._check_ptr() + * cdef NSVGpath *path = self._ptr.paths # <<<<<<<<<<<<<< +@@ -7068,7 +7068,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":430 ++ /* "wx/svg/_nanosvg.pyx":429 + * self._check_ptr() + * cdef NSVGpath *path = self._ptr.paths + * while path != NULL: # <<<<<<<<<<<<<< +@@ -7079,14 +7079,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":431 ++ /* "wx/svg/_nanosvg.pyx":430 + * 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, 431, __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, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; +@@ -7097,9 +7097,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, 431, __pyx_L1_error) ++ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 430, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":432 ++ /* "wx/svg/_nanosvg.pyx":431 + * while path != NULL: + * yield SVGpath.from_ptr(path) + * path = path.next # <<<<<<<<<<<<<< +@@ -7111,7 +7111,7 @@ static PyObject *__pyx_gb_2wx_3svg_8_nanosvg_8SVGshape_5paths_2generator1(__pyx_ + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + +- /* "wx/svg/_nanosvg.pyx":424 ++ /* "wx/svg/_nanosvg.pyx":423 + * + * @property + * def paths(self): # <<<<<<<<<<<<<< +@@ -7253,7 +7253,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGshape_8__setstate_cython__(CYTH + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":444 ++/* "wx/svg/_nanosvg.pyx":443 + * cdef NSVGpath *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -7282,7 +7282,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":445 ++ /* "wx/svg/_nanosvg.pyx":444 + * + * def __cinit__(self): + * self._ptr = NULL # <<<<<<<<<<<<<< +@@ -7291,7 +7291,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":444 ++ /* "wx/svg/_nanosvg.pyx":443 + * cdef NSVGpath *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -7305,7 +7305,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_7SVGpath___cinit__(struct __pyx_obj_2wx_3 + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":448 ++/* "wx/svg/_nanosvg.pyx":447 + * + * @staticmethod + * cdef SVGpath from_ptr(NSVGpath *ptr): # <<<<<<<<<<<<<< +@@ -7323,19 +7323,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *__pyx_f_2wx_3svg_8_nanosvg_7 + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":449 ++ /* "wx/svg/_nanosvg.pyx":448 + * @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, 449, __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, 448, __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":450 ++ /* "wx/svg/_nanosvg.pyx":449 + * cdef SVGpath from_ptr(NSVGpath *ptr): + * obj = SVGpath() + * obj._ptr = ptr # <<<<<<<<<<<<<< +@@ -7344,7 +7344,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":451 ++ /* "wx/svg/_nanosvg.pyx":450 + * obj = SVGpath() + * obj._ptr = ptr + * return obj # <<<<<<<<<<<<<< +@@ -7356,7 +7356,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":448 ++ /* "wx/svg/_nanosvg.pyx":447 + * + * @staticmethod + * cdef SVGpath from_ptr(NSVGpath *ptr): # <<<<<<<<<<<<<< +@@ -7376,7 +7376,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpath *__pyx_f_2wx_3svg_8_nanosvg_7 + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":453 ++/* "wx/svg/_nanosvg.pyx":452 + * return obj + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -7408,7 +7408,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_check_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":454 ++ /* "wx/svg/_nanosvg.pyx":453 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -7418,20 +7418,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":455 ++ /* "wx/svg/_nanosvg.pyx":454 + * 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, 455, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __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, 455, __pyx_L1_error) ++ __PYX_ERR(0, 454, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":454 ++ /* "wx/svg/_nanosvg.pyx":453 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -7440,7 +7440,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o + */ + } + +- /* "wx/svg/_nanosvg.pyx":453 ++ /* "wx/svg/_nanosvg.pyx":452 + * return obj + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -7461,7 +7461,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_2_check_ptr(struct __pyx_o + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":457 ++/* "wx/svg/_nanosvg.pyx":456 + * raise ValueError("Invalid SVGpath") + * + * def __repr__(self): # <<<<<<<<<<<<<< +@@ -7495,7 +7495,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + +- /* "wx/svg/_nanosvg.pyx":458 ++ /* "wx/svg/_nanosvg.pyx":457 + * + * def __repr__(self): + * if self._ptr: # <<<<<<<<<<<<<< +@@ -7505,7 +7505,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":459 ++ /* "wx/svg/_nanosvg.pyx":458 + * def __repr__(self): + * if self._ptr: + * return "SVGpath: bounds:{}".format(self.bounds) # <<<<<<<<<<<<<< +@@ -7513,9 +7513,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, 459, __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, 458, __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, 459, __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, 458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { +@@ -7530,14 +7530,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, 459, __pyx_L1_error) ++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __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":458 ++ /* "wx/svg/_nanosvg.pyx":457 + * + * def __repr__(self): + * if self._ptr: # <<<<<<<<<<<<<< +@@ -7546,7 +7546,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj + */ + } + +- /* "wx/svg/_nanosvg.pyx":461 ++ /* "wx/svg/_nanosvg.pyx":460 + * return "SVGpath: bounds:{}".format(self.bounds) + * else: + * return "SVGpath: " # <<<<<<<<<<<<<< +@@ -7560,7 +7560,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj + goto __pyx_L0; + } + +- /* "wx/svg/_nanosvg.pyx":457 ++ /* "wx/svg/_nanosvg.pyx":456 + * raise ValueError("Invalid SVGpath") + * + * def __repr__(self): # <<<<<<<<<<<<<< +@@ -7582,7 +7582,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4__repr__(struct __pyx_obj + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":464 ++/* "wx/svg/_nanosvg.pyx":463 + * + * @property + * def pts(self) -> list: # <<<<<<<<<<<<<< +@@ -7618,14 +7618,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_3pts___get__(struct __pyx_ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":469 ++ /* "wx/svg/_nanosvg.pyx":468 + * 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, 469, __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, 468, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -7639,12 +7639,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, 469, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __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":470 ++ /* "wx/svg/_nanosvg.pyx":469 + * """ + * self._check_ptr() + * return [self._ptr.pts[i] for i in range(self._ptr.npts*2)] # <<<<<<<<<<<<<< +@@ -7652,22 +7652,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, 470, __pyx_L1_error) ++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __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, 470, __pyx_L1_error) ++ __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 470, __pyx_L1_error) ++ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 469, __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":464 ++ /* "wx/svg/_nanosvg.pyx":463 + * + * @property + * def pts(self) -> list: # <<<<<<<<<<<<<< +@@ -7688,7 +7688,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_3pts___get__(struct __pyx_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":473 ++/* "wx/svg/_nanosvg.pyx":472 + * + * @property + * def npts(self) -> int: # <<<<<<<<<<<<<< +@@ -7720,14 +7720,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4npts___get__(struct __pyx + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":475 ++ /* "wx/svg/_nanosvg.pyx":474 + * 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, 475, __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))) { +@@ -7741,12 +7741,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, 475, __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":476 ++ /* "wx/svg/_nanosvg.pyx":475 + * """Number of points""" + * self._check_ptr() + * return self._ptr.npts # <<<<<<<<<<<<<< +@@ -7754,13 +7754,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, 476, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_ptr->npts); 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":473 ++ /* "wx/svg/_nanosvg.pyx":472 + * + * @property + * def npts(self) -> int: # <<<<<<<<<<<<<< +@@ -7781,7 +7781,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4npts___get__(struct __pyx + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":479 ++/* "wx/svg/_nanosvg.pyx":478 + * + * @property + * def points(self) -> list: # <<<<<<<<<<<<<< +@@ -7819,14 +7819,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":484 ++ /* "wx/svg/_nanosvg.pyx":483 + * 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, 484, __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, 483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -7840,12 +7840,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, 484, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __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":485 ++ /* "wx/svg/_nanosvg.pyx":484 + * """ + * self._check_ptr() + * return [(self._ptr.pts[i], self._ptr.pts[i+1]) # <<<<<<<<<<<<<< +@@ -7853,19 +7853,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, 485, __pyx_L1_error) ++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + +- /* "wx/svg/_nanosvg.pyx":486 ++ /* "wx/svg/_nanosvg.pyx":485 + * self._check_ptr() + * return [(self._ptr.pts[i], self._ptr.pts[i+1]) + * for i in range(0, self._ptr.npts*2, 2)] # <<<<<<<<<<<<<< + * + * @property + */ +- __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_self->_ptr->npts * 2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_self->_ptr->npts * 2)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) ++ __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); +@@ -7876,16 +7876,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, 486, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __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, 486, __pyx_L1_error) ++ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __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, 486, __pyx_L1_error) ++ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { +@@ -7893,17 +7893,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, 486, __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, 485, __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, 486, __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, 485, __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, 486, __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, 485, __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, 486, __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, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } +@@ -7913,7 +7913,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, 486, __pyx_L1_error) ++ else __PYX_ERR(0, 485, __pyx_L1_error) + } + break; + } +@@ -7922,23 +7922,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":485 ++ /* "wx/svg/_nanosvg.pyx":484 + * """ + * 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, 485, __pyx_L1_error) +- __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_t_6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error) ++ __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) ++ __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_t_6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __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, 485, __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, 484, __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, 485, __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, 484, __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, 485, __pyx_L1_error) ++ __pyx_t_7 = PyFloat_FromDouble((__pyx_v_self->_ptr->pts[__pyx_t_6])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); +- __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 485, __pyx_L1_error) ++ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2); +@@ -7946,10 +7946,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, 485, __pyx_L1_error) ++ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 484, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + +- /* "wx/svg/_nanosvg.pyx":486 ++ /* "wx/svg/_nanosvg.pyx":485 + * self._check_ptr() + * return [(self._ptr.pts[i], self._ptr.pts[i+1]) + * for i in range(0, self._ptr.npts*2, 2)] # <<<<<<<<<<<<<< +@@ -7962,7 +7962,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":479 ++ /* "wx/svg/_nanosvg.pyx":478 + * + * @property + * def points(self) -> list: # <<<<<<<<<<<<<< +@@ -7986,7 +7986,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6points___get__(struct __p + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":489 ++/* "wx/svg/_nanosvg.pyx":488 + * + * @property + * def closed(self) -> bool: # <<<<<<<<<<<<<< +@@ -8019,14 +8019,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6closed___get__(struct __p + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":491 ++ /* "wx/svg/_nanosvg.pyx":490 + * 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, 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, 490, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -8040,12 +8040,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, 491, __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":492 ++ /* "wx/svg/_nanosvg.pyx":491 + * """Flag indicating if shapes should be treated as closed""" + * self._check_ptr() + * return bool(self._ptr.closed) # <<<<<<<<<<<<<< +@@ -8053,17 +8053,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, 492, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->closed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __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, 492, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 491, __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, 492, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); 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":489 ++ /* "wx/svg/_nanosvg.pyx":488 + * + * @property + * def closed(self) -> bool: # <<<<<<<<<<<<<< +@@ -8084,7 +8084,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6closed___get__(struct __p + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":495 ++/* "wx/svg/_nanosvg.pyx":494 + * + * @property + * def bounds(self) -> list: # <<<<<<<<<<<<<< +@@ -8118,14 +8118,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6bounds___get__(struct __p + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":497 ++ /* "wx/svg/_nanosvg.pyx":496 + * 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, 497, __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, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -8139,12 +8139,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, 497, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __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":498 ++ /* "wx/svg/_nanosvg.pyx":497 + * """Tight bounding box of the shape [minx,miny,maxx,maxy]""" + * self._check_ptr() + * return [self._ptr.bounds[i] for i in range(4)] # <<<<<<<<<<<<<< +@@ -8152,20 +8152,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, 498, __pyx_L1_error) ++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __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, 498, __pyx_L1_error) ++ __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 498, __pyx_L1_error) ++ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 497, __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":495 ++ /* "wx/svg/_nanosvg.pyx":494 + * + * @property + * def bounds(self) -> list: # <<<<<<<<<<<<<< +@@ -8186,7 +8186,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_6bounds___get__(struct __p + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":501 ++/* "wx/svg/_nanosvg.pyx":500 + * + * @property + * def minx(self) -> float: # <<<<<<<<<<<<<< +@@ -8218,14 +8218,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4minx___get__(struct __pyx + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":502 ++ /* "wx/svg/_nanosvg.pyx":501 + * @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, 502, __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, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -8239,12 +8239,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, 502, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __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":503 ++ /* "wx/svg/_nanosvg.pyx":502 + * def minx(self) -> float: + * self._check_ptr() + * return self._ptr.bounds[0] # <<<<<<<<<<<<<< +@@ -8252,13 +8252,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, 503, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":501 ++ /* "wx/svg/_nanosvg.pyx":500 + * + * @property + * def minx(self) -> float: # <<<<<<<<<<<<<< +@@ -8279,7 +8279,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4minx___get__(struct __pyx + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":506 ++/* "wx/svg/_nanosvg.pyx":505 + * + * @property + * def miny(self) -> float: # <<<<<<<<<<<<<< +@@ -8311,14 +8311,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4miny___get__(struct __pyx + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":507 ++ /* "wx/svg/_nanosvg.pyx":506 + * @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, 507, __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, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -8332,12 +8332,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, 507, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __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":508 ++ /* "wx/svg/_nanosvg.pyx":507 + * def miny(self) -> float: + * self._check_ptr() + * return self._ptr.bounds[1] # <<<<<<<<<<<<<< +@@ -8345,13 +8345,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, 508, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[1])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":506 ++ /* "wx/svg/_nanosvg.pyx":505 + * + * @property + * def miny(self) -> float: # <<<<<<<<<<<<<< +@@ -8372,7 +8372,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4miny___get__(struct __pyx + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":511 ++/* "wx/svg/_nanosvg.pyx":510 + * + * @property + * def maxx(self) -> float: # <<<<<<<<<<<<<< +@@ -8404,14 +8404,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxx___get__(struct __pyx + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":512 ++ /* "wx/svg/_nanosvg.pyx":511 + * @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, 512, __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, 511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -8425,12 +8425,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, 512, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __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":513 ++ /* "wx/svg/_nanosvg.pyx":512 + * def maxx(self) -> float: + * self._check_ptr() + * return self._ptr.bounds[2] # <<<<<<<<<<<<<< +@@ -8438,13 +8438,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, 513, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[2])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":511 ++ /* "wx/svg/_nanosvg.pyx":510 + * + * @property + * def maxx(self) -> float: # <<<<<<<<<<<<<< +@@ -8465,7 +8465,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxx___get__(struct __pyx + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":516 ++/* "wx/svg/_nanosvg.pyx":515 + * + * @property + * def maxy(self) -> float: # <<<<<<<<<<<<<< +@@ -8497,14 +8497,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_4maxy___get__(struct __pyx + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":517 ++ /* "wx/svg/_nanosvg.pyx":516 + * @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, 517, __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, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -8518,12 +8518,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, 517, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __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":518 ++ /* "wx/svg/_nanosvg.pyx":517 + * def maxy(self) -> float: + * self._check_ptr() + * return self._ptr.bounds[3] # <<<<<<<<<<<<<< +@@ -8531,13 +8531,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, 518, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_ptr->bounds[3])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":516 ++ /* "wx/svg/_nanosvg.pyx":515 + * + * @property + * def maxy(self) -> float: # <<<<<<<<<<<<<< +@@ -8673,7 +8673,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_7SVGpath_8__setstate_cython__(CYTHO + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":530 ++/* "wx/svg/_nanosvg.pyx":529 + * cdef NSVGpaint *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -8702,7 +8702,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":531 ++ /* "wx/svg/_nanosvg.pyx":530 + * + * def __cinit__(self): + * self._ptr = NULL # <<<<<<<<<<<<<< +@@ -8711,7 +8711,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint___cinit__(struct __pyx_obj_2wx_ + */ + __pyx_v_self->_ptr = NULL; + +- /* "wx/svg/_nanosvg.pyx":530 ++ /* "wx/svg/_nanosvg.pyx":529 + * cdef NSVGpaint *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -8725,7 +8725,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint___cinit__(struct __pyx_obj_2wx_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":534 ++/* "wx/svg/_nanosvg.pyx":533 + * + * @staticmethod + * cdef SVGpaint from_ptr(NSVGpaint *ptr): # <<<<<<<<<<<<<< +@@ -8743,19 +8743,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *__pyx_f_2wx_3svg_8_nanosvg_ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":535 ++ /* "wx/svg/_nanosvg.pyx":534 + * @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, 535, __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, 534, __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":536 ++ /* "wx/svg/_nanosvg.pyx":535 + * cdef SVGpaint from_ptr(NSVGpaint *ptr): + * obj = SVGpaint() + * obj._ptr = ptr # <<<<<<<<<<<<<< +@@ -8764,7 +8764,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":537 ++ /* "wx/svg/_nanosvg.pyx":536 + * obj = SVGpaint() + * obj._ptr = ptr + * return obj # <<<<<<<<<<<<<< +@@ -8776,7 +8776,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":534 ++ /* "wx/svg/_nanosvg.pyx":533 + * + * @staticmethod + * cdef SVGpaint from_ptr(NSVGpaint *ptr): # <<<<<<<<<<<<<< +@@ -8796,7 +8796,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGpaint *__pyx_f_2wx_3svg_8_nanosvg_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":539 ++/* "wx/svg/_nanosvg.pyx":538 + * return obj + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -8828,7 +8828,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_check_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":540 ++ /* "wx/svg/_nanosvg.pyx":539 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -8838,20 +8838,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":541 ++ /* "wx/svg/_nanosvg.pyx":540 + * 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, 541, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __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, 541, __pyx_L1_error) ++ __PYX_ERR(0, 540, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":540 ++ /* "wx/svg/_nanosvg.pyx":539 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -8860,7 +8860,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ + */ + } + +- /* "wx/svg/_nanosvg.pyx":539 ++ /* "wx/svg/_nanosvg.pyx":538 + * return obj + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -8881,7 +8881,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_2_check_ptr(struct __pyx_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":544 ++/* "wx/svg/_nanosvg.pyx":543 + * + * @property + * def type(self) -> SVGpaintType: # <<<<<<<<<<<<<< +@@ -8914,14 +8914,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4type___get__(struct __py + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":546 ++ /* "wx/svg/_nanosvg.pyx":545 + * 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, 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, 545, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -8935,12 +8935,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, 546, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __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":546 + * """Flag indicating the type of paint info, solid color or type of gradient""" + * self._check_ptr() + * return SVGpaintType(self._ptr.type) # <<<<<<<<<<<<<< +@@ -8948,9 +8948,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, 547, __pyx_L1_error) ++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SVGpaintType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __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, 547, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { +@@ -8965,14 +8965,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, 547, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":544 ++ /* "wx/svg/_nanosvg.pyx":543 + * + * @property + * def type(self) -> SVGpaintType: # <<<<<<<<<<<<<< +@@ -8994,7 +8994,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_4type___get__(struct __py + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":550 ++/* "wx/svg/_nanosvg.pyx":549 + * + * @property + * def color(self) -> uint: # <<<<<<<<<<<<<< +@@ -9027,14 +9027,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":551 ++ /* "wx/svg/_nanosvg.pyx":550 + * @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, 551, __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))) { +@@ -9048,43 +9048,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, 551, __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":552 ++ /* "wx/svg/_nanosvg.pyx":551 + * 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, 552, __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_COLOR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __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, 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, 552, __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_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, 552, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 551, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(__pyx_t_4)) { + +- /* "wx/svg/_nanosvg.pyx":553 ++ /* "wx/svg/_nanosvg.pyx":552 + * 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, 553, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __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, 553, __pyx_L1_error) ++ __PYX_ERR(0, 552, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":552 ++ /* "wx/svg/_nanosvg.pyx":551 + * def color(self) -> uint: + * self._check_ptr() + * if self.type != SVG_PAINT_COLOR: # <<<<<<<<<<<<<< +@@ -9093,7 +9093,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p + */ + } + +- /* "wx/svg/_nanosvg.pyx":554 ++ /* "wx/svg/_nanosvg.pyx":553 + * if self.type != SVG_PAINT_COLOR: + * raise ValueError("Color not valid in this paint object") + * return self._ptr.color # <<<<<<<<<<<<<< +@@ -9101,13 +9101,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, 554, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_ptr->color); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":550 ++ /* "wx/svg/_nanosvg.pyx":549 + * + * @property + * def color(self) -> uint: # <<<<<<<<<<<<<< +@@ -9128,7 +9128,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_5color___get__(struct __p + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":557 ++/* "wx/svg/_nanosvg.pyx":556 + * + * @property + * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< +@@ -9163,19 +9163,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_10color_rgba___get__(stru + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":559 ++ /* "wx/svg/_nanosvg.pyx":558 + * 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, 559, __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, 558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_c = __pyx_t_1; + __pyx_t_1 = 0; + +- /* "wx/svg/_nanosvg.pyx":560 ++ /* "wx/svg/_nanosvg.pyx":559 + * """Returns color as a RGBA tuple""" + * c = self.color + * return ( c & 0xff, # <<<<<<<<<<<<<< +@@ -9183,56 +9183,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, 560, __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, 559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + +- /* "wx/svg/_nanosvg.pyx":561 ++ /* "wx/svg/_nanosvg.pyx":560 + * 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, 561, __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, 560, __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, 561, __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, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "wx/svg/_nanosvg.pyx":562 ++ /* "wx/svg/_nanosvg.pyx":561 + * 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, 562, __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, 561, __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, 562, __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, 561, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "wx/svg/_nanosvg.pyx":563 ++ /* "wx/svg/_nanosvg.pyx":562 + * (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, 563, __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, 562, __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, 563, __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, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "wx/svg/_nanosvg.pyx":560 ++ /* "wx/svg/_nanosvg.pyx":559 + * """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, 560, __pyx_L1_error) ++ __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); +@@ -9250,7 +9250,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":557 ++ /* "wx/svg/_nanosvg.pyx":556 + * + * @property + * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< +@@ -9274,7 +9274,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_10color_rgba___get__(stru + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":566 ++/* "wx/svg/_nanosvg.pyx":565 + * + * @property + * def gradient(self) -> SVGgradient: # <<<<<<<<<<<<<< +@@ -9308,14 +9308,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_8gradient___get__(struct + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":567 ++ /* "wx/svg/_nanosvg.pyx":566 + * @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, 567, __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, 566, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -9329,36 +9329,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, 567, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __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":568 ++ /* "wx/svg/_nanosvg.pyx":567 + * 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, 568, __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, 567, __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, 568, __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, 567, __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, 568, __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, 567, __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, 568, __pyx_L1_error) ++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 567, __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, 568, __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, 567, __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, 568, __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, 567, __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, 568, __pyx_L1_error) ++ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 567, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_t_5; + __pyx_L4_bool_binop_done:; +@@ -9366,20 +9366,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":569 ++ /* "wx/svg/_nanosvg.pyx":568 + * 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, 569, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 568, __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, 569, __pyx_L1_error) ++ __PYX_ERR(0, 568, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":568 ++ /* "wx/svg/_nanosvg.pyx":567 + * def gradient(self) -> SVGgradient: + * self._check_ptr() + * if self.type not in [SVG_PAINT_LINEAR_GRADIENT, SVG_PAINT_RADIAL_GRADIENT]: # <<<<<<<<<<<<<< +@@ -9388,7 +9388,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_8gradient___get__(struct + */ + } + +- /* "wx/svg/_nanosvg.pyx":570 ++ /* "wx/svg/_nanosvg.pyx":569 + * 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) # <<<<<<<<<<<<<< +@@ -9396,13 +9396,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, 570, __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, 569, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":566 ++ /* "wx/svg/_nanosvg.pyx":565 + * + * @property + * def gradient(self) -> SVGgradient: # <<<<<<<<<<<<<< +@@ -9538,7 +9538,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_8SVGpaint_6__setstate_cython__(CYTH + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":581 ++/* "wx/svg/_nanosvg.pyx":580 + * cdef NSVGgradient *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -9567,7 +9567,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient___cinit__(struct __pyx_obj_ + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + +- /* "wx/svg/_nanosvg.pyx":582 ++ /* "wx/svg/_nanosvg.pyx":581 + * + * def __cinit__(self): + * self._ptr = NULL # <<<<<<<<<<<<<< +@@ -9576,7 +9576,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient___cinit__(struct __pyx_obj_ + */ + __pyx_v_self->_ptr = NULL; + +- /* "wx/svg/_nanosvg.pyx":581 ++ /* "wx/svg/_nanosvg.pyx":580 + * cdef NSVGgradient *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -9590,7 +9590,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient___cinit__(struct __pyx_obj_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":585 ++/* "wx/svg/_nanosvg.pyx":584 + * + * @staticmethod + * cdef SVGgradient from_ptr(NSVGgradient *ptr): # <<<<<<<<<<<<<< +@@ -9608,19 +9608,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *__pyx_f_2wx_3svg_8_nanos + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":586 ++ /* "wx/svg/_nanosvg.pyx":585 + * @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, 586, __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, 585, __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":587 ++ /* "wx/svg/_nanosvg.pyx":586 + * cdef SVGgradient from_ptr(NSVGgradient *ptr): + * obj = SVGgradient() + * obj._ptr = ptr # <<<<<<<<<<<<<< +@@ -9629,7 +9629,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":588 ++ /* "wx/svg/_nanosvg.pyx":587 + * obj = SVGgradient() + * obj._ptr = ptr + * return obj # <<<<<<<<<<<<<< +@@ -9641,7 +9641,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":585 ++ /* "wx/svg/_nanosvg.pyx":584 + * + * @staticmethod + * cdef SVGgradient from_ptr(NSVGgradient *ptr): # <<<<<<<<<<<<<< +@@ -9661,7 +9661,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradient *__pyx_f_2wx_3svg_8_nanos + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":590 ++/* "wx/svg/_nanosvg.pyx":589 + * return obj + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -9693,7 +9693,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_check_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":591 ++ /* "wx/svg/_nanosvg.pyx":590 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -9703,20 +9703,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":592 ++ /* "wx/svg/_nanosvg.pyx":591 + * 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, 592, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __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, 592, __pyx_L1_error) ++ __PYX_ERR(0, 591, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":591 ++ /* "wx/svg/_nanosvg.pyx":590 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -9725,7 +9725,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ + */ + } + +- /* "wx/svg/_nanosvg.pyx":590 ++ /* "wx/svg/_nanosvg.pyx":589 + * return obj + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -9746,7 +9746,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2_check_ptr(struct __ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":595 ++/* "wx/svg/_nanosvg.pyx":594 + * + * @property + * def xform(self) -> list: # <<<<<<<<<<<<<< +@@ -9780,14 +9780,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5xform___get__(struct + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":597 ++ /* "wx/svg/_nanosvg.pyx":596 + * 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, 597, __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, 596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -9801,12 +9801,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, 597, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __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":598 ++ /* "wx/svg/_nanosvg.pyx":597 + * """The gradient's transform""" + * self._check_ptr() + * return [self._ptr.xform[i] for i in range(6)] # <<<<<<<<<<<<<< +@@ -9814,20 +9814,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, 598, __pyx_L1_error) ++ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __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, 598, __pyx_L1_error) ++ __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->_ptr->xform[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 598, __pyx_L1_error) ++ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 597, __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":595 ++ /* "wx/svg/_nanosvg.pyx":594 + * + * @property + * def xform(self) -> list: # <<<<<<<<<<<<<< +@@ -9848,7 +9848,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_5xform___get__(struct + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":601 ++/* "wx/svg/_nanosvg.pyx":600 + * + * @property + * def spread(self) -> int: # <<<<<<<<<<<<<< +@@ -9880,14 +9880,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6spread___get__(struc + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":602 ++ /* "wx/svg/_nanosvg.pyx":601 + * @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, 602, __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, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -9901,12 +9901,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, 602, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __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":603 ++ /* "wx/svg/_nanosvg.pyx":602 + * def spread(self) -> int: + * self._check_ptr() + * return int(self._ptr.spread) # <<<<<<<<<<<<<< +@@ -9914,16 +9914,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, 603, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->_ptr->spread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __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, 603, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __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":601 ++ /* "wx/svg/_nanosvg.pyx":600 + * + * @property + * def spread(self) -> int: # <<<<<<<<<<<<<< +@@ -9944,7 +9944,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6spread___get__(struc + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":606 ++/* "wx/svg/_nanosvg.pyx":605 + * + * @property + * def fx(self) -> float: # <<<<<<<<<<<<<< +@@ -9976,14 +9976,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fx___get__(struct __ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":607 ++ /* "wx/svg/_nanosvg.pyx":606 + * @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, 607, __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, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -9997,12 +9997,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, 607, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __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":608 ++ /* "wx/svg/_nanosvg.pyx":607 + * def fx(self) -> float: + * self._check_ptr() + * return self._ptr.fx # <<<<<<<<<<<<<< +@@ -10010,13 +10010,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, 608, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->fx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":606 ++ /* "wx/svg/_nanosvg.pyx":605 + * + * @property + * def fx(self) -> float: # <<<<<<<<<<<<<< +@@ -10037,7 +10037,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fx___get__(struct __ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":611 ++/* "wx/svg/_nanosvg.pyx":610 + * + * @property + * def fy(self) -> float: # <<<<<<<<<<<<<< +@@ -10069,14 +10069,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_2fy___get__(struct __ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":612 ++ /* "wx/svg/_nanosvg.pyx":611 + * @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, 612, __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, 611, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -10090,12 +10090,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, 612, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __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":613 ++ /* "wx/svg/_nanosvg.pyx":612 + * def fy(self) -> float: + * self._check_ptr() + * return self._ptr.fy # <<<<<<<<<<<<<< +@@ -10103,13 +10103,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, 613, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->fy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":611 ++ /* "wx/svg/_nanosvg.pyx":610 + * + * @property + * def fy(self) -> float: # <<<<<<<<<<<<<< +@@ -10131,7 +10131,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":616 ++/* "wx/svg/_nanosvg.pyx":615 + * + * @property + * def stops(self): # <<<<<<<<<<<<<< +@@ -10164,7 +10164,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, 616, __pyx_L1_error) ++ __PYX_ERR(0, 615, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } +@@ -10172,7 +10172,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, 616, __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, 615, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; +@@ -10211,16 +10211,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, 616, __pyx_L1_error) ++ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 615, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":620 ++ /* "wx/svg/_nanosvg.pyx":619 + * A generator that iterates over the :class:`SVGgradientStop` objects contained in the SVGgradient + * """ + * self._check_ptr() # <<<<<<<<<<<<<< + * for i in range(self._ptr.nstops): + * yield SVGgradientStop.from_ptr(&self._ptr.stops[i]) + */ +- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_check_ptr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __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, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -10234,12 +10234,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, 620, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __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":621 ++ /* "wx/svg/_nanosvg.pyx":620 + * """ + * self._check_ptr() + * for i in range(self._ptr.nstops): # <<<<<<<<<<<<<< +@@ -10251,14 +10251,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":622 ++ /* "wx/svg/_nanosvg.pyx":621 + * 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, 622, __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, 621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; +@@ -10275,11 +10275,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, 622, __pyx_L1_error) ++ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 621, __pyx_L1_error) + } + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + +- /* "wx/svg/_nanosvg.pyx":616 ++ /* "wx/svg/_nanosvg.pyx":615 + * + * @property + * def stops(self): # <<<<<<<<<<<<<< +@@ -10421,7 +10421,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_11SVGgradient_6__setstate_cython__( + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":632 ++/* "wx/svg/_nanosvg.pyx":631 + * cdef NSVGgradientStop *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -10450,7 +10450,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop___cinit__(struct __pyx_ + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + +- /* "wx/svg/_nanosvg.pyx":633 ++ /* "wx/svg/_nanosvg.pyx":632 + * + * def __cinit__(self): + * self._ptr = NULL # <<<<<<<<<<<<<< +@@ -10459,7 +10459,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop___cinit__(struct __pyx_ + */ + __pyx_v_self->_ptr = NULL; + +- /* "wx/svg/_nanosvg.pyx":632 ++ /* "wx/svg/_nanosvg.pyx":631 + * cdef NSVGgradientStop *_ptr + * + * def __cinit__(self): # <<<<<<<<<<<<<< +@@ -10473,7 +10473,7 @@ static int __pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop___cinit__(struct __pyx_ + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":636 ++/* "wx/svg/_nanosvg.pyx":635 + * + * @staticmethod + * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): # <<<<<<<<<<<<<< +@@ -10491,19 +10491,19 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *__pyx_f_2wx_3svg_8_n + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("from_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":637 ++ /* "wx/svg/_nanosvg.pyx":636 + * @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, 637, __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, 636, __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":638 ++ /* "wx/svg/_nanosvg.pyx":637 + * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): + * obj = SVGgradientStop() + * obj._ptr = ptr # <<<<<<<<<<<<<< +@@ -10512,7 +10512,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":639 ++ /* "wx/svg/_nanosvg.pyx":638 + * obj = SVGgradientStop() + * obj._ptr = ptr + * return obj # <<<<<<<<<<<<<< +@@ -10524,7 +10524,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":636 ++ /* "wx/svg/_nanosvg.pyx":635 + * + * @staticmethod + * cdef SVGgradientStop from_ptr(NSVGgradientStop *ptr): # <<<<<<<<<<<<<< +@@ -10544,7 +10544,7 @@ static struct __pyx_obj_2wx_3svg_8_nanosvg_SVGgradientStop *__pyx_f_2wx_3svg_8_n + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":641 ++/* "wx/svg/_nanosvg.pyx":640 + * return obj + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -10576,7 +10576,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("_check_ptr", 0); + +- /* "wx/svg/_nanosvg.pyx":642 ++ /* "wx/svg/_nanosvg.pyx":641 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -10586,20 +10586,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":643 ++ /* "wx/svg/_nanosvg.pyx":642 + * 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, 643, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __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, 643, __pyx_L1_error) ++ __PYX_ERR(0, 642, __pyx_L1_error) + +- /* "wx/svg/_nanosvg.pyx":642 ++ /* "wx/svg/_nanosvg.pyx":641 + * + * def _check_ptr(self): + * if self._ptr == NULL: # <<<<<<<<<<<<<< +@@ -10608,7 +10608,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc + */ + } + +- /* "wx/svg/_nanosvg.pyx":641 ++ /* "wx/svg/_nanosvg.pyx":640 + * return obj + * + * def _check_ptr(self): # <<<<<<<<<<<<<< +@@ -10629,7 +10629,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_2_check_ptr(struc + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":646 ++/* "wx/svg/_nanosvg.pyx":645 + * + * @property + * def color(self) -> uint: # <<<<<<<<<<<<<< +@@ -10661,14 +10661,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_5color___get__(st + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":647 ++ /* "wx/svg/_nanosvg.pyx":646 + * @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, 647, __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, 646, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -10682,12 +10682,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, 647, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __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":648 ++ /* "wx/svg/_nanosvg.pyx":647 + * def color(self) -> uint: + * self._check_ptr() + * return self._ptr.color # <<<<<<<<<<<<<< +@@ -10695,13 +10695,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, 648, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_ptr->color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":646 ++ /* "wx/svg/_nanosvg.pyx":645 + * + * @property + * def color(self) -> uint: # <<<<<<<<<<<<<< +@@ -10722,7 +10722,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_5color___get__(st + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":651 ++/* "wx/svg/_nanosvg.pyx":650 + * + * @property + * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< +@@ -10757,19 +10757,19 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":653 ++ /* "wx/svg/_nanosvg.pyx":652 + * 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, 653, __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, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_c = __pyx_t_1; + __pyx_t_1 = 0; + +- /* "wx/svg/_nanosvg.pyx":654 ++ /* "wx/svg/_nanosvg.pyx":653 + * """ Returns color as a RGBA tuple """ + * c = self.color + * return ( c & 0xff, # <<<<<<<<<<<<<< +@@ -10777,56 +10777,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, 654, __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, 653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + +- /* "wx/svg/_nanosvg.pyx":655 ++ /* "wx/svg/_nanosvg.pyx":654 + * 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, 655, __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, 654, __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, 655, __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, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "wx/svg/_nanosvg.pyx":656 ++ /* "wx/svg/_nanosvg.pyx":655 + * 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, 656, __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, 655, __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, 656, __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, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "wx/svg/_nanosvg.pyx":657 ++ /* "wx/svg/_nanosvg.pyx":656 + * (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, 657, __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, 656, __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, 657, __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, 656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "wx/svg/_nanosvg.pyx":654 ++ /* "wx/svg/_nanosvg.pyx":653 + * """ 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, 654, __pyx_L1_error) ++ __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); +@@ -10844,7 +10844,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge + __pyx_t_2 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":651 ++ /* "wx/svg/_nanosvg.pyx":650 + * + * @property + * def color_rgba(self) -> tuple: # <<<<<<<<<<<<<< +@@ -10868,7 +10868,7 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_10color_rgba___ge + return __pyx_r; + } + +-/* "wx/svg/_nanosvg.pyx":660 ++/* "wx/svg/_nanosvg.pyx":659 + * + * @property + * def offset(self) -> float: # <<<<<<<<<<<<<< +@@ -10900,14 +10900,14 @@ static PyObject *__pyx_pf_2wx_3svg_8_nanosvg_15SVGgradientStop_6offset___get__(s + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "wx/svg/_nanosvg.pyx":661 ++ /* "wx/svg/_nanosvg.pyx":660 + * @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, 661, __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, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -10921,12 +10921,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, 661, __pyx_L1_error) ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __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":662 ++ /* "wx/svg/_nanosvg.pyx":661 + * def offset(self) -> float: + * self._check_ptr() + * return self._ptr.offset # <<<<<<<<<<<<<< +@@ -10934,13 +10934,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, 662, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->_ptr->offset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "wx/svg/_nanosvg.pyx":660 ++ /* "wx/svg/_nanosvg.pyx":659 + * + * @property + * def offset(self) -> float: # <<<<<<<<<<<<<< +@@ -14180,9 +14180,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { + {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, 113, __pyx_L1_error) ++ __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 112, __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, 365, __pyx_L1_error) ++ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 364, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +@@ -14192,47 +14192,47 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + +- /* "wx/svg/_nanosvg.pyx":113 ++ /* "wx/svg/_nanosvg.pyx":112 + * 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, 113, __pyx_L1_error) ++ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_SVG_not_yet_loaded); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + +- /* "wx/svg/_nanosvg.pyx":223 ++ /* "wx/svg/_nanosvg.pyx":222 + * + * 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, 223, __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, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + +- /* "wx/svg/_nanosvg.pyx":227 ++ /* "wx/svg/_nanosvg.pyx":226 + * cdef Py_buffer view + * if PyObject_GetBuffer(buf, &view, PyBUF_SIMPLE) != 0: + * raise ValueError("PyObject_GetBuffer failed") # <<<<<<<<<<<<<< + * if view.len < height * stride: + * PyBuffer_Release(&view) + */ +- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_PyObject_GetBuffer_failed); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 227, __pyx_L1_error) ++ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_PyObject_GetBuffer_failed); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + +- /* "wx/svg/_nanosvg.pyx":230 ++ /* "wx/svg/_nanosvg.pyx":229 + * 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, 230, __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, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + +@@ -14255,14 +14255,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); + +- /* "wx/svg/_nanosvg.pyx":310 ++ /* "wx/svg/_nanosvg.pyx":309 + * 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, 310, __pyx_L1_error) ++ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGshape); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + +@@ -14285,14 +14285,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + +- /* "wx/svg/_nanosvg.pyx":455 ++ /* "wx/svg/_nanosvg.pyx":454 + * 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, 455, __pyx_L1_error) ++ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGpath); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 454, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + +@@ -14315,36 +14315,36 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + +- /* "wx/svg/_nanosvg.pyx":541 ++ /* "wx/svg/_nanosvg.pyx":540 + * 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, 541, __pyx_L1_error) ++ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGpaint); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 540, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + +- /* "wx/svg/_nanosvg.pyx":553 ++ /* "wx/svg/_nanosvg.pyx":552 + * 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, 553, __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, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + +- /* "wx/svg/_nanosvg.pyx":569 ++ /* "wx/svg/_nanosvg.pyx":568 + * 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, 569, __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, 568, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + +@@ -14367,14 +14367,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + +- /* "wx/svg/_nanosvg.pyx":592 ++ /* "wx/svg/_nanosvg.pyx":591 + * 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, 592, __pyx_L1_error) ++ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGgradient); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 591, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + +@@ -14397,14 +14397,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); + +- /* "wx/svg/_nanosvg.pyx":643 ++ /* "wx/svg/_nanosvg.pyx":642 + * 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, 643, __pyx_L1_error) ++ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Invalid_SVGgradientStop); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 642, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + +@@ -14549,83 +14549,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, 87, __pyx_L1_error) ++ if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 86, __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, 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) ++ if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 86, __pyx_L1_error) ++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGimageBase, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 86, __pyx_L1_error) ++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGimageBase) < 0) __PYX_ERR(0, 86, __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, 297, __pyx_L1_error) ++ if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 296, __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, 297, __pyx_L1_error) +- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGshape, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 297, __pyx_L1_error) +- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 297, __pyx_L1_error) ++ if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGshape.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 296, __pyx_L1_error) ++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGshape, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 296, __pyx_L1_error) ++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGshape) < 0) __PYX_ERR(0, 296, __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, 436, __pyx_L1_error) ++ if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 435, __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, 436, __pyx_L1_error) +- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpath, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 436, __pyx_L1_error) +- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 436, __pyx_L1_error) ++ if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGpath.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 435, __pyx_L1_error) ++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpath, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 435, __pyx_L1_error) ++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpath) < 0) __PYX_ERR(0, 435, __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, 522, __pyx_L1_error) ++ if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 521, __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, 522, __pyx_L1_error) +- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpaint, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 522, __pyx_L1_error) +- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 522, __pyx_L1_error) ++ if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGpaint.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 521, __pyx_L1_error) ++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGpaint, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 521, __pyx_L1_error) ++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGpaint) < 0) __PYX_ERR(0, 521, __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, 574, __pyx_L1_error) ++ if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 573, __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, 574, __pyx_L1_error) +- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradient, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 574, __pyx_L1_error) +- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 574, __pyx_L1_error) ++ if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGgradient.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 573, __pyx_L1_error) ++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradient, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 573, __pyx_L1_error) ++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradient) < 0) __PYX_ERR(0, 573, __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, 626, __pyx_L1_error) ++ if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 625, __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, 626, __pyx_L1_error) +- if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradientStop, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 626, __pyx_L1_error) +- if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 626, __pyx_L1_error) ++ if (__Pyx_SetVtable(__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop.tp_dict, __pyx_vtabptr_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 625, __pyx_L1_error) ++ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SVGgradientStop, (PyObject *)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 625, __pyx_L1_error) ++ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_2wx_3svg_8_nanosvg_SVGgradientStop) < 0) __PYX_ERR(0, 625, __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, 284, __pyx_L1_error) ++ if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__) < 0) __PYX_ERR(0, 283, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct____get__.tp_print = 0; + #endif +@@ -14633,7 +14633,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, 424, __pyx_L1_error) ++ if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__) < 0) __PYX_ERR(0, 423, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_1___get__.tp_print = 0; + #endif +@@ -14641,7 +14641,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, 616, __pyx_L1_error) ++ if (PyType_Ready(&__pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__) < 0) __PYX_ERR(0, 615, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_2wx_3svg_8_nanosvg___pyx_scope_struct_2___get__.tp_print = 0; + #endif +@@ -14900,79 +14900,79 @@ if (!__Pyx_RefNanny) { + * + * import sys # <<<<<<<<<<<<<< + * +- * cimport cython.object ++ * from cpython.buffer cimport ( + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + 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":50 ++ /* "wx/svg/_nanosvg.pyx":49 + * 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_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __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_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __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_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, 49, __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_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_1, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __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) ++ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PY2, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "wx/svg/_nanosvg.pyx":134 ++ /* "wx/svg/_nanosvg.pyx":133 + * + * @classmethod + * def CreateFromFile(cls, str filename, str units='px', float dpi=96): # <<<<<<<<<<<<<< + * """ + * Loads an SVG image from a file. + */ +- __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_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase, __pyx_n_s_CreateFromFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + +- /* "wx/svg/_nanosvg.pyx":133 ++ /* "wx/svg/_nanosvg.pyx":132 + * + * + * @classmethod # <<<<<<<<<<<<<< + * def CreateFromFile(cls, str filename, str units='px', float dpi=96): + * """ + */ +- __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __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) ++ if (PyDict_SetItem((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase->tp_dict, __pyx_n_s_CreateFromFile, __pyx_t_1) < 0) __PYX_ERR(0, 133, __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":153 ++ /* "wx/svg/_nanosvg.pyx":152 + * + * @classmethod + * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96, bint do_copy=True): # <<<<<<<<<<<<<< + * """ + * Loads an SVG image from a bytes object. + */ +- __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_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase, __pyx_n_s_CreateFromBytes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + +- /* "wx/svg/_nanosvg.pyx":152 ++ /* "wx/svg/_nanosvg.pyx":151 + * + * + * @classmethod # <<<<<<<<<<<<<< + * def CreateFromBytes(cls, bytes buffer, str units='px', float dpi=96, bint do_copy=True): + * """ + */ +- __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __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) ++ if (PyDict_SetItem((PyObject *)__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase->tp_dict, __pyx_n_s_CreateFromBytes, __pyx_t_2) < 0) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + PyType_Modified(__pyx_ptype_2wx_3svg_8_nanosvg_SVGimageBase); + +diff --git a/wx/svg/_nanosvg.pyx b/wx/svg/_nanosvg.pyx +index cda04d5ca..d1cae1aa9 100644 +--- a/wx/svg/_nanosvg.pyx ++++ b/wx/svg/_nanosvg.pyx +@@ -42,7 +42,6 @@ for manipulating the SVG shape info in memory. + + import sys + +-cimport cython.object + from cpython.buffer cimport ( + Py_buffer, PyObject_CheckBuffer, PyObject_GetBuffer, PyBUF_SIMPLE, + PyBuffer_Release) diff --git a/lang-python/wxpython/autobuild/prepare b/lang-python/wxpython/autobuild/prepare deleted file mode 100644 index 896b1ddf1f7..00000000000 --- a/lang-python/wxpython/autobuild/prepare +++ /dev/null @@ -1,7 +0,0 @@ -for i in $(find "$SRCDIR" -name config.guess -o -name config.sub); do \ - abinfo "Copying replacement $i ..." - # FIXME: hard-coded automake version. - # Adapted from redhat-rpm-config. - # http://pkgs.fedoraproject.org/cgit/rpms/redhat-rpm-config.git/tree/macros#n35 - cp -v /usr/share/automake-1.16/$(basename $i) $i ; \ -done diff --git a/lang-python/wxpython/spec b/lang-python/wxpython/spec index e93ba3e502c..49c3e57b653 100644 --- a/lang-python/wxpython/spec +++ b/lang-python/wxpython/spec @@ -1,5 +1,4 @@ -VER=3.0.2.0 -REL=10 -SRCS="tbl::https://downloads.sourceforge.net/wxpython/wxPython-src-$VER.tar.bz2" -CHKSUMS="sha256::d54129e5fbea4fb8091c87b2980760b72c22a386cb3b9dd2eebc928ef5e8df61" -CHKUPDATE="anitya::id=5596" +VER=4.2.1 +SRCS="tbl::https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-$VER.tar.gz" +CHKSUMS="sha256::e48de211a6606bf072ec3fa778771d6b746c00b7f4b970eb58728ddf56d13d5c" +CHKUPDATE="anitya::id=16928" diff --git a/meta-bases/wx-base/autobuild/build b/meta-bases/wx-base/autobuild/build deleted file mode 100644 index b0716e2a2ab..00000000000 --- a/meta-bases/wx-base/autobuild/build +++ /dev/null @@ -1 +0,0 @@ -mkdir "$PKGDIR" diff --git a/meta-bases/wx-base/autobuild/defines b/meta-bases/wx-base/autobuild/defines index 408ed83c0d7..e712e1918b0 100644 --- a/meta-bases/wx-base/autobuild/defines +++ b/meta-bases/wx-base/autobuild/defines @@ -1,7 +1,8 @@ PKGNAME=wx-base PKGSEC=Bases -PKGDEP="wxgtk wxgtk2 wxgtk3 wxpython" +PKGDEP="wxgtk3 wxpython" PKGDES="Meta package for AOSC OS WxWidgets runtime support" VER_NONE=1 +ABTYPE=dummy ABHOST=noarch diff --git a/meta-bases/wx-base/spec b/meta-bases/wx-base/spec index a327ebac529..90033f6dc65 100644 --- a/meta-bases/wx-base/spec +++ b/meta-bases/wx-base/spec @@ -1,2 +1,2 @@ -VER=1 +VER=2 DUMMYSRC=1 diff --git a/runtime-common/rlwrap/autobuild/prepare b/runtime-common/rlwrap/autobuild/prepare new file mode 100644 index 00000000000..0a49185f6c8 --- /dev/null +++ b/runtime-common/rlwrap/autobuild/prepare @@ -0,0 +1,3 @@ +# FIXME: pod2man could not be found in $PATH +abinfo "Adding /usr/bin/core_perl to PATH ..." +export PATH="$PATH:/usr/bin/core_perl" diff --git a/runtime-common/rlwrap/spec b/runtime-common/rlwrap/spec index a1b3cd5e747..4c115a7bfa6 100644 --- a/runtime-common/rlwrap/spec +++ b/runtime-common/rlwrap/spec @@ -1,5 +1,5 @@ VER=0.43 -REL=2 +REL=3 SRCS="tbl::https://github.com/hanslub42/rlwrap/archive/v$VER.tar.gz" CHKSUMS="sha256::29e5a850fbe4753f353b0734e46ec0da043621bdcf7b52a89b77517f3941aade" CHKUPDATE="anitya::id=4199" diff --git a/runtime-cryptography/gnutls/autobuild/defines b/runtime-cryptography/gnutls/autobuild/defines index 2d1863f0c6b..84c2b11f33e 100644 --- a/runtime-cryptography/gnutls/autobuild/defines +++ b/runtime-cryptography/gnutls/autobuild/defines @@ -1,11 +1,10 @@ PKGNAME=gnutls PKGDES="Library that provides a secure layer over a reliable transport layer" -PKGDEP="autogen nettle readline libtasn1 p11-kit unbound" -PKGDEP__AMD64="${PKGDEP} trousers" +PKGDEP="gmp nettle libtasn1 p11-kit unbound libidn2 zlib brotli zstd" BUILDDEP="gtk-doc gperf texinfo" PKGSEC=libs -PKGDEP__RETRO="nettle readline libtasn1" +PKGDEP__RETRO="gmp nettle libtasn1" PKGDEP__ARMV4="${PKGDEP__RETRO}" PKGDEP__ARMV6HF="${PKGDEP__RETRO}" PKGDEP__ARMV7HF="${PKGDEP__RETRO}" @@ -15,21 +14,29 @@ PKGDEP__M68K="${PKGDEP__RETRO}" PKGDEP__POWERPC="${PKGDEP__RETRO}" PKGDEP__PPC64="${PKGDEP__RETRO}" BUILDDEP__RETRO="gperf" -BUILDDEP__ARMV4="$BUILDDEP__RETRO" -BUILDDEP__ARMV6HF="$BUILDDEP__RETRO" +BUILDDEP__ARMV4="${BUILDDEP__RETRO}" +BUILDDEP__ARMV6HF="${BUILDDEP__RETRO}" BUILDDEP__ARMV7HF="${BUILDDEP__RETRO}" BUILDDEP__I486="${BUILDDEP__RETRO}" BUILDDEP__LOONGSON2F="${BUILDDEP__RETRO}" BUILDDEP__M68K="${BUILDDEP__RETRO}" -BUILDDEP__POWERPC="$BUILDDEP__RETRO" -BUILDDEP__PPC64="$BUILDDEP__RETRO" +BUILDDEP__POWERPC="${BUILDDEP__RETRO}" +BUILDDEP__PPC64="${BUILDDEP__RETRO}" -AUTOTOOLS_AFTER="--disable-guile --without-idn \ - --with-default-trust-store-pkcs11=pkcs11:model=p11-kit-trust;manufacturer=PKCS%2311%20Kit" -AUTOTOOLS_AFTER__AMD64="${AUTOTOOLS_AFTER} --with-tpm" +ABTYPE=autotools +AUTOTOOLS_AFTER="PYTHON=/usr/bin/python3 \ + --enable-shared \ + --enable-ktls \ + --with-unbound-root-key-file=/etc/trusted-key.key \ + --enable-libdane \ + --with-trousers-lib=/usr/lib/libtspi.so.1 \ + --with-zlib \ + --with-brotli \ + --with-zstd" AUTOTOOLS_AFTER__RETRO=" \ - --disable-guile --without-idn \ + PYTHON=/usr/bin/python3 \ + --enable-shared \ --without-idn --without-p11-kit \ --enable-local-libopts --disable-libopts-install \ --disable-libdane --disable-tools" @@ -43,7 +50,5 @@ AUTOTOOLS_AFTER__POWERPC="${AUTOTOOLS_AFTER__RETRO}" AUTOTOOLS_AFTER__PPC64="${AUTOTOOLS_AFTER__RETRO}" AB_FLAGS_O3=1 -ABSHADOW=0 -NOPARALLEL=1 RECONF=0 diff --git a/runtime-cryptography/gnutls/autobuild/defines.stage2 b/runtime-cryptography/gnutls/autobuild/defines.stage2 index 95fe3592529..06febe31734 100644 --- a/runtime-cryptography/gnutls/autobuild/defines.stage2 +++ b/runtime-cryptography/gnutls/autobuild/defines.stage2 @@ -2,39 +2,14 @@ PKGNAME=gnutls PKGDES="Library that provides a secure layer over a reliable transport layer" PKGSEC=libs -PKGDEP="nettle readline libtasn1" -PKGDEP__ARMV4="${PKGDEP__RETRO}" -PKGDEP__ARMV6HF="${PKGDEP__RETRO}" -PKGDEP__ARMV7HF="${PKGDEP__RETRO}" -PKGDEP__I486="${PKGDEP__RETRO}" -PKGDEP__LOONGSON2F="${PKGDEP__RETRO}" -PKGDEP__POWERPC="${PKGDEP__RETRO}" -PKGDEP__PPC64="${PKGDEP__RETRO}" +PKGDEP="gmp nettle readline libtasn1" BUILDDEP="gperf" -BUILDDEP__ARMV4="$BUILDDEP__RETRO" -BUILDDEP__ARMV6HF="$BUILDDEP__RETRO" -BUILDDEP__ARMV7HF="${BUILDDEP__RETRO}" -BUILDDEP__I486="${BUILDDEP__RETRO}" -BUILDDEP__LOONGSON2F="${BUILDDEP__RETRO}" -BUILDDEP__POWERPC="$BUILDDEP__RETRO" -BUILDDEP__PPC64="$BUILDDEP__RETRO" -AUTOTOOLS_AFTER__AMD64="${AUTOTOOLS_AFTER} --with-tpm" - -AUTOTOOLS_AFTER=" \ - --disable-guile --without-idn \ - --without-idn --without-p11-kit \ +ABTYPE=autotools +AUTOTOOLS_AFTER="--without-idn --without-p11-kit \ --enable-local-libopts --disable-libopts-install \ --disable-libdane --disable-tools" -AUTOTOOLS_AFTER__ARMV4="${AUTOTOOLS_AFTER__RETRO}" -AUTOTOOLS_AFTER__ARMV6HF="${AUTOTOOLS_AFTER__RETRO}" -AUTOTOOLS_AFTER__ARMV7HF="${AUTOTOOLS_AFTER__RETRO}" -AUTOTOOLS_AFTER__I486="${AUTOTOOLS_AFTER__RETRO}" -AUTOTOOLS_AFTER__LOONGSON2F="${AUTOTOOLS_AFTER__RETRO}" -AUTOTOOLS_AFTER__POWERPC="${AUTOTOOLS_AFTER__RETRO}" -AUTOTOOLS_AFTER__PPC64="${AUTOTOOLS_AFTER__RETRO}" AB_FLAGS_O3=1 -ABSHADOW=0 -NOPARALLEL=1 + RECONF=0 diff --git a/runtime-cryptography/gnutls/autobuild/patches/0001-Tweak-libc-config_h-for-IEEE-long-double-compatibility.patch.ppc64el b/runtime-cryptography/gnutls/autobuild/patches/0001-Tweak-libc-config_h-for-IEEE-long-double-compatibility.patch.ppc64el index b515280fbad..bf5c9160965 100644 --- a/runtime-cryptography/gnutls/autobuild/patches/0001-Tweak-libc-config_h-for-IEEE-long-double-compatibility.patch.ppc64el +++ b/runtime-cryptography/gnutls/autobuild/patches/0001-Tweak-libc-config_h-for-IEEE-long-double-compatibility.patch.ppc64el @@ -1,24 +1,40 @@ -diff -Naur gnutls-3.6.15/gl/libc-config.h gnutls-3.6.15.ppc64el/gl/libc-config.h ---- gnutls-3.6.15/gl/libc-config.h 2020-09-04 00:00:21.000000000 -0700 -+++ gnutls-3.6.15.ppc64el/gl/libc-config.h 2023-03-10 23:36:04.555561638 -0800 -@@ -156,7 +156,7 @@ - #undef __warndecl +From 1437269d58514deb3eeec504e466bf4748be5991 Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 8 Jan 2024 19:38:09 -0800 +Subject: [PATCH] Tweak libc-config for IEEE long double compatibility + +Co-Authored-By: Mingcong Bai +--- + gl/libc-config.h | 2 +- + src/gl/libc-config.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gl/libc-config.h b/gl/libc-config.h +index 5f5ad01..aae7673 100644 +--- a/gl/libc-config.h ++++ b/gl/libc-config.h +@@ -174,7 +174,7 @@ + # endif /* Include our copy of glibc . */ --#include -+#include +-# include ++# include /* __inline is too pessimistic for non-GCC. */ - #undef __inline -diff -Naur gnutls-3.6.15/src/gl/libc-config.h gnutls-3.6.15.ppc64el/src/gl/libc-config.h ---- gnutls-3.6.15/src/gl/libc-config.h 2020-09-04 00:00:58.000000000 -0700 -+++ gnutls-3.6.15.ppc64el/src/gl/libc-config.h 2023-03-10 23:36:04.555561638 -0800 -@@ -156,7 +156,7 @@ - #undef __warndecl + # undef __inline +diff --git a/src/gl/libc-config.h b/src/gl/libc-config.h +index 5f5ad01..aae7673 100644 +--- a/src/gl/libc-config.h ++++ b/src/gl/libc-config.h +@@ -174,7 +174,7 @@ + # endif /* Include our copy of glibc . */ --#include -+#include +-# include ++# include /* __inline is too pessimistic for non-GCC. */ - #undef __inline + # undef __inline +-- +2.39.1 + diff --git a/runtime-cryptography/gnutls/autobuild/prepare b/runtime-cryptography/gnutls/autobuild/prepare deleted file mode 100644 index 14ce8d0fe65..00000000000 --- a/runtime-cryptography/gnutls/autobuild/prepare +++ /dev/null @@ -1 +0,0 @@ -export LDFLAGS="${LDFLAGS} -ldl" diff --git a/runtime-cryptography/gnutls/spec b/runtime-cryptography/gnutls/spec index bee864212e7..907ebc292af 100644 --- a/runtime-cryptography/gnutls/spec +++ b/runtime-cryptography/gnutls/spec @@ -1,5 +1,4 @@ -VER=3.6.15 -REL=1 +VER=3.8.3 SRCS="tbl::https://www.gnupg.org/ftp/gcrypt/gnutls/v${VER:0:3}/gnutls-$VER.tar.xz" -CHKSUMS="sha256::0ea8c3283de8d8335d7ae338ef27c53a916f15f382753b174c18b45ffd481558" +CHKSUMS="sha256::f74fc5954b27d4ec6dfbb11dea987888b5b124289a3703afcada0ee520f4173e" CHKUPDATE="anitya::id=1221" diff --git a/runtime-cryptography/p11-kit/autobuild/defines b/runtime-cryptography/p11-kit/autobuild/defines index 536f66c63c2..07063edd444 100644 --- a/runtime-cryptography/p11-kit/autobuild/defines +++ b/runtime-cryptography/p11-kit/autobuild/defines @@ -2,4 +2,9 @@ PKGNAME=p11-kit PKGDES="A way to load and enumerate PKCS #11 (a Cryptographic Token Interface Standard) modules" PKGSEC=libs PKGDEP="ca-certs libtasn1" -ABSHADOW=no + +ABTYPE=autotools +AUTOTOOLS_AFTER="PYTHON=/usr/bin/python3" + +# FIXME: warning: relocation against `p11_forkid' in read-only section `.text' +NOLTO=1 diff --git a/runtime-cryptography/p11-kit/autobuild/patches/0001-Build-and-install-libnssckbi-p11-kit.so.patch b/runtime-cryptography/p11-kit/autobuild/patches/0001-Build-and-install-libnssckbi-p11-kit.so.patch index eddc10e3112..8f6dd2c50c4 100644 --- a/runtime-cryptography/p11-kit/autobuild/patches/0001-Build-and-install-libnssckbi-p11-kit.so.patch +++ b/runtime-cryptography/p11-kit/autobuild/patches/0001-Build-and-install-libnssckbi-p11-kit.so.patch @@ -1,5 +1,4 @@ -From ec8bb05e15640b1857b94ded128bc33ca7ec7fe0 Mon Sep 17 00:00:00 2001 -Message-Id: +From 562c13c4b070252d31cb30a7671c1f10a7922414 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Thu, 1 Mar 2018 16:20:59 +0100 Subject: [PATCH] Build and install libnssckbi-p11-kit.so @@ -15,12 +14,12 @@ https://bugs.freedesktop.org/show_bug.cgi?id=66161 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/trust/Makefile.am b/trust/Makefile.am -index 6e52c4d..157a1d9 100644 +index 89bc2e0..5196a7b 100644 --- a/trust/Makefile.am +++ b/trust/Makefile.am -@@ -66,6 +66,20 @@ p11_kit_trust_la_LDFLAGS = \ +@@ -60,6 +60,20 @@ p11_kit_trust_la_LDFLAGS = \ - p11_kit_trust_la_SOURCES = $(TRUST_SRCS) + p11_kit_trust_la_SOURCES = $(TRUST_SRCS) trust/module-init.c +libnssckbi_compatdir = $(libdir) +libnssckbi_compat_LTLIBRARIES = \ @@ -40,10 +39,10 @@ index 6e52c4d..157a1d9 100644 -no-undefined diff --git a/trust/module.c b/trust/module.c -index e8b7256..d578a90 100644 +index f252516..6b9455e 100644 --- a/trust/module.c +++ b/trust/module.c -@@ -201,7 +201,11 @@ create_tokens_inlock (p11_array *tokens, +@@ -208,7 +208,11 @@ create_tokens_inlock (p11_array *tokens, int flags; } labels[] = { { "~/", "User Trust", P11_TOKEN_FLAG_NONE }, @@ -55,9 +54,9 @@ index e8b7256..d578a90 100644 { P11_SYSTEM_TRUST_PREFIX, "System Trust", P11_TOKEN_FLAG_NONE }, { NULL }, }; -@@ -529,8 +533,14 @@ sys_C_GetSlotInfo (CK_SLOT_ID id, +@@ -543,8 +547,14 @@ sys_C_GetSlotInfo (CK_SLOT_ID id, info->flags = CKF_TOKEN_PRESENT; - strncpy ((char*)info->manufacturerID, MANUFACTURER_ID, 32); + memcpy ((char*)info->manufacturerID, MANUFACTURER_ID, 32); +#ifdef LIBNSSCKBI_COMPAT + /* Change description to match libnssckbi so HPKP works in Chromium */ @@ -72,6 +71,5 @@ index e8b7256..d578a90 100644 if (length > sizeof (info->slotDescription)) length = sizeof (info->slotDescription); -- -2.16.1 - +2.39.1 diff --git a/runtime-cryptography/p11-kit/spec b/runtime-cryptography/p11-kit/spec index bc0fc3e2b60..297327af274 100644 --- a/runtime-cryptography/p11-kit/spec +++ b/runtime-cryptography/p11-kit/spec @@ -1,5 +1,4 @@ -VER=0.23.18.1 -REL=2 -SRCS="tbl::https://github.com/p11-glue/p11-kit/releases/download/$VER/p11-kit-$VER.tar.gz" -CHKSUMS="sha256::34c3bd8c0050dd7c4e6228aecf0f168de0a1b34562ddbf74a1c70904c2523c6f" +VER=0.25.3 +SRCS="tbl::https://github.com/p11-glue/p11-kit/releases/download/$VER/p11-kit-$VER.tar.xz" +CHKSUMS="sha256::d8ddce1bb7e898986f9d250ccae7c09ce14d82f1009046d202a0eb1b428b2adc" CHKUPDATE="anitya::id=2582" diff --git a/runtime-desktop/wxgtk/autobuild/build b/runtime-desktop/wxgtk/autobuild/build deleted file mode 100644 index 3687cc80397..00000000000 --- a/runtime-desktop/wxgtk/autobuild/build +++ /dev/null @@ -1,10 +0,0 @@ -./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \ - --enable-graphics_ctx --disable-optimize --enable-mediactrl --with-regex=builtin \ - --with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys \ - --with-sdl --disable-precomp-headers -make -make -C locale allmo -make -C contrib/src - -make DESTDIR="$PKGDIR" install -make -C contrib/src DESTDIR="$PKGDIR" install diff --git a/runtime-desktop/wxgtk/autobuild/defines b/runtime-desktop/wxgtk/autobuild/defines deleted file mode 100644 index 3f16d24dc35..00000000000 --- a/runtime-desktop/wxgtk/autobuild/defines +++ /dev/null @@ -1,6 +0,0 @@ -PKGNAME=wxgtk -PKGSEC=libs -PKGDEP="gtk-2 gst-plugins-base-0-10 gconf glu python-2" -PKGDES="GTK+ implementation of wxWidgets API for GUI" - -NOLTO=1 diff --git a/runtime-desktop/wxgtk/autobuild/patches/collision.patch b/runtime-desktop/wxgtk/autobuild/patches/collision.patch deleted file mode 100644 index 1d25e7ddd52..00000000000 --- a/runtime-desktop/wxgtk/autobuild/patches/collision.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -Naur wxPython-src-2.8.12.1.orig/build/bakefiles/wx.bkl wxPython-src-2.8.12.1/build/bakefiles/wx.bkl ---- wxPython-src-2.8.12.1.orig/build/bakefiles/wx.bkl 2014-01-04 22:28:16.491774907 -0500 -+++ wxPython-src-2.8.12.1/build/bakefiles/wx.bkl 2014-01-04 22:37:39.610020870 -0500 -@@ -128,7 +128,7 @@ - - - $(SRCDIR)/locale -- wxstd -+ wxstd$(WX_RELEASE_NODOT) - - ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk - zh zh_CN zh_TW -diff -Naur wxPython-src-2.8.12.1.orig/Makefile.in wxPython-src-2.8.12.1/Makefile.in ---- wxPython-src-2.8.12.1.orig/Makefile.in 2014-01-04 22:28:16.545107766 -0500 -+++ wxPython-src-2.8.12.1/Makefile.in 2014-01-04 22:40:27.191813403 -0500 -@@ -11695,9 +11695,11 @@ - - install: $(__install_wxregex___depname) $(__install_wxzlib___depname) $(__install_wxpng___depname) $(__install_wxjpeg___depname) $(__install_wxtiff___depname) $(__install_wxodbc___depname) $(__install_wxexpat___depname) $(__install_monodll___depname) $(__install_monolib___depname) $(__install_basedll___depname) $(__install_baselib___depname) $(__install_netdll___depname) $(__install_netlib___depname) $(__install_coredll___depname) $(__install_corelib___depname) $(__install_advdll___depname) $(__install_advlib___depname) $(__install_mediadll___depname) $(__install_medialib___depname) $(__install_odbcdll___depname) $(__install_odbclib___depname) $(__install_dbgriddll___depname) $(__install_dbgridlib___depname) $(__install_htmldll___depname) $(__install_htmllib___depname) $(__install_qadll___depname) $(__install_qalib___depname) $(__install_xmldll___depname) $(__install_xmllib___depname) $(__install_xrcdll___depname) $(__install_xrclib___depname) $(__install_auidll___depname) $(__install_auilib___depname) $(__install_richtextdll___depname) $(__install_richtextlib___depname) $(__install_gldll___depname) $(__install_gllib___depname) $(__install_sound_sdl___depname) $(__install_wxrc___depname) install-wxconfig locale_install locale_msw_install $(__cocoa_res_install___depname) - $(INSTALL_DIR) $(DESTDIR)$(datadir)/aclocal -- (cd $(srcdir) ; $(INSTALL_DATA) wxwin.m4 $(DESTDIR)$(datadir)/aclocal) -+ (cd $(srcdir) ; $(INSTALL_DATA) wxwin.m4 $(DESTDIR)$(datadir)/aclocal/wxwin2.8.m4) - $(INSTALL_DIR) $(DESTDIR)$(datadir)/bakefile/presets -- (cd $(srcdir)/build/bakefiles/wxpresets/presets ; $(INSTALL_DATA) wx.bkl wx_unix.bkl wx_win32.bkl $(DESTDIR)$(datadir)/bakefile/presets) -+ (cd $(srcdir)/build/bakefiles/wxpresets/presets ; \ -+ for i in wx.bkl wx_unix.bkl wx_win32.bkl ; do \ -+ $(INSTALL_DATA) $$i $(DESTDIR)$(datadir)/bakefile/presets/wx$(WX_RELEASE_NODOT)$${i##wx} ; done) - $(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/include/$(TOOLCHAIN_FULLNAME)/wx - for f in setup.h $(RCDEFS_H); do \ - if test ! -d $(DESTDIR)$(libdir)/wx/include/$(TOOLCHAIN_FULLNAME)/wx/`dirname $$f` ; then \ -@@ -12455,7 +12456,8 @@ - $(INSTALL_DIR) $(DESTDIR)$(bindir) - $(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/config - $(INSTALL_PROGRAM) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(libdir)/wx/config -- (cd $(DESTDIR)$(bindir) && rm -f wx-config && $(LN_S) $(libdir)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config) -+ (cd $(DESTDIR)$(bindir) && rm -f wx-config-$(WX_RELEASE) \ -+ && $(LN_S) ../lib/wx/config/$(TOOLCHAIN_FULLNAME) wx-config-$(WX_RELEASE)) - - locale_install: - $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale -@@ -12463,7 +12465,8 @@ - $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l ; \ - $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES ; \ - if test -f $(srcdir)/locale/$$l.mo ; then \ -- $(INSTALL_DATA) $(srcdir)/locale/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd.mo ; \ -+ $(INSTALL_DATA) $(srcdir)/locale/$$l.mo \ -+ $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxstd$(WX_RELEASE_NODOT).mo ; \ - fi ; \ - done - -@@ -12480,7 +12483,7 @@ - $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l ; \ - $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES ; \ - if test -f $(srcdir)/locale/msw/$$l.mo ; then \ -- $(INSTALL_DATA) $(srcdir)/locale/msw/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxmsw.mo ; \ -+ $(INSTALL_DATA) $(srcdir)/locale/msw/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxmsw$(WX_RELEASE_NODOT).mo ; \ - fi ; \ - done - -diff -Naur wxPython-src-2.8.12.1.orig/src/common/intl.cpp wxPython-src-2.8.12.1/src/common/intl.cpp ---- wxPython-src-2.8.12.1.orig/src/common/intl.cpp 2014-01-04 22:28:16.675106608 -0500 -+++ wxPython-src-2.8.12.1/src/common/intl.cpp 2014-01-04 22:47:49.523526232 -0500 -@@ -1597,7 +1597,7 @@ - bool bOk = true; - if ( bLoadDefault ) - { -- bOk = AddCatalog(wxT("wxstd")); -+ bOk = AddCatalog(wxT("wxstd" wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION))); - - // there may be a catalog with toolkit specific overrides, it is not - // an error if this does not exist -diff -Naur wxPython-src-2.8.12.1.orig/utils/wxrc/Makefile.in wxPython-src-2.8.12.1/utils/wxrc/Makefile.in ---- wxPython-src-2.8.12.1.orig/utils/wxrc/Makefile.in 2014-01-04 22:28:16.335109635 -0500 -+++ wxPython-src-2.8.12.1/utils/wxrc/Makefile.in 2014-01-04 22:37:34.410068493 -0500 -@@ -120,7 +120,6 @@ - @COND_USE_XRC_1@ rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE) - @COND_USE_XRC_1@ $(INSTALL_PROGRAM) wxrc$(EXEEXT) $(DESTDIR)$(bindir) - @COND_USE_XRC_1@ mv -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) $(DESTDIR)$(bindir)/wxrc-$(WX_RELEASE) --@COND_USE_XRC_1@ (cd $(DESTDIR)$(bindir) && $(LN_S) wxrc-$(WX_RELEASE) wxrc$(EXEEXT)) - - @COND_USE_XRC_1@uninstall_wxrc: - @COND_USE_XRC_1@ rm -f $(DESTDIR)$(bindir)/wxrc$(EXEEXT) - diff --git a/runtime-desktop/wxgtk/autobuild/patches/make-abicheck-non-fatal.patch b/runtime-desktop/wxgtk/autobuild/patches/make-abicheck-non-fatal.patch deleted file mode 100644 index 851afe5c0ee..00000000000 --- a/runtime-desktop/wxgtk/autobuild/patches/make-abicheck-non-fatal.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up wxGTK-2.8.12/src/common/appbase.cpp.abicheck wxGTK-2.8.12/src/common/appbase.cpp ---- wxGTK-2.8.12/src/common/appbase.cpp.abicheck 2015-03-12 17:15:18.000000000 +0100 -+++ wxGTK-2.8.12/src/common/appbase.cpp 2015-03-12 17:15:57.000000000 +0100 -@@ -424,10 +424,7 @@ bool wxAppConsole::CheckBuildOptions(con - msg.Printf(_T("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."), - lib.c_str(), progName.c_str(), prog.c_str()); - -- wxLogFatalError(msg.c_str()); -- -- // normally wxLogFatalError doesn't return -- return false; -+ wxLogWarning(msg.c_str()); - } - #undef wxCMP diff --git a/runtime-desktop/wxgtk/autobuild/prepare b/runtime-desktop/wxgtk/autobuild/prepare deleted file mode 100644 index 78c4adcc9ea..00000000000 --- a/runtime-desktop/wxgtk/autobuild/prepare +++ /dev/null @@ -1,6 +0,0 @@ -export CFLAGS="${CFLAGS} -Wno-narrowing" -export CXXFLAGS="${CXXFLAGS} -Wno-narrowing" - -for i in $(find "$SRCDIR" -name config.guess -o -name config.sub); do \ - cp -v /usr/share/automake-1.16/$(basename $i) $i ; \ -done diff --git a/runtime-desktop/wxgtk/spec b/runtime-desktop/wxgtk/spec deleted file mode 100644 index d45340119b5..00000000000 --- a/runtime-desktop/wxgtk/spec +++ /dev/null @@ -1,4 +0,0 @@ -VER=2.8.12.1 -REL=10 -SRCS="tbl::https://downloads.sourceforge.net/wxpython/wxPython-src-$VER.tar.bz2" -CHKSUMS="sha256::1f3f153d9f1504c6ce2d2c4b23e940b8f58b81f4cba35cda1a5bb31142243cd0" diff --git a/runtime-desktop/wxwidgets/01-wxbase/beyond b/runtime-desktop/wxwidgets/01-wxbase/beyond index 011b811cad1..6b621b9d7e1 100644 --- a/runtime-desktop/wxwidgets/01-wxbase/beyond +++ b/runtime-desktop/wxwidgets/01-wxbase/beyond @@ -1,4 +1,10 @@ -rm "$PKGDIR"/usr/lib/libwx_gtk* -rm -r "$PKGDIR"/usr/lib/wx/include/gtk2-unicode-3.0 -rm "$PKGDIR"/usr/lib/wx/config/gtk2-unicode-3.0 -rm "$PKGDIR"/usr/bin/wx-config +# Avoids conflict with wxgtk3 +abinfo "Removing wxgtk3 files ..." +rm -v "$PKGDIR"/usr/lib/libwx_gtk* +rm -rv "$PKGDIR/usr/lib/wx/include/gtk3-unicode-${PKGVER%.*}" +rm -v "$PKGDIR/usr/lib/wx/config/gtk3-unicode-${PKGVER%.*}" +rm -v "$PKGDIR/usr/bin/wx-config" + +# Requires webkit2gtk +abinfo "Removing wxWidgets web-extensions ..." +rm -rv "$PKGDIR/usr/lib/wx/${PKGVER%.*}/web-extensions" diff --git a/runtime-desktop/wxwidgets/01-wxbase/defines b/runtime-desktop/wxwidgets/01-wxbase/defines index 0863c5fe22e..ba9d30910a0 100644 --- a/runtime-desktop/wxwidgets/01-wxbase/defines +++ b/runtime-desktop/wxwidgets/01-wxbase/defines @@ -1,27 +1,39 @@ PKGNAME=wxbase PKGSEC=libs -PKGDEP="gcc-runtime expat sdl2 libnotify" -BUILDDEP="cppunit gtk-2 webkit2gtk glu libmspack gst-plugins-base-1-0" +PKGDEP="gcc-runtime expat sdl2 libnotify pcre2" +BUILDDEP="cppunit gtk-3 webkit2gtk glu libmspack gst-plugins-base-1-0" PKGDES="Base runtime for the wxWidgets library" -ABSHADOW=no -AUTOTOOLS_AFTER="--with-opengl --enable-unicode \ - --enable-graphics_ctx --enable-mediactrl --enable-webview \ - --with-regex=builtin --with-libpng=sys --with-libxpm=sys \ - --with-libjpeg=sys --with-libtiff=sys \ - --disable-precomp-headers --with-sdl --with-libmspack \ - --enable-intl --disable-rpath --enable-ipv6 --with-gtk=2" - -wx_extra(){ - make -C locale allmo -} - -alias BUILD_FINAL="wx_extra" +ABSHADOW=0 +ABTYPE=autotools +# FIXME: --disable-glcanvasegl workarounds segfaults of PrusaSlicer and its +# forks. +AUTOTOOLS_AFTER="--with-opengl \ + --enable-unicode \ + --enable-graphics_ctx \ + --enable-mediactrl \ + --enable-webview \ + --disable-precomp-headers \ + --disable-glcanvasegl \ + --with-libpng=sys \ + --with-libxpm=sys \ + --with-libjpeg=sys \ + --with-libtiff=sys \ + --with-regex=sys \ + --with-sdl \ + --with-libmspack \ + --enable-intl \ + --disable-rpath \ + --enable-ipv6 \ + --with-gtk=3" PKGREP="wxgtk-3<=3.0.2-3" -PKGBREAK="wxgtk-3<=3.0.2-3" +PKGBREAK="wxgtk-3<=3.0.2-3 wxgtk2<=3.0.5 wxgtk3<=3.0.5 wxpython<=3.0.2.0-10 \ + wxpython-phoenix<=4.0.7+post2 wxlua<=3.0.0.9 0ad<=0.0.26-1 \ + aegisub<=3.2.2+git20191006-1 amule<=2.3.3-1 audacity<=2.4.2-2 \ + boinc<=7.16.16-1 darkradiant<=3.8.0 filezilla<=3.50.0-1 \ + gnuplot<=5.2.8-3 hugin<=2022.0.0-1 kicad<=7.0.0-1 pcem<=17 \ + pcsx2<=1.6.0+git20210825 poedit<=3.4.1 superslicer<=2.5.59.4 \ + vba-m<=2.1.4-2 woeusb<=3.3.1 wxmaxima<=22.05.0" PKGEPOCH=1 -RECONF=0 - -NOLTO__LOONGSON3=1 diff --git a/runtime-desktop/wxwidgets/01-wxbase/defines.stage2 b/runtime-desktop/wxwidgets/01-wxbase/defines.stage2 index b75c49958bc..b9e3dfc73b8 100644 --- a/runtime-desktop/wxwidgets/01-wxbase/defines.stage2 +++ b/runtime-desktop/wxwidgets/01-wxbase/defines.stage2 @@ -1,27 +1,32 @@ PKGNAME=wxbase PKGSEC=libs -PKGDEP="gcc-runtime expat sdl2 libnotify" +PKGDEP="gcc-runtime expat sdl2 libnotify pcre2" BUILDDEP="cppunit gtk-2 webkit2gtk glu libmspack" PKGDES="Base runtime for the wxWidgets library" -ABSHADOW=no -AUTOTOOLS_AFTER="--with-opengl --enable-unicode \ - --enable-graphics_ctx --enable-mediactrl --enable-webview \ - --with-regex=builtin --with-libpng=sys --with-libxpm=sys \ - --with-libjpeg=sys --with-libtiff=sys \ - --disable-precomp-headers --with-sdl --with-libmspack \ - --enable-intl --disable-rpath --enable-ipv6 --with-gtk=2" - -wx_extra(){ - make -C locale allmo -} - -alias BUILD_FINAL="wx_extra" +ABTYPE=autotools +# FIXME: --disable-glcanvasegl workarounds segfaults of PrusaSlicer and its +# forks. +AUTOTOOLS_AFTER="--with-opengl \ + --enable-unicode \ + --enable-graphics_ctx \ + --enable-mediactrl \ + --enable-webview \ + --disable-precomp-headers \ + --disable-glcanvasegl \ + --with-libpng=sys \ + --with-libxpm=sys \ + --with-libjpeg=sys \ + --with-libtiff=sys \ + --with-regex=sys \ + --with-sdl \ + --with-libmspack \ + --enable-intl \ + --disable-rpath \ + --enable-ipv6 \ + --with-gtk=3" PKGREP="wxgtk-3<=3.0.2-3" PKGBREAK="wxgtk-3<=3.0.2-3" PKGEPOCH=1 -RECONF=0 - -NOLTO__LOONGSON3=1 diff --git a/runtime-desktop/wxwidgets/01-wxbase/patches/make-abicheck-non-fatal.patch b/runtime-desktop/wxwidgets/01-wxbase/patches/make-abicheck-non-fatal.patch deleted file mode 100644 index 97055ba46fa..00000000000 --- a/runtime-desktop/wxwidgets/01-wxbase/patches/make-abicheck-non-fatal.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up wxGTK-2.8.12/src/common/appbase.cpp.abicheck wxGTK-2.8.12/src/common/appbase.cpp ---- wxGTK-2.8.12/src/common/appbase.cpp.abicheck 2015-03-12 17:15:18.000000000 +0100 -+++ wxGTK-2.8.12/src/common/appbase.cpp 2015-03-12 17:15:57.000000000 +0100 -@@ -424,10 +424,7 @@ bool wxAppConsole::CheckBuildOptions(con - msg.Printf(_T("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."), - lib.c_str(), progName.c_str(), prog.c_str()); - -- wxLogFatalError(msg.c_str()); -- -- // normally wxLogFatalError doesn't return -- return false; -+ wxLogWarning(msg.c_str()); - } - #undef wxCMP - diff --git a/runtime-desktop/wxwidgets/01-wxbase/prepare b/runtime-desktop/wxwidgets/01-wxbase/prepare index 2375e1a41b3..c666ed48c33 100644 --- a/runtime-desktop/wxwidgets/01-wxbase/prepare +++ b/runtime-desktop/wxwidgets/01-wxbase/prepare @@ -1,3 +1,2 @@ -export CFLAGS="${CFLAGS} -fno-strict-aliasing" -export CXXFLAGS="${CFLAGS} -fno-strict-aliasing" -export LDFLAGS="${LDFLAGS} -Wl,--as-needed" +abinfo "Updating locale files ..." +make -C "$SRCDIR"/locale allmo diff --git a/runtime-desktop/wxwidgets/02-wxgtk2/alternatives b/runtime-desktop/wxwidgets/02-wxgtk2/alternatives deleted file mode 100644 index d3c6f5c8f95..00000000000 --- a/runtime-desktop/wxwidgets/02-wxgtk2/alternatives +++ /dev/null @@ -1 +0,0 @@ -alternative /usr/bin/wx-config /usr/lib/wx/config/gtk2-unicode-3.0 50 diff --git a/runtime-desktop/wxwidgets/02-wxgtk2/beyond b/runtime-desktop/wxwidgets/02-wxgtk2/beyond deleted file mode 100644 index 9bc2e1bc489..00000000000 --- a/runtime-desktop/wxwidgets/02-wxgtk2/beyond +++ /dev/null @@ -1,7 +0,0 @@ -rm -f "$PKGDIR"/usr/bin/wxrc* -rm -r "$PKGDIR"/usr/include -rm -f "$PKGDIR"/usr/lib/libwx_baseu* -rm -r "$PKGDIR"/usr/share/aclocal -rm -r "$PKGDIR"/usr/share/bakefile -rm -r "$PKGDIR"/usr/share/locale -rm -f "$PKGDIR"/usr/bin/wx-config diff --git a/runtime-desktop/wxwidgets/02-wxgtk2/build b/runtime-desktop/wxwidgets/02-wxgtk2/build deleted file mode 100644 index c574071855b..00000000000 --- a/runtime-desktop/wxwidgets/02-wxgtk2/build +++ /dev/null @@ -1 +0,0 @@ -make install DESTDIR="$PKGDIR" diff --git a/runtime-desktop/wxwidgets/02-wxgtk2/defines b/runtime-desktop/wxwidgets/02-wxgtk2/defines deleted file mode 100644 index 259afd5c7c9..00000000000 --- a/runtime-desktop/wxwidgets/02-wxgtk2/defines +++ /dev/null @@ -1,14 +0,0 @@ -PKGNAME=wxgtk2 -PKGSEC=libs -PKGDEP="wxbase gtk-2 webkit2gtk libmspack glu sdl2" -BUILDDEP="cppunit" -PKGDES="GTK+ 2.0 bindings for the wxWidgets library" - -ABSHADOW=0 - -PKGREP="wxgtk-3<=3.0.2-3" -PKGBREAK="wxgtk-3<=3.0.2-3" - -PKGEPOCH=1 - -NOLTO__LOONGSON3=1 diff --git a/runtime-desktop/wxwidgets/02-wxgtk3/alternatives b/runtime-desktop/wxwidgets/02-wxgtk3/alternatives new file mode 100644 index 00000000000..b9dc9e9a59f --- /dev/null +++ b/runtime-desktop/wxwidgets/02-wxgtk3/alternatives @@ -0,0 +1 @@ +alternative /usr/bin/wx-config /usr/bin/wx-config-gtk3 50 diff --git a/runtime-desktop/wxwidgets/02-wxgtk3/beyond b/runtime-desktop/wxwidgets/02-wxgtk3/beyond new file mode 100644 index 00000000000..1a8c92251a0 --- /dev/null +++ b/runtime-desktop/wxwidgets/02-wxgtk3/beyond @@ -0,0 +1,10 @@ +abinfo "Removing unneeded files ..." +rm -v "$PKGDIR"/usr/bin/wxrc* +rm -rv "$PKGDIR"/usr/include +rm -v "$PKGDIR"/usr/lib/libwx_baseu* +rm -rv "$PKGDIR"/usr/share/aclocal +rm -rv "$PKGDIR"/usr/share/bakefile +rm -rv "$PKGDIR"/usr/share/locale + +abinfo "Renaming wx-config to wx-config-gtk3 ..." +mv -v "$PKGDIR"/usr/bin/wx-config "$PKGDIR"/usr/bin/wx-config-gtk3 diff --git a/runtime-desktop/wxwidgets/02-wxgtk3/defines b/runtime-desktop/wxwidgets/02-wxgtk3/defines new file mode 100644 index 00000000000..5e9fd58c41c --- /dev/null +++ b/runtime-desktop/wxwidgets/02-wxgtk3/defines @@ -0,0 +1,37 @@ +PKGNAME=wxgtk3 +PKGSEC=libs +PKGDEP="wxbase gtk-3 webkit2gtk libmspack glu sdl2 pcre2" +BUILDDEP="cppunit" +PKGDES="GTK+ 3.0 bindings for the wxWidgets library" + +ABSHADOW=1 +ABTYPE=autotools +# FIXME: --disable-glcanvasegl workarounds segfaults of PrusaSlicer and its +# forks. +AUTOTOOLS_AFTER="--with-opengl \ + --enable-unicode \ + --enable-graphics_ctx \ + --enable-mediactrl \ + --enable-webview \ + --disable-precomp-headers \ + --disable-glcanvasegl \ + --with-regex=sys \ + --with-libpng=sys \ + --with-libxpm=sys \ + --with-libjpeg=sys \ + --with-libtiff=sys \ + --with-sdl \ + --with-libmspack \ + --enable-intl \ + --disable-rpath \ + --enable-ipv6 \ + --with-gtk=3" + +PKGREP="wxgtk-3<=3.0.2-3" +PKGBREAK="wxgtk-3<=3.0.2-3 wxpython-phoenix<=4.0.7+post2 \ + 0ad<=0.0.26-1 aegisub<=3.2.2+git20191006-1 audacity<=2.4.2-2 \ + boinc<=7.16.16-1 darkradiant<=3.8.0 filezilla<=3.50.0-1 \ + hugin<=2022.0.0-1 kicad<=7.0.0-1 pcem<=17 pcsx2<=1.6.0+git20210825 \ + poedit<=3.4.1 superslicer<=2.5.59.4 vba-m<=2.1.4-2 wxmaxima<=22.05.0" + +PKGEPOCH=1 diff --git a/runtime-desktop/wxwidgets/02-wxgtk3/prepare b/runtime-desktop/wxwidgets/02-wxgtk3/prepare new file mode 100644 index 00000000000..e60623abd2e --- /dev/null +++ b/runtime-desktop/wxwidgets/02-wxgtk3/prepare @@ -0,0 +1,5 @@ +abinfo "Cleaning up files from the previous build ..." +make distclean + +abinfo "Updating locale files ..." +make -C "$SRCDIR"/locale allmo diff --git a/runtime-desktop/wxwidgets/03-wxgtk3/alternatives b/runtime-desktop/wxwidgets/03-wxgtk3/alternatives deleted file mode 100644 index 2640d214014..00000000000 --- a/runtime-desktop/wxwidgets/03-wxgtk3/alternatives +++ /dev/null @@ -1 +0,0 @@ -alternative /usr/bin/wx-config /usr/lib/wx/config/gtk3-unicode-3.0 50 diff --git a/runtime-desktop/wxwidgets/03-wxgtk3/beyond b/runtime-desktop/wxwidgets/03-wxgtk3/beyond deleted file mode 100644 index eb1a36305ec..00000000000 --- a/runtime-desktop/wxwidgets/03-wxgtk3/beyond +++ /dev/null @@ -1,10 +0,0 @@ -abinfo "Removing unneeded files ..." -rm -f "$PKGDIR"/usr/bin/wxrc* -rm -r "$PKGDIR"/usr/include -rm -f "$PKGDIR"/usr/lib/libwx_baseu* -rm -r "$PKGDIR"/usr/share/aclocal -rm -r "$PKGDIR"/usr/share/bakefile -rm -r "$PKGDIR"/usr/share/locale - -abinfo "Renaming wx-config to avoid the file conflict with wxgtk2 ..." -mv -v "$PKGDIR"/usr/bin/wx-config "$PKGDIR"/usr/bin/wx-config-gtk3 diff --git a/runtime-desktop/wxwidgets/03-wxgtk3/defines b/runtime-desktop/wxwidgets/03-wxgtk3/defines deleted file mode 100644 index 3024645a531..00000000000 --- a/runtime-desktop/wxwidgets/03-wxgtk3/defines +++ /dev/null @@ -1,27 +0,0 @@ -PKGNAME=wxgtk3 -PKGSEC=libs -PKGDEP="wxbase gtk-3 webkit2gtk libmspack glu sdl2" -BUILDDEP="cppunit" -PKGDES="GTK+ 3.0 bindings for the wxWidgets library" - -ABSHADOW=no -AUTOTOOLS_AFTER="--with-opengl --enable-unicode \ - --enable-graphics_ctx --enable-mediactrl --enable-webview \ - --with-regex=builtin --with-libpng=sys --with-libxpm=sys \ - --with-libjpeg=sys --with-libtiff=sys \ - --disable-precomp-headers --with-sdl --with-libmspack \ - --enable-intl --disable-rpath --enable-ipv6 --with-gtk=3" - -wx_extra(){ - make -C locale allmo -} - -alias BUILD_FINAL="wx_extra" - -PKGREP="wxgtk-3<=3.0.2-3" -PKGBREAK="wxgtk-3<=3.0.2-3" - -PKGEPOCH=1 -RECONF=0 - -NOLTO__LOONGSON3=1 diff --git a/runtime-desktop/wxwidgets/03-wxgtk3/prepare b/runtime-desktop/wxwidgets/03-wxgtk3/prepare deleted file mode 100644 index d002938d191..00000000000 --- a/runtime-desktop/wxwidgets/03-wxgtk3/prepare +++ /dev/null @@ -1 +0,0 @@ -make distclean diff --git a/runtime-desktop/wxwidgets/spec b/runtime-desktop/wxwidgets/spec index 7f1a95bbd24..877010f2a7e 100644 --- a/runtime-desktop/wxwidgets/spec +++ b/runtime-desktop/wxwidgets/spec @@ -1,4 +1,4 @@ -VER=3.0.5 +VER=3.2.4 SRCS="tbl::https://github.com/wxWidgets/wxWidgets/releases/download/v$VER/wxWidgets-$VER.tar.bz2" -CHKSUMS="sha256::8aacd56b462f42fb6e33b4d8f5d40be5abc3d3b41348ea968aa515cc8285d813" +CHKSUMS="sha256::0640e1ab716db5af2ecb7389dbef6138d7679261fbff730d23845ba838ca133e" CHKUPDATE="anitya::id=5150" diff --git a/runtime-multimedia/libsbsms/autobuild/defines b/runtime-multimedia/libsbsms/autobuild/defines index c18fa09c806..f2e93f6ad5b 100644 --- a/runtime-multimedia/libsbsms/autobuild/defines +++ b/runtime-multimedia/libsbsms/autobuild/defines @@ -3,8 +3,4 @@ PKGSEC=libs PKGDEP="gcc-runtime" PKGDES="Library for time stretching and pitch scaling of audio" -ABSHADOW=0 -AUTOTOOLS_AFTER="--enable-shared" -AUTOTOOLS_AFTER__ARM64="--disable-sse" -AUTOTOOLS_AFTER__LOONGSON3="--disable-sse" -AUTOTOOLS_AFTER__PPC64EL="--disable-sse" +ABTYPE=cmakeninja diff --git a/runtime-multimedia/libsbsms/spec b/runtime-multimedia/libsbsms/spec index 6d072540fc3..ce7eee38158 100644 --- a/runtime-multimedia/libsbsms/spec +++ b/runtime-multimedia/libsbsms/spec @@ -1,5 +1,4 @@ -VER=2.0.2 -REL=3 -SRCS="tbl::https://downloads.sourceforge.net/project/sbsms/sbsms/$VER/libsbsms-$VER.tar.gz" -CHKSUMS="sha256::ceab3d970664b337057b46bcf55283d50d329da636bf83d0ee7c36e22341aeee" +VER=2.3.0 +SRCS="git::commit=tags/$VER::https://github.com/claytonotey/libsbsms" +CHKSUMS="SKIP" CHKUPDATE="anitya::id=230928" diff --git a/runtime-multimedia/portsmf/autobuild/defines b/runtime-multimedia/portsmf/autobuild/defines new file mode 100644 index 00000000000..767468fd3d4 --- /dev/null +++ b/runtime-multimedia/portsmf/autobuild/defines @@ -0,0 +1,6 @@ +PKGNAME=portsmf +PKGSEC=sound +PKGDES="C library implementing access to standard MIDI files and allegro files" +PKGDEP="glibc" + +ABTYPE=autotools diff --git a/runtime-multimedia/portsmf/autobuild/patches/0001-Convert-line-endings-to-LF.patch b/runtime-multimedia/portsmf/autobuild/patches/0001-Convert-line-endings-to-LF.patch new file mode 100644 index 00000000000..1ca70806eb9 --- /dev/null +++ b/runtime-multimedia/portsmf/autobuild/patches/0001-Convert-line-endings-to-LF.patch @@ -0,0 +1,8533 @@ +From d21c6ef6ff6c99a43ac522f2248fc97075ff08b3 Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 29 Jan 2024 03:06:43 -0800 +Subject: [PATCH 1/4] Convert line endings to LF + +--- + Makefile.am | 92 +-- + Makefile.in | 1346 ++++++++++++++++---------------- + algrd_internal.h | 10 +- + allegrord.cpp | 1548 ++++++++++++++++++------------------- + allegroserial.cpp | 4 +- + allegrosmfrd.cpp | 910 +++++++++++----------- + allegrosmfwr.cpp | 1294 +++++++++++++++---------------- + allegrowr.cpp | 366 ++++----- + configure.ac | 272 +++---- + mfmidi.cpp | 972 +++++++++++------------ + mfmidi.h | 196 ++--- + notes.txt | 68 +- + portSMF-uninstalled.pc.in | 32 +- + portSMF.pc.in | 20 +- + portsmf-VC8.sln | 58 +- + portsmf-VC8.vcproj | 426 +++++----- + portsmf.sln | 70 +- + portsmf.vcproj | 428 +++++----- + strparse.cpp | 174 ++--- + strparse.h | 36 +- + todo.txt | 8 +- + trace.cpp | 50 +- + trace.h | 4 +- + 23 files changed, 4192 insertions(+), 4192 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 0e71249..25c81ea 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,46 +1,46 @@ +-## Process this file with automake to produce Makefile.in +-# Makefile(.in) for portSMF using Autotools (but not libtool). +-# Written by Richard Ash following Gary Vaughan's Autobook +- +-# tell aclocal that extra macros can be found in autotools/m4/ +-ACLOCAL_AMFLAGS = -I autotools/m4 +- +-# define the output library (link with -lportSMF) +-lib_LIBRARIES = libportSMF.a +- +-# define the source files to use +-libportSMF_a_SOURCES = allegro.cpp \ +- allegrosmfwr.cpp \ +- allegrord.cpp \ +- allegrowr.cpp \ +- allegrosmfrd.cpp \ +- mfmidi.cpp \ +- strparse.cpp \ +- algrd_internal.h \ +- algsmfrd_internal.h +- +-# and the header files for the library. At the moment these go into the include +-# directory directly, it would be much better to have them in a subdirectory +-# but that would mean re-organising them here (a subdirectory called portSMF to +-# keep headers in, add -I$(srcdir)/portSMF/ to AM_CXXFLAGS, change the paths +-# to the headers here and change the name of the variable to nobase_include_... +-include_HEADERS = allegro.h \ +- mfmidi.h \ +- strparse.h \ +- trace.h +- +-# files that only really viscous cleans remove +-MAINTAINERCLEANFILES = Makefile.in +- +-# other distributed files in case users don't have a complete set of auto* +-AUX_DIST = $(ac_aux_dir)/config.guess \ +- $(ac_aux_dir)/config.sub \ +- $(ac_aux_dir)/install-sh \ +- $(ac_aux_dir)/mdate-sh \ +- $(ac_aux_dir)/missing \ +- $(ac_aux_dir)/mkinstalldirs \ +- $(MAINTAINERCLEANFILES) +- +-# Documentation files that should be both distributed and installed in the doc +-# directory, +-dist_doc_DATA = README.txt license.txt ++## Process this file with automake to produce Makefile.in ++# Makefile(.in) for portSMF using Autotools (but not libtool). ++# Written by Richard Ash following Gary Vaughan's Autobook ++ ++# tell aclocal that extra macros can be found in autotools/m4/ ++ACLOCAL_AMFLAGS = -I autotools/m4 ++ ++# define the output library (link with -lportSMF) ++lib_LIBRARIES = libportSMF.a ++ ++# define the source files to use ++libportSMF_a_SOURCES = allegro.cpp \ ++ allegrosmfwr.cpp \ ++ allegrord.cpp \ ++ allegrowr.cpp \ ++ allegrosmfrd.cpp \ ++ mfmidi.cpp \ ++ strparse.cpp \ ++ algrd_internal.h \ ++ algsmfrd_internal.h ++ ++# and the header files for the library. At the moment these go into the include ++# directory directly, it would be much better to have them in a subdirectory ++# but that would mean re-organising them here (a subdirectory called portSMF to ++# keep headers in, add -I$(srcdir)/portSMF/ to AM_CXXFLAGS, change the paths ++# to the headers here and change the name of the variable to nobase_include_... ++include_HEADERS = allegro.h \ ++ mfmidi.h \ ++ strparse.h \ ++ trace.h ++ ++# files that only really viscous cleans remove ++MAINTAINERCLEANFILES = Makefile.in ++ ++# other distributed files in case users don't have a complete set of auto* ++AUX_DIST = $(ac_aux_dir)/config.guess \ ++ $(ac_aux_dir)/config.sub \ ++ $(ac_aux_dir)/install-sh \ ++ $(ac_aux_dir)/mdate-sh \ ++ $(ac_aux_dir)/missing \ ++ $(ac_aux_dir)/mkinstalldirs \ ++ $(MAINTAINERCLEANFILES) ++ ++# Documentation files that should be both distributed and installed in the doc ++# directory, ++dist_doc_DATA = README.txt license.txt +diff --git a/Makefile.in b/Makefile.in +index 358f468..fe225d6 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -1,673 +1,673 @@ +-# Makefile.in generated by automake 1.10.2 from Makefile.am. +-# @configure_input@ +- +-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +-# This Makefile.in is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +-# PARTICULAR PURPOSE. +- +-@SET_MAKE@ +- +-# Makefile(.in) for portSMF using Autotools (but not libtool). +-# Written by Richard Ash following Gary Vaughan's Autobook +- +- +- +-VPATH = @srcdir@ +-pkgdatadir = $(datadir)/@PACKAGE@ +-pkglibdir = $(libdir)/@PACKAGE@ +-pkgincludedir = $(includedir)/@PACKAGE@ +-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +-install_sh_DATA = $(install_sh) -c -m 644 +-install_sh_PROGRAM = $(install_sh) -c +-install_sh_SCRIPT = $(install_sh) -c +-INSTALL_HEADER = $(INSTALL_DATA) +-transform = $(program_transform_name) +-NORMAL_INSTALL = : +-PRE_INSTALL = : +-POST_INSTALL = : +-NORMAL_UNINSTALL = : +-PRE_UNINSTALL = : +-POST_UNINSTALL = : +-subdir = . +-DIST_COMMON = $(am__configure_deps) $(dist_doc_DATA) \ +- $(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ +- $(srcdir)/portSMF-uninstalled.pc.in $(srcdir)/portSMF.pc.in \ +- $(top_srcdir)/configure autotools/depcomp autotools/install-sh \ +- autotools/missing +-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +-am__aclocal_m4_deps = \ +- $(top_srcdir)/autotools/m4/ax_cflags_strict_prototypes.m4 \ +- $(top_srcdir)/autotools/m4/ax_cflags_warn_all.m4 \ +- $(top_srcdir)/autotools/m4/ax_cxx_check_flag.m4 \ +- $(top_srcdir)/autotools/m4/ax_cxxcpp_check_flag.m4 \ +- $(top_srcdir)/configure.ac +-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ +- $(ACLOCAL_M4) +-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ +- configure.lineno config.status.lineno +-mkinstalldirs = $(install_sh) -d +-CONFIG_CLEAN_FILES = portSMF.pc portSMF-uninstalled.pc +-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +-am__vpath_adj = case $$p in \ +- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ +- *) f=$$p;; \ +- esac; +-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" \ +- "$(DESTDIR)$(includedir)" +-libLIBRARIES_INSTALL = $(INSTALL_DATA) +-LIBRARIES = $(lib_LIBRARIES) +-AR = ar +-ARFLAGS = cru +-libportSMF_a_AR = $(AR) $(ARFLAGS) +-libportSMF_a_LIBADD = +-am_libportSMF_a_OBJECTS = allegro.$(OBJEXT) allegrosmfwr.$(OBJEXT) \ +- allegrord.$(OBJEXT) allegrowr.$(OBJEXT) allegrosmfrd.$(OBJEXT) \ +- mfmidi.$(OBJEXT) strparse.$(OBJEXT) +-libportSMF_a_OBJECTS = $(am_libportSMF_a_OBJECTS) +-DEFAULT_INCLUDES = -I.@am__isrc@ +-depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp +-am__depfiles_maybe = depfiles +-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +-CXXLD = $(CXX) +-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ +- -o $@ +-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +-CCLD = $(CC) +-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +-SOURCES = $(libportSMF_a_SOURCES) +-DIST_SOURCES = $(libportSMF_a_SOURCES) +-dist_docDATA_INSTALL = $(INSTALL_DATA) +-DATA = $(dist_doc_DATA) +-includeHEADERS_INSTALL = $(INSTALL_HEADER) +-HEADERS = $(include_HEADERS) +-ETAGS = etags +-CTAGS = ctags +-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +-distdir = $(PACKAGE)-$(VERSION) +-top_distdir = $(distdir) +-am__remove_distdir = \ +- { test ! -d $(distdir) \ +- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ +- && rm -fr $(distdir); }; } +-DIST_ARCHIVES = $(distdir).tar.gz +-GZIP_ENV = --best +-distuninstallcheck_listfiles = find . -type f -print +-distcleancheck_listfiles = find . -type f -print +-ACLOCAL = @ACLOCAL@ +-AMTAR = @AMTAR@ +-AUTOCONF = @AUTOCONF@ +-AUTOHEADER = @AUTOHEADER@ +-AUTOMAKE = @AUTOMAKE@ +-AWK = @AWK@ +-CC = @CC@ +-CCDEPMODE = @CCDEPMODE@ +-CFLAGS = @CFLAGS@ +-CPPFLAGS = @CPPFLAGS@ +-CXX = @CXX@ +-CXXCPP = @CXXCPP@ +-CXXDEPMODE = @CXXDEPMODE@ +-CXXFLAGS = @CXXFLAGS@ +-CYGPATH_W = @CYGPATH_W@ +-DEFS = @DEFS@ +-DEPDIR = @DEPDIR@ +-ECHO_C = @ECHO_C@ +-ECHO_N = @ECHO_N@ +-ECHO_T = @ECHO_T@ +-EGREP = @EGREP@ +-EXEEXT = @EXEEXT@ +-GREP = @GREP@ +-INSTALL = @INSTALL@ +-INSTALL_DATA = @INSTALL_DATA@ +-INSTALL_PROGRAM = @INSTALL_PROGRAM@ +-INSTALL_SCRIPT = @INSTALL_SCRIPT@ +-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +-LDFLAGS = @LDFLAGS@ +-LIBOBJS = @LIBOBJS@ +-LIBS = @LIBS@ +-LTLIBOBJS = @LTLIBOBJS@ +-MAINT = @MAINT@ +-MAKEINFO = @MAKEINFO@ +-MKDIR_P = @MKDIR_P@ +-OBJEXT = @OBJEXT@ +-PACKAGE = @PACKAGE@ +-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +-PACKAGE_NAME = @PACKAGE_NAME@ +-PACKAGE_STRING = @PACKAGE_STRING@ +-PACKAGE_TARNAME = @PACKAGE_TARNAME@ +-PACKAGE_VERSION = @PACKAGE_VERSION@ +-PATH_SEPARATOR = @PATH_SEPARATOR@ +-RANLIB = @RANLIB@ +-SED = @SED@ +-SET_MAKE = @SET_MAKE@ +-SHELL = @SHELL@ +-STRIP = @STRIP@ +-VERSION = @VERSION@ +-abs_builddir = @abs_builddir@ +-abs_srcdir = @abs_srcdir@ +-abs_top_builddir = @abs_top_builddir@ +-abs_top_srcdir = @abs_top_srcdir@ +-ac_ct_CC = @ac_ct_CC@ +-ac_ct_CXX = @ac_ct_CXX@ +-am__include = @am__include@ +-am__leading_dot = @am__leading_dot@ +-am__quote = @am__quote@ +-am__tar = @am__tar@ +-am__untar = @am__untar@ +-bindir = @bindir@ +-build_alias = @build_alias@ +-builddir = @builddir@ +-datadir = @datadir@ +-datarootdir = @datarootdir@ +-docdir = @docdir@ +-dvidir = @dvidir@ +-exec_prefix = @exec_prefix@ +-host_alias = @host_alias@ +-htmldir = @htmldir@ +-includedir = @includedir@ +-infodir = @infodir@ +-install_sh = @install_sh@ +-libdir = @libdir@ +-libexecdir = @libexecdir@ +-localedir = @localedir@ +-localstatedir = @localstatedir@ +-mandir = @mandir@ +-mkdir_p = @mkdir_p@ +-oldincludedir = @oldincludedir@ +-pdfdir = @pdfdir@ +-prefix = @prefix@ +-program_transform_name = @program_transform_name@ +-psdir = @psdir@ +-sbindir = @sbindir@ +-sharedstatedir = @sharedstatedir@ +-srcdir = @srcdir@ +-sysconfdir = @sysconfdir@ +-target_alias = @target_alias@ +-top_build_prefix = @top_build_prefix@ +-top_builddir = @top_builddir@ +-top_srcdir = @top_srcdir@ +- +-# tell aclocal that extra macros can be found in autotools/m4/ +-ACLOCAL_AMFLAGS = -I autotools/m4 +- +-# define the output library (link with -lportSMF) +-lib_LIBRARIES = libportSMF.a +- +-# define the source files to use +-libportSMF_a_SOURCES = allegro.cpp \ +- allegrosmfwr.cpp \ +- allegrord.cpp \ +- allegrowr.cpp \ +- allegrosmfrd.cpp \ +- mfmidi.cpp \ +- strparse.cpp \ +- algrd_internal.h \ +- algsmfrd_internal.h +- +- +-# and the header files for the library. At the moment these go into the include +-# directory directly, it would be much better to have them in a subdirectory +-# but that would mean re-organising them here (a subdirectory called portSMF to +-# keep headers in, add -I$(srcdir)/portSMF/ to AM_CXXFLAGS, change the paths +-# to the headers here and change the name of the variable to nobase_include_... +-include_HEADERS = allegro.h \ +- mfmidi.h \ +- strparse.h \ +- trace.h +- +- +-# files that only really viscous cleans remove +-MAINTAINERCLEANFILES = Makefile.in +- +-# other distributed files in case users don't have a complete set of auto* +-AUX_DIST = $(ac_aux_dir)/config.guess \ +- $(ac_aux_dir)/config.sub \ +- $(ac_aux_dir)/install-sh \ +- $(ac_aux_dir)/mdate-sh \ +- $(ac_aux_dir)/missing \ +- $(ac_aux_dir)/mkinstalldirs \ +- $(MAINTAINERCLEANFILES) +- +- +-# Documentation files that should be both distributed and installed in the doc +-# directory, +-dist_doc_DATA = README.txt license.txt +-all: all-am +- +-.SUFFIXES: +-.SUFFIXES: .cpp .o .obj +-am--refresh: +- @: +-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +- @for dep in $?; do \ +- case '$(am__configure_deps)' in \ +- *$$dep*) \ +- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ +- cd $(srcdir) && $(AUTOMAKE) --foreign \ +- && exit 0; \ +- exit 1;; \ +- esac; \ +- done; \ +- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ +- cd $(top_srcdir) && \ +- $(AUTOMAKE) --foreign Makefile +-.PRECIOUS: Makefile +-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +- @case '$?' in \ +- *config.status*) \ +- echo ' $(SHELL) ./config.status'; \ +- $(SHELL) ./config.status;; \ +- *) \ +- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ +- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ +- esac; +- +-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +- $(SHELL) ./config.status --recheck +- +-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) +- cd $(srcdir) && $(AUTOCONF) +-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) +- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +-portSMF.pc: $(top_builddir)/config.status $(srcdir)/portSMF.pc.in +- cd $(top_builddir) && $(SHELL) ./config.status $@ +-portSMF-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/portSMF-uninstalled.pc.in +- cd $(top_builddir) && $(SHELL) ./config.status $@ +-install-libLIBRARIES: $(lib_LIBRARIES) +- @$(NORMAL_INSTALL) +- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" +- @list='$(lib_LIBRARIES)'; for p in $$list; do \ +- if test -f $$p; then \ +- f=$(am__strip_dir) \ +- echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ +- $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ +- else :; fi; \ +- done +- @$(POST_INSTALL) +- @list='$(lib_LIBRARIES)'; for p in $$list; do \ +- if test -f $$p; then \ +- p=$(am__strip_dir) \ +- echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \ +- $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \ +- else :; fi; \ +- done +- +-uninstall-libLIBRARIES: +- @$(NORMAL_UNINSTALL) +- @list='$(lib_LIBRARIES)'; for p in $$list; do \ +- p=$(am__strip_dir) \ +- echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \ +- rm -f "$(DESTDIR)$(libdir)/$$p"; \ +- done +- +-clean-libLIBRARIES: +- -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) +-libportSMF.a: $(libportSMF_a_OBJECTS) $(libportSMF_a_DEPENDENCIES) +- -rm -f libportSMF.a +- $(libportSMF_a_AR) libportSMF.a $(libportSMF_a_OBJECTS) $(libportSMF_a_LIBADD) +- $(RANLIB) libportSMF.a +- +-mostlyclean-compile: +- -rm -f *.$(OBJEXT) +- +-distclean-compile: +- -rm -f *.tab.c +- +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegro.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegrord.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegrosmfrd.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegrosmfwr.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegrowr.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfmidi.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strparse.Po@am__quote@ +- +-.cpp.o: +-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +-@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +- +-.cpp.obj: +-@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +-@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +-install-dist_docDATA: $(dist_doc_DATA) +- @$(NORMAL_INSTALL) +- test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" +- @list='$(dist_doc_DATA)'; for p in $$list; do \ +- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- f=$(am__strip_dir) \ +- echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ +- $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ +- done +- +-uninstall-dist_docDATA: +- @$(NORMAL_UNINSTALL) +- @list='$(dist_doc_DATA)'; for p in $$list; do \ +- f=$(am__strip_dir) \ +- echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ +- rm -f "$(DESTDIR)$(docdir)/$$f"; \ +- done +-install-includeHEADERS: $(include_HEADERS) +- @$(NORMAL_INSTALL) +- test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" +- @list='$(include_HEADERS)'; for p in $$list; do \ +- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- f=$(am__strip_dir) \ +- echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ +- $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ +- done +- +-uninstall-includeHEADERS: +- @$(NORMAL_UNINSTALL) +- @list='$(include_HEADERS)'; for p in $$list; do \ +- f=$(am__strip_dir) \ +- echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ +- rm -f "$(DESTDIR)$(includedir)/$$f"; \ +- done +- +-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) +- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ +- unique=`for i in $$list; do \ +- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ +- done | \ +- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ +- END { if (nonempty) { for (i in files) print i; }; }'`; \ +- mkid -fID $$unique +-tags: TAGS +- +-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +- $(TAGS_FILES) $(LISP) +- tags=; \ +- here=`pwd`; \ +- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ +- unique=`for i in $$list; do \ +- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ +- done | \ +- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ +- END { if (nonempty) { for (i in files) print i; }; }'`; \ +- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ +- test -n "$$unique" || unique=$$empty_fix; \ +- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +- $$tags $$unique; \ +- fi +-ctags: CTAGS +-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +- $(TAGS_FILES) $(LISP) +- tags=; \ +- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ +- unique=`for i in $$list; do \ +- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ +- done | \ +- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ +- END { if (nonempty) { for (i in files) print i; }; }'`; \ +- test -z "$(CTAGS_ARGS)$$tags$$unique" \ +- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ +- $$tags $$unique +- +-GTAGS: +- here=`$(am__cd) $(top_builddir) && pwd` \ +- && cd $(top_srcdir) \ +- && gtags -i $(GTAGS_ARGS) $$here +- +-distclean-tags: +- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +- +-distdir: $(DISTFILES) +- $(am__remove_distdir) +- test -d $(distdir) || mkdir $(distdir) +- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ +- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ +- list='$(DISTFILES)'; \ +- dist_files=`for file in $$list; do echo $$file; done | \ +- sed -e "s|^$$srcdirstrip/||;t" \ +- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ +- case $$dist_files in \ +- */*) $(MKDIR_P) `echo "$$dist_files" | \ +- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ +- sort -u` ;; \ +- esac; \ +- for file in $$dist_files; do \ +- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ +- if test -d $$d/$$file; then \ +- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ +- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ +- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ +- fi; \ +- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ +- else \ +- test -f $(distdir)/$$file \ +- || cp -p $$d/$$file $(distdir)/$$file \ +- || exit 1; \ +- fi; \ +- done +- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ +- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ +- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ +- ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ +- || chmod -R a+r $(distdir) +-dist-gzip: distdir +- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz +- $(am__remove_distdir) +- +-dist-bzip2: distdir +- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 +- $(am__remove_distdir) +- +-dist-lzma: distdir +- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma +- $(am__remove_distdir) +- +-dist-tarZ: distdir +- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z +- $(am__remove_distdir) +- +-dist-shar: distdir +- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz +- $(am__remove_distdir) +- +-dist-zip: distdir +- -rm -f $(distdir).zip +- zip -rq $(distdir).zip $(distdir) +- $(am__remove_distdir) +- +-dist dist-all: distdir +- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz +- $(am__remove_distdir) +- +-# This target untars the dist file and tries a VPATH configuration. Then +-# it guarantees that the distribution is self-contained by making another +-# tarfile. +-distcheck: dist +- case '$(DIST_ARCHIVES)' in \ +- *.tar.gz*) \ +- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ +- *.tar.bz2*) \ +- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ +- *.tar.lzma*) \ +- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ +- *.tar.Z*) \ +- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ +- *.shar.gz*) \ +- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ +- *.zip*) \ +- unzip $(distdir).zip ;;\ +- esac +- chmod -R a-w $(distdir); chmod a+w $(distdir) +- mkdir $(distdir)/_build +- mkdir $(distdir)/_inst +- chmod a-w $(distdir) +- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ +- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ +- && cd $(distdir)/_build \ +- && ../configure --srcdir=.. --prefix="$$dc_install_base" \ +- $(DISTCHECK_CONFIGURE_FLAGS) \ +- && $(MAKE) $(AM_MAKEFLAGS) \ +- && $(MAKE) $(AM_MAKEFLAGS) dvi \ +- && $(MAKE) $(AM_MAKEFLAGS) check \ +- && $(MAKE) $(AM_MAKEFLAGS) install \ +- && $(MAKE) $(AM_MAKEFLAGS) installcheck \ +- && $(MAKE) $(AM_MAKEFLAGS) uninstall \ +- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ +- distuninstallcheck \ +- && chmod -R a-w "$$dc_install_base" \ +- && ({ \ +- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ +- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ +- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ +- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ +- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ +- } || { rm -rf "$$dc_destdir"; exit 1; }) \ +- && rm -rf "$$dc_destdir" \ +- && $(MAKE) $(AM_MAKEFLAGS) dist \ +- && rm -rf $(DIST_ARCHIVES) \ +- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck +- $(am__remove_distdir) +- @(echo "$(distdir) archives ready for distribution: "; \ +- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ +- sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +-distuninstallcheck: +- @cd $(distuninstallcheck_dir) \ +- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ +- || { echo "ERROR: files left after uninstall:" ; \ +- if test -n "$(DESTDIR)"; then \ +- echo " (check DESTDIR support)"; \ +- fi ; \ +- $(distuninstallcheck_listfiles) ; \ +- exit 1; } >&2 +-distcleancheck: distclean +- @if test '$(srcdir)' = . ; then \ +- echo "ERROR: distcleancheck can only run from a VPATH build" ; \ +- exit 1 ; \ +- fi +- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ +- || { echo "ERROR: files left in build directory after distclean:" ; \ +- $(distcleancheck_listfiles) ; \ +- exit 1; } >&2 +-check-am: all-am +-check: check-am +-all-am: Makefile $(LIBRARIES) $(DATA) $(HEADERS) +-installdirs: +- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(includedir)"; do \ +- test -z "$$dir" || $(MKDIR_P) "$$dir"; \ +- done +-install: install-am +-install-exec: install-exec-am +-install-data: install-data-am +-uninstall: uninstall-am +- +-install-am: all-am +- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +- +-installcheck: installcheck-am +-install-strip: +- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ +- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ +- `test -z '$(STRIP)' || \ +- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +-mostlyclean-generic: +- +-clean-generic: +- +-distclean-generic: +- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) +- +-maintainer-clean-generic: +- @echo "This command is intended for maintainers to use" +- @echo "it deletes files that may require special tools to rebuild." +- -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +-clean: clean-am +- +-clean-am: clean-generic clean-libLIBRARIES mostlyclean-am +- +-distclean: distclean-am +- -rm -f $(am__CONFIG_DISTCLEAN_FILES) +- -rm -rf ./$(DEPDIR) +- -rm -f Makefile +-distclean-am: clean-am distclean-compile distclean-generic \ +- distclean-tags +- +-dvi: dvi-am +- +-dvi-am: +- +-html: html-am +- +-info: info-am +- +-info-am: +- +-install-data-am: install-dist_docDATA install-includeHEADERS +- +-install-dvi: install-dvi-am +- +-install-exec-am: install-libLIBRARIES +- +-install-html: install-html-am +- +-install-info: install-info-am +- +-install-man: +- +-install-pdf: install-pdf-am +- +-install-ps: install-ps-am +- +-installcheck-am: +- +-maintainer-clean: maintainer-clean-am +- -rm -f $(am__CONFIG_DISTCLEAN_FILES) +- -rm -rf $(top_srcdir)/autom4te.cache +- -rm -rf ./$(DEPDIR) +- -rm -f Makefile +-maintainer-clean-am: distclean-am maintainer-clean-generic +- +-mostlyclean: mostlyclean-am +- +-mostlyclean-am: mostlyclean-compile mostlyclean-generic +- +-pdf: pdf-am +- +-pdf-am: +- +-ps: ps-am +- +-ps-am: +- +-uninstall-am: uninstall-dist_docDATA uninstall-includeHEADERS \ +- uninstall-libLIBRARIES +- +-.MAKE: install-am install-strip +- +-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ +- clean-generic clean-libLIBRARIES ctags dist dist-all \ +- dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-zip \ +- distcheck distclean distclean-compile distclean-generic \ +- distclean-tags distcleancheck distdir distuninstallcheck dvi \ +- dvi-am html html-am info info-am install install-am \ +- install-data install-data-am install-dist_docDATA install-dvi \ +- install-dvi-am install-exec install-exec-am install-html \ +- install-html-am install-includeHEADERS install-info \ +- install-info-am install-libLIBRARIES install-man install-pdf \ +- install-pdf-am install-ps install-ps-am install-strip \ +- installcheck installcheck-am installdirs maintainer-clean \ +- maintainer-clean-generic mostlyclean mostlyclean-compile \ +- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ +- uninstall-am uninstall-dist_docDATA uninstall-includeHEADERS \ +- uninstall-libLIBRARIES +- +-# Tell versions [3.59,3.63) of GNU make to not export all variables. +-# Otherwise a system limit (for SysV at least) may be exceeded. +-.NOEXPORT: ++# Makefile.in generated by automake 1.10.2 from Makefile.am. ++# @configure_input@ ++ ++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ++# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++# This Makefile.in is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. ++ ++@SET_MAKE@ ++ ++# Makefile(.in) for portSMF using Autotools (but not libtool). ++# Written by Richard Ash following Gary Vaughan's Autobook ++ ++ ++ ++VPATH = @srcdir@ ++pkgdatadir = $(datadir)/@PACKAGE@ ++pkglibdir = $(libdir)/@PACKAGE@ ++pkgincludedir = $(includedir)/@PACKAGE@ ++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd ++install_sh_DATA = $(install_sh) -c -m 644 ++install_sh_PROGRAM = $(install_sh) -c ++install_sh_SCRIPT = $(install_sh) -c ++INSTALL_HEADER = $(INSTALL_DATA) ++transform = $(program_transform_name) ++NORMAL_INSTALL = : ++PRE_INSTALL = : ++POST_INSTALL = : ++NORMAL_UNINSTALL = : ++PRE_UNINSTALL = : ++POST_UNINSTALL = : ++subdir = . ++DIST_COMMON = $(am__configure_deps) $(dist_doc_DATA) \ ++ $(include_HEADERS) $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ++ $(srcdir)/portSMF-uninstalled.pc.in $(srcdir)/portSMF.pc.in \ ++ $(top_srcdir)/configure autotools/depcomp autotools/install-sh \ ++ autotools/missing ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = \ ++ $(top_srcdir)/autotools/m4/ax_cflags_strict_prototypes.m4 \ ++ $(top_srcdir)/autotools/m4/ax_cflags_warn_all.m4 \ ++ $(top_srcdir)/autotools/m4/ax_cxx_check_flag.m4 \ ++ $(top_srcdir)/autotools/m4/ax_cxxcpp_check_flag.m4 \ ++ $(top_srcdir)/configure.ac ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ ++ configure.lineno config.status.lineno ++mkinstalldirs = $(install_sh) -d ++CONFIG_CLEAN_FILES = portSMF.pc portSMF-uninstalled.pc ++am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; ++am__vpath_adj = case $$p in \ ++ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ ++ *) f=$$p;; \ ++ esac; ++am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; ++am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" \ ++ "$(DESTDIR)$(includedir)" ++libLIBRARIES_INSTALL = $(INSTALL_DATA) ++LIBRARIES = $(lib_LIBRARIES) ++AR = ar ++ARFLAGS = cru ++libportSMF_a_AR = $(AR) $(ARFLAGS) ++libportSMF_a_LIBADD = ++am_libportSMF_a_OBJECTS = allegro.$(OBJEXT) allegrosmfwr.$(OBJEXT) \ ++ allegrord.$(OBJEXT) allegrowr.$(OBJEXT) allegrosmfrd.$(OBJEXT) \ ++ mfmidi.$(OBJEXT) strparse.$(OBJEXT) ++libportSMF_a_OBJECTS = $(am_libportSMF_a_OBJECTS) ++DEFAULT_INCLUDES = -I.@am__isrc@ ++depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp ++am__depfiles_maybe = depfiles ++CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) ++CXXLD = $(CXX) ++CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ ++ -o $@ ++COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) ++CCLD = $(CC) ++LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ ++SOURCES = $(libportSMF_a_SOURCES) ++DIST_SOURCES = $(libportSMF_a_SOURCES) ++dist_docDATA_INSTALL = $(INSTALL_DATA) ++DATA = $(dist_doc_DATA) ++includeHEADERS_INSTALL = $(INSTALL_HEADER) ++HEADERS = $(include_HEADERS) ++ETAGS = etags ++CTAGS = ctags ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ++distdir = $(PACKAGE)-$(VERSION) ++top_distdir = $(distdir) ++am__remove_distdir = \ ++ { test ! -d $(distdir) \ ++ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ ++ && rm -fr $(distdir); }; } ++DIST_ARCHIVES = $(distdir).tar.gz ++GZIP_ENV = --best ++distuninstallcheck_listfiles = find . -type f -print ++distcleancheck_listfiles = find . -type f -print ++ACLOCAL = @ACLOCAL@ ++AMTAR = @AMTAR@ ++AUTOCONF = @AUTOCONF@ ++AUTOHEADER = @AUTOHEADER@ ++AUTOMAKE = @AUTOMAKE@ ++AWK = @AWK@ ++CC = @CC@ ++CCDEPMODE = @CCDEPMODE@ ++CFLAGS = @CFLAGS@ ++CPPFLAGS = @CPPFLAGS@ ++CXX = @CXX@ ++CXXCPP = @CXXCPP@ ++CXXDEPMODE = @CXXDEPMODE@ ++CXXFLAGS = @CXXFLAGS@ ++CYGPATH_W = @CYGPATH_W@ ++DEFS = @DEFS@ ++DEPDIR = @DEPDIR@ ++ECHO_C = @ECHO_C@ ++ECHO_N = @ECHO_N@ ++ECHO_T = @ECHO_T@ ++EGREP = @EGREP@ ++EXEEXT = @EXEEXT@ ++GREP = @GREP@ ++INSTALL = @INSTALL@ ++INSTALL_DATA = @INSTALL_DATA@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ ++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ ++LDFLAGS = @LDFLAGS@ ++LIBOBJS = @LIBOBJS@ ++LIBS = @LIBS@ ++LTLIBOBJS = @LTLIBOBJS@ ++MAINT = @MAINT@ ++MAKEINFO = @MAKEINFO@ ++MKDIR_P = @MKDIR_P@ ++OBJEXT = @OBJEXT@ ++PACKAGE = @PACKAGE@ ++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ ++PACKAGE_NAME = @PACKAGE_NAME@ ++PACKAGE_STRING = @PACKAGE_STRING@ ++PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_VERSION = @PACKAGE_VERSION@ ++PATH_SEPARATOR = @PATH_SEPARATOR@ ++RANLIB = @RANLIB@ ++SED = @SED@ ++SET_MAKE = @SET_MAKE@ ++SHELL = @SHELL@ ++STRIP = @STRIP@ ++VERSION = @VERSION@ ++abs_builddir = @abs_builddir@ ++abs_srcdir = @abs_srcdir@ ++abs_top_builddir = @abs_top_builddir@ ++abs_top_srcdir = @abs_top_srcdir@ ++ac_ct_CC = @ac_ct_CC@ ++ac_ct_CXX = @ac_ct_CXX@ ++am__include = @am__include@ ++am__leading_dot = @am__leading_dot@ ++am__quote = @am__quote@ ++am__tar = @am__tar@ ++am__untar = @am__untar@ ++bindir = @bindir@ ++build_alias = @build_alias@ ++builddir = @builddir@ ++datadir = @datadir@ ++datarootdir = @datarootdir@ ++docdir = @docdir@ ++dvidir = @dvidir@ ++exec_prefix = @exec_prefix@ ++host_alias = @host_alias@ ++htmldir = @htmldir@ ++includedir = @includedir@ ++infodir = @infodir@ ++install_sh = @install_sh@ ++libdir = @libdir@ ++libexecdir = @libexecdir@ ++localedir = @localedir@ ++localstatedir = @localstatedir@ ++mandir = @mandir@ ++mkdir_p = @mkdir_p@ ++oldincludedir = @oldincludedir@ ++pdfdir = @pdfdir@ ++prefix = @prefix@ ++program_transform_name = @program_transform_name@ ++psdir = @psdir@ ++sbindir = @sbindir@ ++sharedstatedir = @sharedstatedir@ ++srcdir = @srcdir@ ++sysconfdir = @sysconfdir@ ++target_alias = @target_alias@ ++top_build_prefix = @top_build_prefix@ ++top_builddir = @top_builddir@ ++top_srcdir = @top_srcdir@ ++ ++# tell aclocal that extra macros can be found in autotools/m4/ ++ACLOCAL_AMFLAGS = -I autotools/m4 ++ ++# define the output library (link with -lportSMF) ++lib_LIBRARIES = libportSMF.a ++ ++# define the source files to use ++libportSMF_a_SOURCES = allegro.cpp \ ++ allegrosmfwr.cpp \ ++ allegrord.cpp \ ++ allegrowr.cpp \ ++ allegrosmfrd.cpp \ ++ mfmidi.cpp \ ++ strparse.cpp \ ++ algrd_internal.h \ ++ algsmfrd_internal.h ++ ++ ++# and the header files for the library. At the moment these go into the include ++# directory directly, it would be much better to have them in a subdirectory ++# but that would mean re-organising them here (a subdirectory called portSMF to ++# keep headers in, add -I$(srcdir)/portSMF/ to AM_CXXFLAGS, change the paths ++# to the headers here and change the name of the variable to nobase_include_... ++include_HEADERS = allegro.h \ ++ mfmidi.h \ ++ strparse.h \ ++ trace.h ++ ++ ++# files that only really viscous cleans remove ++MAINTAINERCLEANFILES = Makefile.in ++ ++# other distributed files in case users don't have a complete set of auto* ++AUX_DIST = $(ac_aux_dir)/config.guess \ ++ $(ac_aux_dir)/config.sub \ ++ $(ac_aux_dir)/install-sh \ ++ $(ac_aux_dir)/mdate-sh \ ++ $(ac_aux_dir)/missing \ ++ $(ac_aux_dir)/mkinstalldirs \ ++ $(MAINTAINERCLEANFILES) ++ ++ ++# Documentation files that should be both distributed and installed in the doc ++# directory, ++dist_doc_DATA = README.txt license.txt ++all: all-am ++ ++.SUFFIXES: ++.SUFFIXES: .cpp .o .obj ++am--refresh: ++ @: ++$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ ++ cd $(srcdir) && $(AUTOMAKE) --foreign \ ++ && exit 0; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ ++ cd $(top_srcdir) && \ ++ $(AUTOMAKE) --foreign Makefile ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ echo ' $(SHELL) ./config.status'; \ ++ $(SHELL) ./config.status;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ ++ esac; ++ ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++ $(SHELL) ./config.status --recheck ++ ++$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ++ cd $(srcdir) && $(AUTOCONF) ++$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) ++ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) ++portSMF.pc: $(top_builddir)/config.status $(srcdir)/portSMF.pc.in ++ cd $(top_builddir) && $(SHELL) ./config.status $@ ++portSMF-uninstalled.pc: $(top_builddir)/config.status $(srcdir)/portSMF-uninstalled.pc.in ++ cd $(top_builddir) && $(SHELL) ./config.status $@ ++install-libLIBRARIES: $(lib_LIBRARIES) ++ @$(NORMAL_INSTALL) ++ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" ++ @list='$(lib_LIBRARIES)'; for p in $$list; do \ ++ if test -f $$p; then \ ++ f=$(am__strip_dir) \ ++ echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ ++ $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ ++ else :; fi; \ ++ done ++ @$(POST_INSTALL) ++ @list='$(lib_LIBRARIES)'; for p in $$list; do \ ++ if test -f $$p; then \ ++ p=$(am__strip_dir) \ ++ echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \ ++ $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \ ++ else :; fi; \ ++ done ++ ++uninstall-libLIBRARIES: ++ @$(NORMAL_UNINSTALL) ++ @list='$(lib_LIBRARIES)'; for p in $$list; do \ ++ p=$(am__strip_dir) \ ++ echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \ ++ rm -f "$(DESTDIR)$(libdir)/$$p"; \ ++ done ++ ++clean-libLIBRARIES: ++ -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) ++libportSMF.a: $(libportSMF_a_OBJECTS) $(libportSMF_a_DEPENDENCIES) ++ -rm -f libportSMF.a ++ $(libportSMF_a_AR) libportSMF.a $(libportSMF_a_OBJECTS) $(libportSMF_a_LIBADD) ++ $(RANLIB) libportSMF.a ++ ++mostlyclean-compile: ++ -rm -f *.$(OBJEXT) ++ ++distclean-compile: ++ -rm -f *.tab.c ++ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegro.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegrord.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegrosmfrd.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegrosmfwr.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allegrowr.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfmidi.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strparse.Po@am__quote@ ++ ++.cpp.o: ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< ++ ++.cpp.obj: ++@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` ++@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ++install-dist_docDATA: $(dist_doc_DATA) ++ @$(NORMAL_INSTALL) ++ test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)" ++ @list='$(dist_doc_DATA)'; for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ f=$(am__strip_dir) \ ++ echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ ++ $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ ++ done ++ ++uninstall-dist_docDATA: ++ @$(NORMAL_UNINSTALL) ++ @list='$(dist_doc_DATA)'; for p in $$list; do \ ++ f=$(am__strip_dir) \ ++ echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(docdir)/$$f"; \ ++ done ++install-includeHEADERS: $(include_HEADERS) ++ @$(NORMAL_INSTALL) ++ test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" ++ @list='$(include_HEADERS)'; for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ f=$(am__strip_dir) \ ++ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ ++ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ ++ done ++ ++uninstall-includeHEADERS: ++ @$(NORMAL_UNINSTALL) ++ @list='$(include_HEADERS)'; for p in $$list; do \ ++ f=$(am__strip_dir) \ ++ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(includedir)/$$f"; \ ++ done ++ ++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ mkid -fID $$unique ++tags: TAGS ++ ++TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ here=`pwd`; \ ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique; \ ++ fi ++ctags: CTAGS ++CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ ++ END { if (nonempty) { for (i in files) print i; }; }'`; \ ++ test -z "$(CTAGS_ARGS)$$tags$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$tags $$unique ++ ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && cd $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) $$here ++ ++distclean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ++ ++distdir: $(DISTFILES) ++ $(am__remove_distdir) ++ test -d $(distdir) || mkdir $(distdir) ++ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ++ list='$(DISTFILES)'; \ ++ dist_files=`for file in $$list; do echo $$file; done | \ ++ sed -e "s|^$$srcdirstrip/||;t" \ ++ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ ++ case $$dist_files in \ ++ */*) $(MKDIR_P) `echo "$$dist_files" | \ ++ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ ++ sort -u` ;; \ ++ esac; \ ++ for file in $$dist_files; do \ ++ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ if test -d $$d/$$file; then \ ++ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ++ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ++ fi; \ ++ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ ++ else \ ++ test -f $(distdir)/$$file \ ++ || cp -p $$d/$$file $(distdir)/$$file \ ++ || exit 1; \ ++ fi; \ ++ done ++ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ++ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ ++ || chmod -R a+r $(distdir) ++dist-gzip: distdir ++ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++dist-bzip2: distdir ++ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 ++ $(am__remove_distdir) ++ ++dist-lzma: distdir ++ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma ++ $(am__remove_distdir) ++ ++dist-tarZ: distdir ++ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z ++ $(am__remove_distdir) ++ ++dist-shar: distdir ++ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz ++ $(am__remove_distdir) ++ ++dist-zip: distdir ++ -rm -f $(distdir).zip ++ zip -rq $(distdir).zip $(distdir) ++ $(am__remove_distdir) ++ ++dist dist-all: distdir ++ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++# This target untars the dist file and tries a VPATH configuration. Then ++# it guarantees that the distribution is self-contained by making another ++# tarfile. ++distcheck: dist ++ case '$(DIST_ARCHIVES)' in \ ++ *.tar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ ++ *.tar.bz2*) \ ++ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ ++ *.tar.lzma*) \ ++ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ ++ *.tar.Z*) \ ++ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ ++ *.shar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ ++ *.zip*) \ ++ unzip $(distdir).zip ;;\ ++ esac ++ chmod -R a-w $(distdir); chmod a+w $(distdir) ++ mkdir $(distdir)/_build ++ mkdir $(distdir)/_inst ++ chmod a-w $(distdir) ++ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ ++ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ++ && cd $(distdir)/_build \ ++ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ ++ $(DISTCHECK_CONFIGURE_FLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) dvi \ ++ && $(MAKE) $(AM_MAKEFLAGS) check \ ++ && $(MAKE) $(AM_MAKEFLAGS) install \ ++ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ++ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ ++ distuninstallcheck \ ++ && chmod -R a-w "$$dc_install_base" \ ++ && ({ \ ++ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ ++ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ ++ } || { rm -rf "$$dc_destdir"; exit 1; }) \ ++ && rm -rf "$$dc_destdir" \ ++ && $(MAKE) $(AM_MAKEFLAGS) dist \ ++ && rm -rf $(DIST_ARCHIVES) \ ++ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck ++ $(am__remove_distdir) ++ @(echo "$(distdir) archives ready for distribution: "; \ ++ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ ++ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' ++distuninstallcheck: ++ @cd $(distuninstallcheck_dir) \ ++ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ ++ || { echo "ERROR: files left after uninstall:" ; \ ++ if test -n "$(DESTDIR)"; then \ ++ echo " (check DESTDIR support)"; \ ++ fi ; \ ++ $(distuninstallcheck_listfiles) ; \ ++ exit 1; } >&2 ++distcleancheck: distclean ++ @if test '$(srcdir)' = . ; then \ ++ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ ++ exit 1 ; \ ++ fi ++ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ++ || { echo "ERROR: files left in build directory after distclean:" ; \ ++ $(distcleancheck_listfiles) ; \ ++ exit 1; } >&2 ++check-am: all-am ++check: check-am ++all-am: Makefile $(LIBRARIES) $(DATA) $(HEADERS) ++installdirs: ++ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(includedir)"; do \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ ++ done ++install: install-am ++install-exec: install-exec-am ++install-data: install-data-am ++uninstall: uninstall-am ++ ++install-am: all-am ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am ++ ++installcheck: installcheck-am ++install-strip: ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ `test -z '$(STRIP)' || \ ++ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++mostlyclean-generic: ++ ++clean-generic: ++ ++distclean-generic: ++ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ++ ++maintainer-clean-generic: ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) ++clean: clean-am ++ ++clean-am: clean-generic clean-libLIBRARIES mostlyclean-am ++ ++distclean: distclean-am ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++distclean-am: clean-am distclean-compile distclean-generic \ ++ distclean-tags ++ ++dvi: dvi-am ++ ++dvi-am: ++ ++html: html-am ++ ++info: info-am ++ ++info-am: ++ ++install-data-am: install-dist_docDATA install-includeHEADERS ++ ++install-dvi: install-dvi-am ++ ++install-exec-am: install-libLIBRARIES ++ ++install-html: install-html-am ++ ++install-info: install-info-am ++ ++install-man: ++ ++install-pdf: install-pdf-am ++ ++install-ps: install-ps-am ++ ++installcheck-am: ++ ++maintainer-clean: maintainer-clean-am ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf $(top_srcdir)/autom4te.cache ++ -rm -rf ./$(DEPDIR) ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic ++ ++mostlyclean: mostlyclean-am ++ ++mostlyclean-am: mostlyclean-compile mostlyclean-generic ++ ++pdf: pdf-am ++ ++pdf-am: ++ ++ps: ps-am ++ ++ps-am: ++ ++uninstall-am: uninstall-dist_docDATA uninstall-includeHEADERS \ ++ uninstall-libLIBRARIES ++ ++.MAKE: install-am install-strip ++ ++.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ ++ clean-generic clean-libLIBRARIES ctags dist dist-all \ ++ dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ dist-zip \ ++ distcheck distclean distclean-compile distclean-generic \ ++ distclean-tags distcleancheck distdir distuninstallcheck dvi \ ++ dvi-am html html-am info info-am install install-am \ ++ install-data install-data-am install-dist_docDATA install-dvi \ ++ install-dvi-am install-exec install-exec-am install-html \ ++ install-html-am install-includeHEADERS install-info \ ++ install-info-am install-libLIBRARIES install-man install-pdf \ ++ install-pdf-am install-ps install-ps-am install-strip \ ++ installcheck installcheck-am installdirs maintainer-clean \ ++ maintainer-clean-generic mostlyclean mostlyclean-compile \ ++ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ ++ uninstall-am uninstall-dist_docDATA uninstall-includeHEADERS \ ++ uninstall-libLIBRARIES ++ ++# Tell versions [3.59,3.63) of GNU make to not export all variables. ++# Otherwise a system limit (for SysV at least) may be exceeded. ++.NOEXPORT: +diff --git a/algrd_internal.h b/algrd_internal.h +index 7e3ac88..8b58872 100644 +--- a/algrd_internal.h ++++ b/algrd_internal.h +@@ -1,5 +1,5 @@ +-/* algread_internal.h -- interface between allegro.cpp and allegrord.cpp */ +- +-Alg_error alg_read(std::istream &file, Alg_seq_ptr new_seq, +- double *offset_ptr = NULL); +- ++/* algread_internal.h -- interface between allegro.cpp and allegrord.cpp */ ++ ++Alg_error alg_read(std::istream &file, Alg_seq_ptr new_seq, ++ double *offset_ptr = NULL); ++ +diff --git a/allegrord.cpp b/allegrord.cpp +index 307f956..87e1dcb 100755 +--- a/allegrord.cpp ++++ b/allegrord.cpp +@@ -1,774 +1,774 @@ +-#include "assert.h" +-#include "stdlib.h" +-#include "string.h" +-#include "ctype.h" +-#include "trace.h" +-#include +-#include +-#include +-#include "strparse.h" +-#include "allegro.h" +-#include "algrd_internal.h" +- +-using namespace std; +- +-#define streql(s1, s2) (strcmp(s1, s2) == 0) +-#define field_max 80 +- +-class Alg_reader { +-public: +- istream *file; +- string input_line; +- int line_no; +- String_parse line_parser; +- bool line_parser_flag; +- string field; +- bool error_flag; +- Alg_seq_ptr seq; +- double tsnum; +- double tsden; +- double offset; +- bool offset_found; +- +- Alg_reader(istream *a_file, Alg_seq_ptr new_seq); +- void readline(); +- Alg_parameters_ptr process_attributes(Alg_parameters_ptr attributes, +- double time); +- bool parse(); +- long parse_chan(string &field); +- long parse_int(string &field); +- int find_real_in(string &field, int n); +- double parse_real(string &field); +- void parse_error(string &field, long offset, char *message); +- double parse_dur(string &field, double base); +- double parse_after_dur(double dur, string &field, int n, double base); +- double parse_loud(string &field); +- long parse_key(string &field); +- double parse_pitch(string &field); +- long parse_after_key(int key, string &field, int n); +- long find_int_in(string &field, int n); +- bool parse_attribute(string &field, Alg_parameter_ptr parm); +- bool parse_val(Alg_parameter_ptr param, string &s, int i); +- bool check_type(char type_char, Alg_parameter_ptr param); +-}; +- +- +-double Alg_reader::parse_pitch(string &field) +-{ +- if (isdigit(field[1])) { +- int last = find_real_in(field, 1); +- string real_string = field.substr(1, last - 1); +- return atof(real_string.c_str()); +- } else { +- return (double) parse_key(field); +- } +-} +- +- +-// it is the responsibility of the caller to delete +-// the seq +-Alg_reader::Alg_reader(istream *a_file, Alg_seq_ptr new_seq) +-{ +- file = a_file; // save the file +- line_parser_flag = false; +- line_no = 0; +- tsnum = 4; // default time signature +- tsden = 4; +- seq = new_seq; +- offset = 0.0; +- offset_found = false; +-} +- +- +-Alg_error alg_read(istream &file, Alg_seq_ptr new_seq, double *offset_ptr) +- // read a sequence from allegro file +-{ +- assert(new_seq); +- Alg_reader alg_reader(&file, new_seq); +- bool err = alg_reader.parse(); +- if (!err && offset_ptr) { +- *offset_ptr = alg_reader.offset; +- } +- return (err ? alg_error_syntax : alg_no_error); +-} +- +- +-void Alg_reader::readline() +-{ +- // a word about memory management: this Alg_reader has a +- // member variable input_line that holds a line of input +- // it is reused for each line. input_line is parsed by +- // line_parser, which holds a reference to input_line +- line_parser_flag = false; +- if (getline(*file, input_line)) { +- line_parser.init(&input_line); +- line_parser_flag = true; +- error_flag = false; +- } +-} +- +- +-Alg_parameters_ptr Alg_reader::process_attributes( +- Alg_parameters_ptr attributes, double time) +-{ +- // print "process_attributes:", attributes +- bool ts_flag = false; +- if (attributes) { +- Alg_parameters_ptr a; +- bool in_seconds = seq->get_units_are_seconds(); +- if (a = Alg_parameters::remove_key(&attributes, "tempor")) { +- double tempo = a->parm.r; +- seq->insert_tempo(tempo, seq->get_time_map()->time_to_beat(time)); +- } +- if (a = Alg_parameters::remove_key(&attributes, "beatr")) { +- double beat = a->parm.r; +- seq->insert_beat(time, beat); +- } +- if (a = Alg_parameters::remove_key(&attributes, "timesig_numr")) { +- tsnum = a->parm.r; +- ts_flag = true; +- } +- if (a = Alg_parameters::remove_key(&attributes, "timesig_denr")) { +- tsden = a->parm.r; +- ts_flag = true; +- } +- if (ts_flag) { +- seq->set_time_sig(seq->get_time_map()->time_to_beat(time), +- tsnum, tsden); +- } +- if (in_seconds) seq->convert_to_seconds(); +- } +- return attributes; // in case it was modified +-} +- +- +-bool Alg_reader::parse() +-{ +- int voice = 0; +- int key = 60; +- double loud = 100.0; +- double pitch = 60.0; +- double dur = 1.0; +- double time = 0.0; +- int track_num = 0; +- seq->convert_to_seconds(); +- //seq->set_real_dur(0.0); // just in case it's not initialized already +- readline(); +- bool valid = false; // ignore blank lines +- while (line_parser_flag) { +- bool time_flag = false; +- bool next_flag = false; +- double next; +- bool voice_flag = false; +- bool loud_flag = false; +- bool dur_flag = false; +- bool new_pitch_flag = false; // "P" syntax or "A"-"G" syntax +- double new_pitch = 0.0; +- bool new_key_flag = false; // "K" syntax +- int new_key = 0; +- Alg_parameters_ptr attributes = NULL; +- if (line_parser.peek() == '#') { +- // look for #track +- line_parser.get_nonspace_quoted(field); +- if (streql(field.c_str(), "#track")) { +- line_parser.get_nonspace_quoted(field); // number +- field.insert(0, " "); // need char at beginning because +- // parse_int ignores the first character of the argument +- track_num = parse_int(field); +- seq->add_track(track_num); +- +- // maybe we have a sequence or track name +- line_parser.get_remainder(field); +- // if there is a non-space character after #track n then +- // use it as sequence or track name. Note that because we +- // skip over spaces, a sequence or track name cannot begin +- // with leading blanks. Another decision is that the name +- // must be at time zero +- if (field.length() > 0) { +- // insert the field as sequence name or track name +- Alg_update_ptr update = new Alg_update; +- update->chan = -1; +- update->time = 0; +- update->set_identifier(-1); +- // sequence name is whatever is on track 0 +- // other tracks have track names +- const char *attr = +- (track_num == 0 ? "seqnames" : "tracknames"); +- update->parameter.set_attr( +- symbol_table.insert_string(attr)); +- update->parameter.s = heapify(field.c_str()); +- seq->add_event(update, track_num); +- } +- } else if (streql(field.c_str(), "#offset")) { +- if (offset_found) { +- parse_error(field, 0, "#offset specified twice"); +- } +- offset_found = true; +- line_parser.get_nonspace_quoted(field); // number +- field.insert(0, " "); // need char at beginning because +- // parse_real ignores first character in the argument +- offset = parse_real(field); +- } +- } else { +- // we must have a track to insert into +- if (seq->tracks() == 0) seq->add_track(0); +- line_parser.get_nonspace_quoted(field); +- char pk = line_parser.peek(); +- // attributes are parsed as two adjacent nonspace_quoted tokens +- // so we have to conditionally call get_nonspace_quoted() again +- if (pk && !isspace(pk)) { +- string field2; +- line_parser.get_nonspace_quoted(field2); +- field.append(field2); +- } +- while (field[0]) { +- char first = toupper(field[0]); +- if (strchr("ABCDEFGKLPUSIQHW-", first)) { +- valid = true; // it's a note or event +- } +- if (first == 'V') { +- if (voice_flag) { +- parse_error(field, 0, "Voice specified twice"); +- } else { +- voice = parse_chan(field); +- } +- voice_flag = true; +- } else if (first == 'T') { +- if (time_flag) { +- parse_error(field, 0, "Time specified twice"); +- } else { +- time = parse_dur(field, 0.0); +- } +- time_flag = true; +- } else if (first == 'N') { +- if (next_flag) { +- parse_error(field, 0, "Next specified twice"); +- } else { +- next = parse_dur(field, time); +- } +- next_flag = true; +- } else if (first == 'K') { +- if (new_key_flag) { +- parse_error(field, 0, "Key specified twice"); +- } else { +- new_key = parse_key(field); +- new_key_flag = true; +- } +- } else if (first == 'L') { +- if (loud_flag) { +- parse_error(field, 0, "Loudness specified twice"); +- } else { +- loud = parse_loud(field); +- } +- loud_flag = true; +- } else if (first == 'P') { +- if (new_pitch_flag) { +- parse_error(field, 0, "Pitch specified twice"); +- } else { +- new_pitch = parse_pitch(field); +- new_pitch_flag = true; +- } +- } else if (first == 'U') { +- if (dur_flag) { +- parse_error(field, 0, "Dur specified twice"); +- } else { +- dur = parse_dur(field, time); +- dur_flag = true; +- } +- } else if (strchr("SIQHW", first)) { +- if (dur_flag) { +- parse_error(field, 0, "Dur specified twice"); +- } else { +- // prepend 'U' to field, copy EOS too +- field.insert((unsigned int) 0, 1, 'U'); +- dur = parse_dur(field, time); +- dur_flag = true; +- } +- } else if (strchr("ABCDEFG", first)) { +- if (new_pitch_flag) { +- parse_error(field, 0, "Pitch specified twice"); +- } else { +- // prepend 'P' to field +- field.insert((unsigned int) 0, 1, 'P'); +- new_pitch = parse_pitch(field); +- new_pitch_flag = true; +- } +- } else if (first == '-') { +- Alg_parameter parm; +- if (parse_attribute(field, &parm)) { // enter attribute-value pair +- attributes = new Alg_parameters(attributes); +- attributes->parm = parm; +- parm.s = NULL; // protect string from deletion by destructor +- } +- } else { +- parse_error(field, 0, "Unknown field"); +- } +- +- if (error_flag) { +- field[0] = 0; // exit the loop +- } else { +- line_parser.get_nonspace_quoted(field); +- pk = line_parser.peek(); +- // attributes are parsed as two adjacent nonspace_quoted +- // tokens so we have to conditionally call +- // get_nonspace_quoted() again +- if (pk && !isspace(pk)) { +- string field2; +- line_parser.get_nonspace_quoted(field2); +- field.append(field2); +- } +- } +- } +- // a case analysis: +- // Key < 128 implies pitch unless pitch is explicitly given +- // Pitch implies Key unless key is explicitly given, +- // Pitch is rounded to nearest integer to determine the Key +- // if necessary, so MIDI files will lose the pitch fraction +- // A-G is a Pitch specification (therefore it implies Key) +- // K60 P60 -- both are specified, use 'em +- // K60 P60 C4 -- overconstrained, an error +- // K60 C4 -- OK, but K60 is already implied by C4 +- // K60 -- OK, pitch is 60 +- // C4 P60 -- over constrained +- // P60 -- OK, key is 60 +- // P60.1 -- OK, key is 60 +- // C4 -- OK, key is 60, pitch is 60 +- // -- OK, key and pitch from before +- // K200 P60 -- ok, pitch is 60 +- // K200 with neither P60 nor C4 uses +- // pitch from before +- +- // figure out what the key/instance is: +- if (new_key_flag) { // it was directly specified +- key = new_key; +- } else if (new_pitch_flag) { +- // pitch was specified, but key was not; get key from pitch +- key = (int) (new_pitch + 0.5); // round to integer key number +- } +- if (new_pitch_flag) { +- pitch = new_pitch; +- } else if (key < 128 && new_key_flag) { +- // no explicit pitch, but key < 128, so it implies pitch +- pitch = key; +- new_pitch_flag = true; +- } +- // now we've acquired new parameters +- // if (it is a note, then enter the note +- if (valid) { +- // change tempo or beat +- attributes = process_attributes(attributes, time); +- // if there's a duration or pitch, make a note: +- if (new_pitch_flag || dur_flag) { +- Alg_note_ptr note_ptr = new Alg_note; +- note_ptr->chan = voice; +- note_ptr->time = time; +- note_ptr->dur = dur; +- note_ptr->set_identifier(key); +- note_ptr->pitch = (float) pitch; +- note_ptr->loud = (float) loud; +- note_ptr->parameters = attributes; +- seq->add_event(note_ptr, track_num); // sort later +- if (seq->get_real_dur() < (time + dur)) seq->set_real_dur(time + dur); +- } else { +- int update_key = -1; +- // key must appear explicitly; otherwise +- // update applies to channel +- if (new_key_flag) { +- update_key = key; +- } +- if (loud_flag) { +- Alg_update_ptr new_upd = new Alg_update; +- new_upd->chan = voice; +- new_upd->time = time; +- new_upd->set_identifier(update_key); +- new_upd->parameter.set_attr(symbol_table.insert_string("loudr")); +- new_upd->parameter.r = pitch; +- seq->add_event(new_upd, track_num); +- if (seq->get_real_dur() < time) seq->set_real_dur(time); +- } +- if (attributes) { +- while (attributes) { +- Alg_update_ptr new_upd = new Alg_update; +- new_upd->chan = voice; +- new_upd->time = time; +- new_upd->set_identifier(update_key); +- new_upd->parameter = attributes->parm; +- seq->add_event(new_upd, track_num); +- Alg_parameters_ptr p = attributes; +- attributes = attributes->next; +- p->parm.s = NULL; // so we don't delete the string +- delete p; +- } +- } +- } +- if (next_flag) { +- time = time + next; +- } else if (dur_flag || new_pitch_flag) { // a note: incr by dur +- time = time + dur; +- } +- } +- } +- readline(); +- } +- if (!error_flag) { // why not convert even if there was an error? -RBD +- seq->convert_to_seconds(); // make sure format is correct +- } +- // real_dur is valid, translate to beat_dur +- seq->set_beat_dur((seq->get_time_map())->time_to_beat(seq->get_real_dur())); +- return error_flag; +-} +- +- +-long Alg_reader::parse_chan(string &field) +-{ +- const char *int_string = field.c_str() + 1; +- char *msg = "Integer or - expected"; +- const char *p = int_string; +- char c; +- // check that all chars in int_string are digits or '-': +- while (c = *p++) { +- if (!isdigit(c) && c != '-') { +- parse_error(field, p - field.c_str() - 1, msg); +- return 0; +- } +- } +- p--; // p now points to end-of-string character +- if (p - int_string == 0) { +- // bad: string length is zero +- parse_error(field, 1, msg); +- return 0; +- } +- if (p - int_string == 1 && int_string[0] == '-') { +- // special case: entire string is "-", interpret as -1 +- return -1; +- } +- return atoi(int_string); +-} +- +- +-long Alg_reader::parse_int(string &field) +-{ +- const char *int_string = field.c_str() + 1; +- char *msg = "Integer expected"; +- const char *p = int_string; +- char c; +- // check that all chars in int_string are digits: +- while (c = *p++) { +- if (!isdigit(c)) { +- parse_error(field, p - field.c_str() - 1, msg); +- return 0; +- } +- } +- p--; // p now points to end-of-string character +- if (p - int_string == 0) { +- // bad: string length is zero +- parse_error(field, 1, msg); +- return 0; +- } +- return atoi(int_string); +-} +- +- +-int Alg_reader::find_real_in(string &field, int n) +-{ +- // scans from offset n to the end of a real constant +- bool decimal = false; +- int len = field.length(); +- if (n < len && field[n] == '-') n += 1; // parse one minus sign +- for (int i = n; i < len; i++) { +- char c = field[i]; +- if (!isdigit(c)) { +- if (c == '.' && !decimal) { +- decimal = true; +- } else { +- return i; +- } +- } +- } +- return len; +-} +- +- +-double Alg_reader::parse_real(string &field) +-{ +- char *msg = "Real expected"; +- int last = find_real_in(field, 1); +- string real_string = field.substr(1, last - 1); +- if (last <= 1 || last < (int) field.length()) { +- parse_error(field, 1, msg); +- return 0; +- } +- return atof(real_string.c_str()); +-} +- +- +-void Alg_reader::parse_error(string &field, long offset, char *message) +-{ +- int position = line_parser.pos - field.length() + offset; +- error_flag = true; +- puts(line_parser.str->c_str()); +- for (int i = 0; i < position; i++) { +- putc(' ', stdout); +- } +- putc('^', stdout); +- printf(" %s\n", message); +-} +- +- +-double duration_lookup[] = { 0.25, 0.5, 1.0, 2.0, 4.0 }; +- +- +-double Alg_reader::parse_dur(string &field, double base) +-{ +- char *msg = "Duration expected"; +- char *durs = "SIQHW"; +- char *p; +- int last; +- double dur; +- if (field.length() < 2) { +- // fall through to error message +- return -1; +- } else if (isdigit(field[1])) { +- last = find_real_in(field, 1); +- string real_string = field.substr(1, last - 1); +- dur = atof(real_string.c_str()); +- // convert dur from seconds to beats +- dur = seq->get_time_map()->time_to_beat(base + dur) - +- seq->get_time_map()->time_to_beat(base); +- } else if (p = strchr(durs, toupper(field[1]))) { +- dur = duration_lookup[p - durs]; +- last = 2; +- } else { +- parse_error(field, 1, msg); +- return 0; +- } +- dur = parse_after_dur(dur, field, last, base); +- dur = seq->get_time_map()->beat_to_time( +- seq->get_time_map()->time_to_beat(base) + dur) - base; +- return dur; +-} +- +- +-double Alg_reader::parse_after_dur(double dur, string &field, +- int n, double base) +-{ +- if ((int) field.length() == n) { +- return dur; +- } +- if (toupper(field[n]) == 'T') { +- return parse_after_dur(dur * 2/3, field, n + 1, base); +- } +- if (field[n] == '.') { +- return parse_after_dur(dur * 1.5, field, n + 1, base); +- } +- if (isdigit(field[n])) { +- int last = find_real_in(field, n); +- string a_string = field.substr(n, last - n); +- double f = atof(a_string.c_str()); +- return parse_after_dur(dur * f, field, last, base); +- } +- if (field[n] == '+') { +- string a_string = field.substr(n + 1); +- return dur + parse_dur( +- a_string, seq->get_time_map()->beat_to_time( +- seq->get_time_map()->time_to_beat(base) + dur)); +- } +- parse_error(field, n, "Unexpected character in duration"); +- return dur; +-} +- +-struct loud_lookup_struct { +- char *str; +- int val; +-} loud_lookup[] = { {"FFF", 127}, {"FF", 120}, {"F", 110}, {"MF", 100}, +- {"MP", 90}, {"P", 80}, {"PP", 70}, {"PPP", 60}, +- {NULL, 0} }; +- +- +-double Alg_reader::parse_loud(string &field) +-{ +- char *msg = "Loudness expected"; +- if (isdigit(field[1])) { +- return parse_int(field); +- } else { +- string dyn = field.substr(1); +- transform(dyn.begin(), dyn.end(), dyn.begin(), ::toupper); +- for (int i = 0; loud_lookup[i].str; i++) { +- if (streql(loud_lookup[i].str, dyn.c_str())) { +- return (double) loud_lookup[i].val; +- } +- } +- } +- parse_error(field, 1, msg); +- return 100.0; +-} +- +- +-int key_lookup[] = {21, 23, 12, 14, 16, 17, 19}; +- +- +-// the field can be K or K[A-G] or P[A-G] +-// (this can be called from parse_pitch() to handle [A-G]) +-// Notice that the routine ignores the first character: K or P +-// +-long Alg_reader::parse_key(string &field) +-{ +- char *msg = "Pitch expected"; +- char *pitches = "ABCDEFG"; +- char *p; +- if (isdigit(field[1])) { +- // This routine would not have been called if field = "P" +- // so it must be "K" so must be an integer. +- return parse_int(field); +- } else if (p = strchr(pitches, toupper(field[1]))) { +- long key = key_lookup[p - pitches]; +- key = parse_after_key(key, field, 2); +- return key; +- } +- parse_error(field, 1, msg); +- return 0; +-} +- +- +-long Alg_reader::parse_after_key(int key, string &field, int n) +-{ +- if ((int) field.length() == n) { +- return key; +- } +- char c = toupper(field[n]); +- if (c == 'S') { +- return parse_after_key(key + 1, field, n + 1); +- } +- if (c == 'F') { +- return parse_after_key(key - 1, field, n + 1); +- } +- if (isdigit(field[n])) { +- int last = find_int_in(field, n); +- string octave = field.substr(n, last - n); +- int oct = atoi(octave.c_str()); +- return parse_after_key(key + oct * 12, field, last); +- } +- parse_error(field, n, "Unexpected character in pitch"); +- return key; +-} +- +- +-long Alg_reader::find_int_in(string &field, int n) +-{ +- while ((int) field.length() > n && isdigit(field[n])) { +- n = n + 1; +- } +- return n; +-} +- +- +-bool Alg_reader::parse_attribute(string &field, Alg_parameter_ptr param) +-{ +- int i = 1; +- while (i < (int) field.length()) { +- if (field[i] == ':') { +- string attr = field.substr(1, i - 1); +- char type_char = field[i - 1]; +- if (strchr("iarsl", type_char)) { +- param->set_attr(symbol_table.insert_string(attr.c_str())); +- parse_val(param, field, i + 1); +- } else { +- parse_error(field, 0, "attribute needs to end with typecode: i,a,r,s, or l"); +- } +- return !error_flag; +- } +- i = i + 1; +- } +- return false; +-} +- +- +-bool Alg_reader::parse_val(Alg_parameter_ptr param, string &s, int i) +-{ +- int len = (int) s.length(); +- if (i >= len) { +- return false; +- } +- if (s[i] == '"') { +- if (!check_type('s', param)) { +- return false; +- } +- // note: (len - i) includes 2 quote characters but no EOS character +- // so total memory to allocate is (len - i) - 1 +- char *r = new char[(len - i) - 1]; +- strncpy(r, s.c_str() + i + 1, (len - i) - 2); +- r[(len - i) - 2] = 0; // terminate the string +- param->s = r; +- } else if (s[i] == '\'') { +- if (!check_type('a', param)) { +- return false; +- } +- string r = s.substr(i + 1, len - i - 2); +- param->a = symbol_table.insert_string(r.c_str()); +- } else if (param->attr_type() == 'l') { +- if (streql(s.c_str() + i, "true") || +- streql(s.c_str() + i, "t")) { +- param->l = true; +- } else if (streql(s.c_str() + i, "false") || +- streql(s.c_str() + i, "nil")) { +- param->l = false; +- } else return false; +- } else if (isdigit(s[i]) || s[i] == '-' || s[i] == '.') { +- int pos = i; +- bool period = false; +- int sign = 1; +- if (s[pos] == '-') { +- sign = -1; +- pos++; +- } +- while (pos < len) { +- if (isdigit(s[pos])) { +- ; +- } else if (!period && s[pos] == '.') { +- period = true; +- } else { +- parse_error(s, pos, "Unexpected char in number"); +- return false; +- } +- pos = pos + 1; +- } +- string r = s.substr(i, len - i); +- if (period) { +- if (!check_type('r', param)) { +- return false; +- } +- param->r = atof(r.c_str()); +- } else { +- if (param->attr_type() == 'r') { +- param->r = atoi(r.c_str()); +- } else if (!check_type('i', param)) { +- return false; +- } else { +- param->i = atoi(r.c_str()); +- } +- } +- } else { +- parse_error(s, i, "invalid value"); +- return false; +- } +- return true; +-} +- +- +-bool Alg_reader::check_type(char type_char, Alg_parameter_ptr param) +-{ +- return param->attr_type() == type_char; +-} +- +- +-//duration_lookup = {"S": 0.5, "I": 0.5, "Q": 1, "H": 2, "W": 4} +-//key_lookup = {"C": 12, "D": 14, "E": 16, "F": 17, "G": 19, "A": 21, "B": 23} +- +-/* +-def test(): +- reader = Alg_reader(open("data\\test.gro", "r")) +- reader.parse() +- score = reader->seq.notes +- print "score:", score +- reader = nil +-*/ ++#include "assert.h" ++#include "stdlib.h" ++#include "string.h" ++#include "ctype.h" ++#include "trace.h" ++#include ++#include ++#include ++#include "strparse.h" ++#include "allegro.h" ++#include "algrd_internal.h" ++ ++using namespace std; ++ ++#define streql(s1, s2) (strcmp(s1, s2) == 0) ++#define field_max 80 ++ ++class Alg_reader { ++public: ++ istream *file; ++ string input_line; ++ int line_no; ++ String_parse line_parser; ++ bool line_parser_flag; ++ string field; ++ bool error_flag; ++ Alg_seq_ptr seq; ++ double tsnum; ++ double tsden; ++ double offset; ++ bool offset_found; ++ ++ Alg_reader(istream *a_file, Alg_seq_ptr new_seq); ++ void readline(); ++ Alg_parameters_ptr process_attributes(Alg_parameters_ptr attributes, ++ double time); ++ bool parse(); ++ long parse_chan(string &field); ++ long parse_int(string &field); ++ int find_real_in(string &field, int n); ++ double parse_real(string &field); ++ void parse_error(string &field, long offset, char *message); ++ double parse_dur(string &field, double base); ++ double parse_after_dur(double dur, string &field, int n, double base); ++ double parse_loud(string &field); ++ long parse_key(string &field); ++ double parse_pitch(string &field); ++ long parse_after_key(int key, string &field, int n); ++ long find_int_in(string &field, int n); ++ bool parse_attribute(string &field, Alg_parameter_ptr parm); ++ bool parse_val(Alg_parameter_ptr param, string &s, int i); ++ bool check_type(char type_char, Alg_parameter_ptr param); ++}; ++ ++ ++double Alg_reader::parse_pitch(string &field) ++{ ++ if (isdigit(field[1])) { ++ int last = find_real_in(field, 1); ++ string real_string = field.substr(1, last - 1); ++ return atof(real_string.c_str()); ++ } else { ++ return (double) parse_key(field); ++ } ++} ++ ++ ++// it is the responsibility of the caller to delete ++// the seq ++Alg_reader::Alg_reader(istream *a_file, Alg_seq_ptr new_seq) ++{ ++ file = a_file; // save the file ++ line_parser_flag = false; ++ line_no = 0; ++ tsnum = 4; // default time signature ++ tsden = 4; ++ seq = new_seq; ++ offset = 0.0; ++ offset_found = false; ++} ++ ++ ++Alg_error alg_read(istream &file, Alg_seq_ptr new_seq, double *offset_ptr) ++ // read a sequence from allegro file ++{ ++ assert(new_seq); ++ Alg_reader alg_reader(&file, new_seq); ++ bool err = alg_reader.parse(); ++ if (!err && offset_ptr) { ++ *offset_ptr = alg_reader.offset; ++ } ++ return (err ? alg_error_syntax : alg_no_error); ++} ++ ++ ++void Alg_reader::readline() ++{ ++ // a word about memory management: this Alg_reader has a ++ // member variable input_line that holds a line of input ++ // it is reused for each line. input_line is parsed by ++ // line_parser, which holds a reference to input_line ++ line_parser_flag = false; ++ if (getline(*file, input_line)) { ++ line_parser.init(&input_line); ++ line_parser_flag = true; ++ error_flag = false; ++ } ++} ++ ++ ++Alg_parameters_ptr Alg_reader::process_attributes( ++ Alg_parameters_ptr attributes, double time) ++{ ++ // print "process_attributes:", attributes ++ bool ts_flag = false; ++ if (attributes) { ++ Alg_parameters_ptr a; ++ bool in_seconds = seq->get_units_are_seconds(); ++ if (a = Alg_parameters::remove_key(&attributes, "tempor")) { ++ double tempo = a->parm.r; ++ seq->insert_tempo(tempo, seq->get_time_map()->time_to_beat(time)); ++ } ++ if (a = Alg_parameters::remove_key(&attributes, "beatr")) { ++ double beat = a->parm.r; ++ seq->insert_beat(time, beat); ++ } ++ if (a = Alg_parameters::remove_key(&attributes, "timesig_numr")) { ++ tsnum = a->parm.r; ++ ts_flag = true; ++ } ++ if (a = Alg_parameters::remove_key(&attributes, "timesig_denr")) { ++ tsden = a->parm.r; ++ ts_flag = true; ++ } ++ if (ts_flag) { ++ seq->set_time_sig(seq->get_time_map()->time_to_beat(time), ++ tsnum, tsden); ++ } ++ if (in_seconds) seq->convert_to_seconds(); ++ } ++ return attributes; // in case it was modified ++} ++ ++ ++bool Alg_reader::parse() ++{ ++ int voice = 0; ++ int key = 60; ++ double loud = 100.0; ++ double pitch = 60.0; ++ double dur = 1.0; ++ double time = 0.0; ++ int track_num = 0; ++ seq->convert_to_seconds(); ++ //seq->set_real_dur(0.0); // just in case it's not initialized already ++ readline(); ++ bool valid = false; // ignore blank lines ++ while (line_parser_flag) { ++ bool time_flag = false; ++ bool next_flag = false; ++ double next; ++ bool voice_flag = false; ++ bool loud_flag = false; ++ bool dur_flag = false; ++ bool new_pitch_flag = false; // "P" syntax or "A"-"G" syntax ++ double new_pitch = 0.0; ++ bool new_key_flag = false; // "K" syntax ++ int new_key = 0; ++ Alg_parameters_ptr attributes = NULL; ++ if (line_parser.peek() == '#') { ++ // look for #track ++ line_parser.get_nonspace_quoted(field); ++ if (streql(field.c_str(), "#track")) { ++ line_parser.get_nonspace_quoted(field); // number ++ field.insert(0, " "); // need char at beginning because ++ // parse_int ignores the first character of the argument ++ track_num = parse_int(field); ++ seq->add_track(track_num); ++ ++ // maybe we have a sequence or track name ++ line_parser.get_remainder(field); ++ // if there is a non-space character after #track n then ++ // use it as sequence or track name. Note that because we ++ // skip over spaces, a sequence or track name cannot begin ++ // with leading blanks. Another decision is that the name ++ // must be at time zero ++ if (field.length() > 0) { ++ // insert the field as sequence name or track name ++ Alg_update_ptr update = new Alg_update; ++ update->chan = -1; ++ update->time = 0; ++ update->set_identifier(-1); ++ // sequence name is whatever is on track 0 ++ // other tracks have track names ++ const char *attr = ++ (track_num == 0 ? "seqnames" : "tracknames"); ++ update->parameter.set_attr( ++ symbol_table.insert_string(attr)); ++ update->parameter.s = heapify(field.c_str()); ++ seq->add_event(update, track_num); ++ } ++ } else if (streql(field.c_str(), "#offset")) { ++ if (offset_found) { ++ parse_error(field, 0, "#offset specified twice"); ++ } ++ offset_found = true; ++ line_parser.get_nonspace_quoted(field); // number ++ field.insert(0, " "); // need char at beginning because ++ // parse_real ignores first character in the argument ++ offset = parse_real(field); ++ } ++ } else { ++ // we must have a track to insert into ++ if (seq->tracks() == 0) seq->add_track(0); ++ line_parser.get_nonspace_quoted(field); ++ char pk = line_parser.peek(); ++ // attributes are parsed as two adjacent nonspace_quoted tokens ++ // so we have to conditionally call get_nonspace_quoted() again ++ if (pk && !isspace(pk)) { ++ string field2; ++ line_parser.get_nonspace_quoted(field2); ++ field.append(field2); ++ } ++ while (field[0]) { ++ char first = toupper(field[0]); ++ if (strchr("ABCDEFGKLPUSIQHW-", first)) { ++ valid = true; // it's a note or event ++ } ++ if (first == 'V') { ++ if (voice_flag) { ++ parse_error(field, 0, "Voice specified twice"); ++ } else { ++ voice = parse_chan(field); ++ } ++ voice_flag = true; ++ } else if (first == 'T') { ++ if (time_flag) { ++ parse_error(field, 0, "Time specified twice"); ++ } else { ++ time = parse_dur(field, 0.0); ++ } ++ time_flag = true; ++ } else if (first == 'N') { ++ if (next_flag) { ++ parse_error(field, 0, "Next specified twice"); ++ } else { ++ next = parse_dur(field, time); ++ } ++ next_flag = true; ++ } else if (first == 'K') { ++ if (new_key_flag) { ++ parse_error(field, 0, "Key specified twice"); ++ } else { ++ new_key = parse_key(field); ++ new_key_flag = true; ++ } ++ } else if (first == 'L') { ++ if (loud_flag) { ++ parse_error(field, 0, "Loudness specified twice"); ++ } else { ++ loud = parse_loud(field); ++ } ++ loud_flag = true; ++ } else if (first == 'P') { ++ if (new_pitch_flag) { ++ parse_error(field, 0, "Pitch specified twice"); ++ } else { ++ new_pitch = parse_pitch(field); ++ new_pitch_flag = true; ++ } ++ } else if (first == 'U') { ++ if (dur_flag) { ++ parse_error(field, 0, "Dur specified twice"); ++ } else { ++ dur = parse_dur(field, time); ++ dur_flag = true; ++ } ++ } else if (strchr("SIQHW", first)) { ++ if (dur_flag) { ++ parse_error(field, 0, "Dur specified twice"); ++ } else { ++ // prepend 'U' to field, copy EOS too ++ field.insert((unsigned int) 0, 1, 'U'); ++ dur = parse_dur(field, time); ++ dur_flag = true; ++ } ++ } else if (strchr("ABCDEFG", first)) { ++ if (new_pitch_flag) { ++ parse_error(field, 0, "Pitch specified twice"); ++ } else { ++ // prepend 'P' to field ++ field.insert((unsigned int) 0, 1, 'P'); ++ new_pitch = parse_pitch(field); ++ new_pitch_flag = true; ++ } ++ } else if (first == '-') { ++ Alg_parameter parm; ++ if (parse_attribute(field, &parm)) { // enter attribute-value pair ++ attributes = new Alg_parameters(attributes); ++ attributes->parm = parm; ++ parm.s = NULL; // protect string from deletion by destructor ++ } ++ } else { ++ parse_error(field, 0, "Unknown field"); ++ } ++ ++ if (error_flag) { ++ field[0] = 0; // exit the loop ++ } else { ++ line_parser.get_nonspace_quoted(field); ++ pk = line_parser.peek(); ++ // attributes are parsed as two adjacent nonspace_quoted ++ // tokens so we have to conditionally call ++ // get_nonspace_quoted() again ++ if (pk && !isspace(pk)) { ++ string field2; ++ line_parser.get_nonspace_quoted(field2); ++ field.append(field2); ++ } ++ } ++ } ++ // a case analysis: ++ // Key < 128 implies pitch unless pitch is explicitly given ++ // Pitch implies Key unless key is explicitly given, ++ // Pitch is rounded to nearest integer to determine the Key ++ // if necessary, so MIDI files will lose the pitch fraction ++ // A-G is a Pitch specification (therefore it implies Key) ++ // K60 P60 -- both are specified, use 'em ++ // K60 P60 C4 -- overconstrained, an error ++ // K60 C4 -- OK, but K60 is already implied by C4 ++ // K60 -- OK, pitch is 60 ++ // C4 P60 -- over constrained ++ // P60 -- OK, key is 60 ++ // P60.1 -- OK, key is 60 ++ // C4 -- OK, key is 60, pitch is 60 ++ // -- OK, key and pitch from before ++ // K200 P60 -- ok, pitch is 60 ++ // K200 with neither P60 nor C4 uses ++ // pitch from before ++ ++ // figure out what the key/instance is: ++ if (new_key_flag) { // it was directly specified ++ key = new_key; ++ } else if (new_pitch_flag) { ++ // pitch was specified, but key was not; get key from pitch ++ key = (int) (new_pitch + 0.5); // round to integer key number ++ } ++ if (new_pitch_flag) { ++ pitch = new_pitch; ++ } else if (key < 128 && new_key_flag) { ++ // no explicit pitch, but key < 128, so it implies pitch ++ pitch = key; ++ new_pitch_flag = true; ++ } ++ // now we've acquired new parameters ++ // if (it is a note, then enter the note ++ if (valid) { ++ // change tempo or beat ++ attributes = process_attributes(attributes, time); ++ // if there's a duration or pitch, make a note: ++ if (new_pitch_flag || dur_flag) { ++ Alg_note_ptr note_ptr = new Alg_note; ++ note_ptr->chan = voice; ++ note_ptr->time = time; ++ note_ptr->dur = dur; ++ note_ptr->set_identifier(key); ++ note_ptr->pitch = (float) pitch; ++ note_ptr->loud = (float) loud; ++ note_ptr->parameters = attributes; ++ seq->add_event(note_ptr, track_num); // sort later ++ if (seq->get_real_dur() < (time + dur)) seq->set_real_dur(time + dur); ++ } else { ++ int update_key = -1; ++ // key must appear explicitly; otherwise ++ // update applies to channel ++ if (new_key_flag) { ++ update_key = key; ++ } ++ if (loud_flag) { ++ Alg_update_ptr new_upd = new Alg_update; ++ new_upd->chan = voice; ++ new_upd->time = time; ++ new_upd->set_identifier(update_key); ++ new_upd->parameter.set_attr(symbol_table.insert_string("loudr")); ++ new_upd->parameter.r = pitch; ++ seq->add_event(new_upd, track_num); ++ if (seq->get_real_dur() < time) seq->set_real_dur(time); ++ } ++ if (attributes) { ++ while (attributes) { ++ Alg_update_ptr new_upd = new Alg_update; ++ new_upd->chan = voice; ++ new_upd->time = time; ++ new_upd->set_identifier(update_key); ++ new_upd->parameter = attributes->parm; ++ seq->add_event(new_upd, track_num); ++ Alg_parameters_ptr p = attributes; ++ attributes = attributes->next; ++ p->parm.s = NULL; // so we don't delete the string ++ delete p; ++ } ++ } ++ } ++ if (next_flag) { ++ time = time + next; ++ } else if (dur_flag || new_pitch_flag) { // a note: incr by dur ++ time = time + dur; ++ } ++ } ++ } ++ readline(); ++ } ++ if (!error_flag) { // why not convert even if there was an error? -RBD ++ seq->convert_to_seconds(); // make sure format is correct ++ } ++ // real_dur is valid, translate to beat_dur ++ seq->set_beat_dur((seq->get_time_map())->time_to_beat(seq->get_real_dur())); ++ return error_flag; ++} ++ ++ ++long Alg_reader::parse_chan(string &field) ++{ ++ const char *int_string = field.c_str() + 1; ++ char *msg = "Integer or - expected"; ++ const char *p = int_string; ++ char c; ++ // check that all chars in int_string are digits or '-': ++ while (c = *p++) { ++ if (!isdigit(c) && c != '-') { ++ parse_error(field, p - field.c_str() - 1, msg); ++ return 0; ++ } ++ } ++ p--; // p now points to end-of-string character ++ if (p - int_string == 0) { ++ // bad: string length is zero ++ parse_error(field, 1, msg); ++ return 0; ++ } ++ if (p - int_string == 1 && int_string[0] == '-') { ++ // special case: entire string is "-", interpret as -1 ++ return -1; ++ } ++ return atoi(int_string); ++} ++ ++ ++long Alg_reader::parse_int(string &field) ++{ ++ const char *int_string = field.c_str() + 1; ++ char *msg = "Integer expected"; ++ const char *p = int_string; ++ char c; ++ // check that all chars in int_string are digits: ++ while (c = *p++) { ++ if (!isdigit(c)) { ++ parse_error(field, p - field.c_str() - 1, msg); ++ return 0; ++ } ++ } ++ p--; // p now points to end-of-string character ++ if (p - int_string == 0) { ++ // bad: string length is zero ++ parse_error(field, 1, msg); ++ return 0; ++ } ++ return atoi(int_string); ++} ++ ++ ++int Alg_reader::find_real_in(string &field, int n) ++{ ++ // scans from offset n to the end of a real constant ++ bool decimal = false; ++ int len = field.length(); ++ if (n < len && field[n] == '-') n += 1; // parse one minus sign ++ for (int i = n; i < len; i++) { ++ char c = field[i]; ++ if (!isdigit(c)) { ++ if (c == '.' && !decimal) { ++ decimal = true; ++ } else { ++ return i; ++ } ++ } ++ } ++ return len; ++} ++ ++ ++double Alg_reader::parse_real(string &field) ++{ ++ char *msg = "Real expected"; ++ int last = find_real_in(field, 1); ++ string real_string = field.substr(1, last - 1); ++ if (last <= 1 || last < (int) field.length()) { ++ parse_error(field, 1, msg); ++ return 0; ++ } ++ return atof(real_string.c_str()); ++} ++ ++ ++void Alg_reader::parse_error(string &field, long offset, char *message) ++{ ++ int position = line_parser.pos - field.length() + offset; ++ error_flag = true; ++ puts(line_parser.str->c_str()); ++ for (int i = 0; i < position; i++) { ++ putc(' ', stdout); ++ } ++ putc('^', stdout); ++ printf(" %s\n", message); ++} ++ ++ ++double duration_lookup[] = { 0.25, 0.5, 1.0, 2.0, 4.0 }; ++ ++ ++double Alg_reader::parse_dur(string &field, double base) ++{ ++ char *msg = "Duration expected"; ++ char *durs = "SIQHW"; ++ char *p; ++ int last; ++ double dur; ++ if (field.length() < 2) { ++ // fall through to error message ++ return -1; ++ } else if (isdigit(field[1])) { ++ last = find_real_in(field, 1); ++ string real_string = field.substr(1, last - 1); ++ dur = atof(real_string.c_str()); ++ // convert dur from seconds to beats ++ dur = seq->get_time_map()->time_to_beat(base + dur) - ++ seq->get_time_map()->time_to_beat(base); ++ } else if (p = strchr(durs, toupper(field[1]))) { ++ dur = duration_lookup[p - durs]; ++ last = 2; ++ } else { ++ parse_error(field, 1, msg); ++ return 0; ++ } ++ dur = parse_after_dur(dur, field, last, base); ++ dur = seq->get_time_map()->beat_to_time( ++ seq->get_time_map()->time_to_beat(base) + dur) - base; ++ return dur; ++} ++ ++ ++double Alg_reader::parse_after_dur(double dur, string &field, ++ int n, double base) ++{ ++ if ((int) field.length() == n) { ++ return dur; ++ } ++ if (toupper(field[n]) == 'T') { ++ return parse_after_dur(dur * 2/3, field, n + 1, base); ++ } ++ if (field[n] == '.') { ++ return parse_after_dur(dur * 1.5, field, n + 1, base); ++ } ++ if (isdigit(field[n])) { ++ int last = find_real_in(field, n); ++ string a_string = field.substr(n, last - n); ++ double f = atof(a_string.c_str()); ++ return parse_after_dur(dur * f, field, last, base); ++ } ++ if (field[n] == '+') { ++ string a_string = field.substr(n + 1); ++ return dur + parse_dur( ++ a_string, seq->get_time_map()->beat_to_time( ++ seq->get_time_map()->time_to_beat(base) + dur)); ++ } ++ parse_error(field, n, "Unexpected character in duration"); ++ return dur; ++} ++ ++struct loud_lookup_struct { ++ char *str; ++ int val; ++} loud_lookup[] = { {"FFF", 127}, {"FF", 120}, {"F", 110}, {"MF", 100}, ++ {"MP", 90}, {"P", 80}, {"PP", 70}, {"PPP", 60}, ++ {NULL, 0} }; ++ ++ ++double Alg_reader::parse_loud(string &field) ++{ ++ char *msg = "Loudness expected"; ++ if (isdigit(field[1])) { ++ return parse_int(field); ++ } else { ++ string dyn = field.substr(1); ++ transform(dyn.begin(), dyn.end(), dyn.begin(), ::toupper); ++ for (int i = 0; loud_lookup[i].str; i++) { ++ if (streql(loud_lookup[i].str, dyn.c_str())) { ++ return (double) loud_lookup[i].val; ++ } ++ } ++ } ++ parse_error(field, 1, msg); ++ return 100.0; ++} ++ ++ ++int key_lookup[] = {21, 23, 12, 14, 16, 17, 19}; ++ ++ ++// the field can be K or K[A-G] or P[A-G] ++// (this can be called from parse_pitch() to handle [A-G]) ++// Notice that the routine ignores the first character: K or P ++// ++long Alg_reader::parse_key(string &field) ++{ ++ char *msg = "Pitch expected"; ++ char *pitches = "ABCDEFG"; ++ char *p; ++ if (isdigit(field[1])) { ++ // This routine would not have been called if field = "P" ++ // so it must be "K" so must be an integer. ++ return parse_int(field); ++ } else if (p = strchr(pitches, toupper(field[1]))) { ++ long key = key_lookup[p - pitches]; ++ key = parse_after_key(key, field, 2); ++ return key; ++ } ++ parse_error(field, 1, msg); ++ return 0; ++} ++ ++ ++long Alg_reader::parse_after_key(int key, string &field, int n) ++{ ++ if ((int) field.length() == n) { ++ return key; ++ } ++ char c = toupper(field[n]); ++ if (c == 'S') { ++ return parse_after_key(key + 1, field, n + 1); ++ } ++ if (c == 'F') { ++ return parse_after_key(key - 1, field, n + 1); ++ } ++ if (isdigit(field[n])) { ++ int last = find_int_in(field, n); ++ string octave = field.substr(n, last - n); ++ int oct = atoi(octave.c_str()); ++ return parse_after_key(key + oct * 12, field, last); ++ } ++ parse_error(field, n, "Unexpected character in pitch"); ++ return key; ++} ++ ++ ++long Alg_reader::find_int_in(string &field, int n) ++{ ++ while ((int) field.length() > n && isdigit(field[n])) { ++ n = n + 1; ++ } ++ return n; ++} ++ ++ ++bool Alg_reader::parse_attribute(string &field, Alg_parameter_ptr param) ++{ ++ int i = 1; ++ while (i < (int) field.length()) { ++ if (field[i] == ':') { ++ string attr = field.substr(1, i - 1); ++ char type_char = field[i - 1]; ++ if (strchr("iarsl", type_char)) { ++ param->set_attr(symbol_table.insert_string(attr.c_str())); ++ parse_val(param, field, i + 1); ++ } else { ++ parse_error(field, 0, "attribute needs to end with typecode: i,a,r,s, or l"); ++ } ++ return !error_flag; ++ } ++ i = i + 1; ++ } ++ return false; ++} ++ ++ ++bool Alg_reader::parse_val(Alg_parameter_ptr param, string &s, int i) ++{ ++ int len = (int) s.length(); ++ if (i >= len) { ++ return false; ++ } ++ if (s[i] == '"') { ++ if (!check_type('s', param)) { ++ return false; ++ } ++ // note: (len - i) includes 2 quote characters but no EOS character ++ // so total memory to allocate is (len - i) - 1 ++ char *r = new char[(len - i) - 1]; ++ strncpy(r, s.c_str() + i + 1, (len - i) - 2); ++ r[(len - i) - 2] = 0; // terminate the string ++ param->s = r; ++ } else if (s[i] == '\'') { ++ if (!check_type('a', param)) { ++ return false; ++ } ++ string r = s.substr(i + 1, len - i - 2); ++ param->a = symbol_table.insert_string(r.c_str()); ++ } else if (param->attr_type() == 'l') { ++ if (streql(s.c_str() + i, "true") || ++ streql(s.c_str() + i, "t")) { ++ param->l = true; ++ } else if (streql(s.c_str() + i, "false") || ++ streql(s.c_str() + i, "nil")) { ++ param->l = false; ++ } else return false; ++ } else if (isdigit(s[i]) || s[i] == '-' || s[i] == '.') { ++ int pos = i; ++ bool period = false; ++ int sign = 1; ++ if (s[pos] == '-') { ++ sign = -1; ++ pos++; ++ } ++ while (pos < len) { ++ if (isdigit(s[pos])) { ++ ; ++ } else if (!period && s[pos] == '.') { ++ period = true; ++ } else { ++ parse_error(s, pos, "Unexpected char in number"); ++ return false; ++ } ++ pos = pos + 1; ++ } ++ string r = s.substr(i, len - i); ++ if (period) { ++ if (!check_type('r', param)) { ++ return false; ++ } ++ param->r = atof(r.c_str()); ++ } else { ++ if (param->attr_type() == 'r') { ++ param->r = atoi(r.c_str()); ++ } else if (!check_type('i', param)) { ++ return false; ++ } else { ++ param->i = atoi(r.c_str()); ++ } ++ } ++ } else { ++ parse_error(s, i, "invalid value"); ++ return false; ++ } ++ return true; ++} ++ ++ ++bool Alg_reader::check_type(char type_char, Alg_parameter_ptr param) ++{ ++ return param->attr_type() == type_char; ++} ++ ++ ++//duration_lookup = {"S": 0.5, "I": 0.5, "Q": 1, "H": 2, "W": 4} ++//key_lookup = {"C": 12, "D": 14, "E": 16, "F": 17, "G": 19, "A": 21, "B": 23} ++ ++/* ++def test(): ++ reader = Alg_reader(open("data\\test.gro", "r")) ++ reader.parse() ++ score = reader->seq.notes ++ print "score:", score ++ reader = nil ++*/ +diff --git a/allegroserial.cpp b/allegroserial.cpp +index e6b52f3..3d43577 100755 +--- a/allegroserial.cpp ++++ b/allegroserial.cpp +@@ -1,2 +1,2 @@ +-// allegroserial.cpp -- convert track to memory buffer and back to structure +- ++// allegroserial.cpp -- convert track to memory buffer and back to structure ++ +diff --git a/allegrosmfrd.cpp b/allegrosmfrd.cpp +index 456fe50..2010ede 100755 +--- a/allegrosmfrd.cpp ++++ b/allegrosmfrd.cpp +@@ -1,455 +1,455 @@ +-// midifile reader +- +-#include "stdlib.h" +-#include "stdio.h" +-#include "string.h" +-#include "assert.h" +-#include +-#include +-#include "allegro.h" +-#include "algsmfrd_internal.h" +-#include "mfmidi.h" +-#include "trace.h" +- +-using namespace std; +- +-typedef class Alg_note_list { +-public: +- Alg_note_ptr note; +- class Alg_note_list *next; +- Alg_note_list(Alg_note_ptr n, class Alg_note_list *list) { +- note = n; next = list; } +-} *Alg_note_list_ptr; +- +- +-class Alg_midifile_reader: public Midifile_reader { +-public: +- istream *file; +- Alg_seq_ptr seq; +- int divisions; +- Alg_note_list_ptr note_list; +- Alg_track_ptr track; +- int track_number; // the number of the (current) track +- // chan is actual_channel + channel_offset_per_track * track_num + +- // channel_offset_per_track * port +- long channel_offset_per_track; // used to encode track number into channel +- // default is 0, set this to 0 to merge all tracks to 16 channels +- long channel_offset_per_port; // used to encode port number into channel +- // default is 16, set to 0 to ignore port prefix meta events +- // while reading, this is channel_offset_per_track * track_num +- int channel_offset; +- +- Alg_midifile_reader(istream &f, Alg_seq_ptr new_seq) { +- file = &f; +- note_list = NULL; +- seq = new_seq; +- channel_offset_per_track = 0; +- channel_offset_per_port = 16; +- track_number = -1; // no tracks started yet, 1st will be #0 +- meta_channel = -1; +- port = 0; +- } +- // delete destroys the seq member as well, so set it to NULL if you +- // copied the pointer elsewhere +- ~Alg_midifile_reader(); +- // the following is used to load the Alg_seq from the file: +- bool parse(); +- +- void set_nomerge(bool flag) { Mf_nomerge = flag; } +- void set_skipinit(bool flag) { Mf_skipinit = flag; } +- long get_currtime() { return Mf_currtime; } +- +-protected: +- int meta_channel; // the channel for meta events, set by MIDI chan prefix +- int port; // value from the portprefix meta event +- +- double get_time(); +- void update(int chan, int key, Alg_parameter_ptr param); +- void *Mf_malloc(size_t size) { return malloc(size); } +- void Mf_free(void *obj, size_t size) { free(obj); } +- /* Methods to be called while processing the MIDI file. */ +- void Mf_starttrack(); +- void Mf_endtrack(); +- int Mf_getc(); +- void Mf_chanprefix(int chan); +- void Mf_portprefix(int port); +- void Mf_eot(); +- void Mf_error(char *); +- void Mf_header(int,int,int); +- void Mf_on(int,int,int); +- void Mf_off(int,int,int); +- void Mf_pressure(int,int,int); +- void Mf_controller(int,int,int); +- void Mf_pitchbend(int,int,int); +- void Mf_program(int,int); +- void Mf_chanpressure(int,int); +- void binary_msg(int len, unsigned char *msg, const char *attr_string); +- void Mf_sysex(int,unsigned char*); +- void Mf_arbitrary(int,unsigned char*); +- void Mf_metamisc(int,int,unsigned char*); +- void Mf_seqnum(int); +- void Mf_smpte(int,int,int,int,int); +- void Mf_timesig(int,int,int,int); +- void Mf_tempo(int); +- void Mf_keysig(int,int); +- void Mf_sqspecific(int,unsigned char*); +- void Mf_text(int,int,unsigned char*); +-}; +- +- +-Alg_midifile_reader::~Alg_midifile_reader() +-{ +- while (note_list) { +- Alg_note_list_ptr to_be_freed = note_list; +- note_list = note_list->next; +- delete to_be_freed; +- } +- finalize(); // free Mf reader memory +-} +- +- +-bool Alg_midifile_reader::parse() +-{ +- channel_offset = 0; +- seq->convert_to_beats(); +- midifile(); +- seq->set_real_dur(seq->get_time_map()->beat_to_time(seq->get_beat_dur())); +- return midifile_error != 0; +-} +- +- +-void Alg_midifile_reader::Mf_starttrack() +-{ +- // printf("starting new track\n"); +- // create a new track that will share the sequence time map +- // since time is in beats, the seconds parameter is false +- track_number++; +- seq->add_track(track_number); // make sure track exists +- track = seq->track(track_number); // keep pointer to current track +- meta_channel = -1; +- port = 0; +-} +- +- +-void Alg_midifile_reader::Mf_endtrack() +-{ +- // note: track is already part of seq, so do not add it here +- // printf("finished track, length %d number %d\n", track->len, track_num / 100); +- channel_offset += seq->channel_offset_per_track; +- track = NULL; +- double now = get_time(); +- if (seq->get_beat_dur() < now) seq->set_beat_dur(now); +- meta_channel = -1; +- port = 0; +-} +- +- +-int Alg_midifile_reader::Mf_getc() +-{ +- return file->get(); +-} +- +- +-void Alg_midifile_reader::Mf_chanprefix(int chan) +-{ +- meta_channel = chan; +-} +- +- +-void Alg_midifile_reader::Mf_portprefix(int p) +-{ +- port = p; +-} +- +- +-void Alg_midifile_reader::Mf_eot() +-{ +- meta_channel = -1; +- port = 0; +-} +- +- +-void Alg_midifile_reader::Mf_error(char *msg) +-{ +- fprintf(stdout, "Midifile reader error: %s\n", msg); +-} +- +- +-void Alg_midifile_reader::Mf_header(int format, int ntrks, int division) +-{ +- if (format > 1) { +- char msg[80]; +-#pragma warning(disable: 4996) // msg is long enough +- sprintf(msg, "file format %d not implemented", format); +-#pragma warning(default: 4996) +- Mf_error(msg); +- } +- divisions = division; +-} +- +- +-double Alg_midifile_reader::get_time() +-{ +- double beat = ((double) get_currtime()) / divisions; +- return beat; +-} +- +- +-void Alg_midifile_reader::Mf_on(int chan, int key, int vel) +-{ +- assert(!seq->get_units_are_seconds()); +- if (vel == 0) { +- Mf_off(chan, key, vel); +- return; +- } +- Alg_note_ptr note = new Alg_note(); +- note_list = new Alg_note_list(note, note_list); +- /* trace("on: %d at %g\n", key, get_time()); */ +- note->time = get_time(); +- note->chan = chan + channel_offset + port * channel_offset_per_port; +- note->dur = 0; +- note->set_identifier(key); +- note->pitch = (float) key; +- note->loud = (float) vel; +- track->append(note); +- meta_channel = -1; +-} +- +- +-void Alg_midifile_reader::Mf_off(int chan, int key, int vel) +-{ +- double time = get_time(); +- Alg_note_list_ptr *p = ¬e_list; +- while (*p) { +- if ((*p)->note->get_identifier() == key && +- (*p)->note->chan == +- chan + channel_offset + port * channel_offset_per_port) { +- (*p)->note->dur = time - (*p)->note->time; +- // trace("updated %d dur %g\n", (*p)->note->key, (*p)->note->dur); +- Alg_note_list_ptr to_be_freed = *p; +- *p = to_be_freed->next; +- delete to_be_freed; +- } else { +- p = &((*p)->next); +- } +- } +- meta_channel = -1; +-} +- +- +-void Alg_midifile_reader::update(int chan, int key, Alg_parameter_ptr param) +-{ +- Alg_update_ptr update = new Alg_update; +- update->time = get_time(); +- update->chan = chan; +- if (chan != -1) { +- update->chan = chan + channel_offset + port * channel_offset_per_port; +- } +- update->set_identifier(key); +- update->parameter = *param; +- // prevent the destructor from destroying the string twice! +- // the new Update takes the string from param +- if (param->attr_type() == 's') param->s = NULL; +- track->append(update); +-} +- +- +-void Alg_midifile_reader::Mf_pressure(int chan, int key, int val) +-{ +- Alg_parameter parameter; +- parameter.set_attr(symbol_table.insert_string("pressurer")); +- parameter.r = val / 127.0; +- update(chan, key, ¶meter); +- meta_channel = -1; +-} +- +- +-void Alg_midifile_reader::Mf_controller(int chan, int control, int val) +-{ +- Alg_parameter parameter; +- char name[32]; +-#pragma warning(disable: 4996) // name is long enough +- sprintf(name, "control%dr", control); +-#pragma warning(default: 4996) +- parameter.set_attr(symbol_table.insert_string(name)); +- parameter.r = val / 127.0; +- update(chan, -1, ¶meter); +- meta_channel = -1; +-} +- +- +-void Alg_midifile_reader::Mf_pitchbend(int chan, int c1, int c2) +-{ +- Alg_parameter parameter; +- parameter.set_attr(symbol_table.insert_string("bendr")); +- parameter.r = ((c2 << 7) + c1) / 8192.0 - 1.0; +- update(chan, -1, ¶meter); +- meta_channel = -1; +-} +- +- +-void Alg_midifile_reader::Mf_program(int chan, int program) +-{ +- Alg_parameter parameter; +- parameter.set_attr(symbol_table.insert_string("programi")); +- parameter.i = program; +- update(chan, -1, ¶meter); +- meta_channel = -1; +-} +- +- +-void Alg_midifile_reader::Mf_chanpressure(int chan, int val) +-{ +- Alg_parameter parameter; +- parameter.set_attr(symbol_table.insert_string("pressurer")); +- parameter.r = val / 127.0; +- update(chan, -1, ¶meter); +- meta_channel = -1; +-} +- +- +-void Alg_midifile_reader::binary_msg(int len, unsigned char *msg, +- const char *attr_string) +-{ +- Alg_parameter parameter; +- char *hexstr = new char[len * 2 + 1]; +- for (int i = 0; i < len; i++) { +-#pragma warning(disable: 4996) // hexstr is long enough +- sprintf(hexstr + 2 * i, "%02x", (0xFF & msg[i])); +-#pragma warning(default: 4996) +- } +- parameter.s = hexstr; +- parameter.set_attr(symbol_table.insert_string(attr_string)); +- update(meta_channel, -1, ¶meter); +-} +- +- +-void Alg_midifile_reader::Mf_sysex(int len, unsigned char *msg) +-{ +- // sysex messages become updates with attribute sysexs and a hex string +- binary_msg(len, msg, "sysexs"); +-} +- +- +-void Alg_midifile_reader::Mf_arbitrary(int len, unsigned char *msg) +-{ +- Mf_error("arbitrary data ignored"); +-} +- +- +-void Alg_midifile_reader::Mf_metamisc(int type, int len, unsigned char *msg) +-{ +- char text[128]; +-#pragma warning(disable: 4996) // text is long enough +- sprintf(text, "metamsic data, type 0x%x, ignored", type); +-#pragma warning(default: 4996) +- Mf_error(text); +-} +- +- +-void Alg_midifile_reader::Mf_seqnum(int n) +-{ +- Mf_error("seqnum data ignored"); +-} +- +- +-static char *fpsstr[4] = {"24", "25", "29.97", "30"}; +- +-void Alg_midifile_reader::Mf_smpte(int hours, int mins, int secs, +- int frames, int subframes) +-{ +- // string will look like "24fps:01h:27m:07s:19.00f" +- // 30fps (drop frame) is notated as "29.97fps" +- char text[32]; +- int fps = (hours >> 6) & 3; +- hours &= 0x1F; +-#pragma warning(disable: 4996) // text is long enough +- sprintf(text, "%sfps:%02dh:%02dm:%02ds:%02d.%02df", +- fpsstr[fps], hours, mins, secs, frames, subframes); +-#pragma warning(default: 4996) +- Alg_parameter smpteoffset; +- smpteoffset.s = heapify(text); +- smpteoffset.set_attr(symbol_table.insert_string("smpteoffsets")); +- update(meta_channel, -1, &smpteoffset); +- // Mf_error("SMPTE data ignored"); +-} +- +- +-void Alg_midifile_reader::Mf_timesig(int i1, int i2, int i3, int i4) +-{ +- seq->set_time_sig(double(get_currtime()) / divisions, i1, 1 << i2); +-} +- +- +-void Alg_midifile_reader::Mf_tempo(int tempo) +-{ +- double beat = get_currtime(); +- beat = beat / divisions; // convert to quarters +- // 6000000 us/min / n us/beat => beat / min +- double bpm = 60000000.0 / tempo; +- seq->insert_tempo(bpm, beat); +-} +- +- +-void Alg_midifile_reader::Mf_keysig(int key, int mode) +-{ +- Alg_parameter key_parm; +- key_parm.set_attr(symbol_table.insert_string("keysigi")); +- // use 0 for C major, 1 for G, -1 for F, etc., that is, +- // the number of sharps, where flats are negative sharps +- key_parm.i = key; //<<<---- fix this +- // use -1 to mean "all channels" +- update(meta_channel, -1, &key_parm); +- Alg_parameter mode_parm; +- mode_parm.set_attr(symbol_table.insert_string("modea")); +- mode_parm.a = (mode == 0 ? symbol_table.insert_string("major") : +- symbol_table.insert_string("minor")); +- update(meta_channel, -1, &mode_parm); +-} +- +- +-void Alg_midifile_reader::Mf_sqspecific(int len, unsigned char *msg) +-{ +- // sequencer specific messages become updates with attribute sqspecifics +- // and a hex string for the value +- binary_msg(len, msg, "sqspecifics"); +-} +- +- +-char *heapify2(int len, unsigned char *s) +-{ +- char *h = new char[len + 1]; +- memcpy(h, s, len); +- h[len] = 0; +- return h; +-} +- +- +-void Alg_midifile_reader::Mf_text(int type, int len, unsigned char *msg) +-{ +- Alg_parameter text; +- text.s = heapify2(len, msg); +- const char *attr = "miscs"; +- if (type == 1) attr = "texts"; +- else if (type == 2) attr = "copyrights"; +- else if (type == 3) +- attr = (track_number == 0 ? "seqnames" : "tracknames"); +- else if (type == 4) attr = "instruments"; +- else if (type == 5) attr = "lyrics"; +- else if (type == 6) attr = "markers"; +- else if (type == 7) attr = "cues"; +- text.set_attr(symbol_table.insert_string(attr)); +- update(meta_channel, -1, &text); +-} +- +- +-// parse file into a seq. +-Alg_error alg_smf_read(istream &file, Alg_seq_ptr new_seq) +-{ +- assert(new_seq); +- Alg_midifile_reader ar(file, new_seq); +- bool err = ar.parse(); +- ar.seq->set_real_dur(ar.seq->get_time_map()-> +- beat_to_time(ar.seq->get_beat_dur())); +- return (err ? alg_error_syntax : alg_no_error); +-} ++// midifile reader ++ ++#include "stdlib.h" ++#include "stdio.h" ++#include "string.h" ++#include "assert.h" ++#include ++#include ++#include "allegro.h" ++#include "algsmfrd_internal.h" ++#include "mfmidi.h" ++#include "trace.h" ++ ++using namespace std; ++ ++typedef class Alg_note_list { ++public: ++ Alg_note_ptr note; ++ class Alg_note_list *next; ++ Alg_note_list(Alg_note_ptr n, class Alg_note_list *list) { ++ note = n; next = list; } ++} *Alg_note_list_ptr; ++ ++ ++class Alg_midifile_reader: public Midifile_reader { ++public: ++ istream *file; ++ Alg_seq_ptr seq; ++ int divisions; ++ Alg_note_list_ptr note_list; ++ Alg_track_ptr track; ++ int track_number; // the number of the (current) track ++ // chan is actual_channel + channel_offset_per_track * track_num + ++ // channel_offset_per_track * port ++ long channel_offset_per_track; // used to encode track number into channel ++ // default is 0, set this to 0 to merge all tracks to 16 channels ++ long channel_offset_per_port; // used to encode port number into channel ++ // default is 16, set to 0 to ignore port prefix meta events ++ // while reading, this is channel_offset_per_track * track_num ++ int channel_offset; ++ ++ Alg_midifile_reader(istream &f, Alg_seq_ptr new_seq) { ++ file = &f; ++ note_list = NULL; ++ seq = new_seq; ++ channel_offset_per_track = 0; ++ channel_offset_per_port = 16; ++ track_number = -1; // no tracks started yet, 1st will be #0 ++ meta_channel = -1; ++ port = 0; ++ } ++ // delete destroys the seq member as well, so set it to NULL if you ++ // copied the pointer elsewhere ++ ~Alg_midifile_reader(); ++ // the following is used to load the Alg_seq from the file: ++ bool parse(); ++ ++ void set_nomerge(bool flag) { Mf_nomerge = flag; } ++ void set_skipinit(bool flag) { Mf_skipinit = flag; } ++ long get_currtime() { return Mf_currtime; } ++ ++protected: ++ int meta_channel; // the channel for meta events, set by MIDI chan prefix ++ int port; // value from the portprefix meta event ++ ++ double get_time(); ++ void update(int chan, int key, Alg_parameter_ptr param); ++ void *Mf_malloc(size_t size) { return malloc(size); } ++ void Mf_free(void *obj, size_t size) { free(obj); } ++ /* Methods to be called while processing the MIDI file. */ ++ void Mf_starttrack(); ++ void Mf_endtrack(); ++ int Mf_getc(); ++ void Mf_chanprefix(int chan); ++ void Mf_portprefix(int port); ++ void Mf_eot(); ++ void Mf_error(char *); ++ void Mf_header(int,int,int); ++ void Mf_on(int,int,int); ++ void Mf_off(int,int,int); ++ void Mf_pressure(int,int,int); ++ void Mf_controller(int,int,int); ++ void Mf_pitchbend(int,int,int); ++ void Mf_program(int,int); ++ void Mf_chanpressure(int,int); ++ void binary_msg(int len, unsigned char *msg, const char *attr_string); ++ void Mf_sysex(int,unsigned char*); ++ void Mf_arbitrary(int,unsigned char*); ++ void Mf_metamisc(int,int,unsigned char*); ++ void Mf_seqnum(int); ++ void Mf_smpte(int,int,int,int,int); ++ void Mf_timesig(int,int,int,int); ++ void Mf_tempo(int); ++ void Mf_keysig(int,int); ++ void Mf_sqspecific(int,unsigned char*); ++ void Mf_text(int,int,unsigned char*); ++}; ++ ++ ++Alg_midifile_reader::~Alg_midifile_reader() ++{ ++ while (note_list) { ++ Alg_note_list_ptr to_be_freed = note_list; ++ note_list = note_list->next; ++ delete to_be_freed; ++ } ++ finalize(); // free Mf reader memory ++} ++ ++ ++bool Alg_midifile_reader::parse() ++{ ++ channel_offset = 0; ++ seq->convert_to_beats(); ++ midifile(); ++ seq->set_real_dur(seq->get_time_map()->beat_to_time(seq->get_beat_dur())); ++ return midifile_error != 0; ++} ++ ++ ++void Alg_midifile_reader::Mf_starttrack() ++{ ++ // printf("starting new track\n"); ++ // create a new track that will share the sequence time map ++ // since time is in beats, the seconds parameter is false ++ track_number++; ++ seq->add_track(track_number); // make sure track exists ++ track = seq->track(track_number); // keep pointer to current track ++ meta_channel = -1; ++ port = 0; ++} ++ ++ ++void Alg_midifile_reader::Mf_endtrack() ++{ ++ // note: track is already part of seq, so do not add it here ++ // printf("finished track, length %d number %d\n", track->len, track_num / 100); ++ channel_offset += seq->channel_offset_per_track; ++ track = NULL; ++ double now = get_time(); ++ if (seq->get_beat_dur() < now) seq->set_beat_dur(now); ++ meta_channel = -1; ++ port = 0; ++} ++ ++ ++int Alg_midifile_reader::Mf_getc() ++{ ++ return file->get(); ++} ++ ++ ++void Alg_midifile_reader::Mf_chanprefix(int chan) ++{ ++ meta_channel = chan; ++} ++ ++ ++void Alg_midifile_reader::Mf_portprefix(int p) ++{ ++ port = p; ++} ++ ++ ++void Alg_midifile_reader::Mf_eot() ++{ ++ meta_channel = -1; ++ port = 0; ++} ++ ++ ++void Alg_midifile_reader::Mf_error(char *msg) ++{ ++ fprintf(stdout, "Midifile reader error: %s\n", msg); ++} ++ ++ ++void Alg_midifile_reader::Mf_header(int format, int ntrks, int division) ++{ ++ if (format > 1) { ++ char msg[80]; ++#pragma warning(disable: 4996) // msg is long enough ++ sprintf(msg, "file format %d not implemented", format); ++#pragma warning(default: 4996) ++ Mf_error(msg); ++ } ++ divisions = division; ++} ++ ++ ++double Alg_midifile_reader::get_time() ++{ ++ double beat = ((double) get_currtime()) / divisions; ++ return beat; ++} ++ ++ ++void Alg_midifile_reader::Mf_on(int chan, int key, int vel) ++{ ++ assert(!seq->get_units_are_seconds()); ++ if (vel == 0) { ++ Mf_off(chan, key, vel); ++ return; ++ } ++ Alg_note_ptr note = new Alg_note(); ++ note_list = new Alg_note_list(note, note_list); ++ /* trace("on: %d at %g\n", key, get_time()); */ ++ note->time = get_time(); ++ note->chan = chan + channel_offset + port * channel_offset_per_port; ++ note->dur = 0; ++ note->set_identifier(key); ++ note->pitch = (float) key; ++ note->loud = (float) vel; ++ track->append(note); ++ meta_channel = -1; ++} ++ ++ ++void Alg_midifile_reader::Mf_off(int chan, int key, int vel) ++{ ++ double time = get_time(); ++ Alg_note_list_ptr *p = ¬e_list; ++ while (*p) { ++ if ((*p)->note->get_identifier() == key && ++ (*p)->note->chan == ++ chan + channel_offset + port * channel_offset_per_port) { ++ (*p)->note->dur = time - (*p)->note->time; ++ // trace("updated %d dur %g\n", (*p)->note->key, (*p)->note->dur); ++ Alg_note_list_ptr to_be_freed = *p; ++ *p = to_be_freed->next; ++ delete to_be_freed; ++ } else { ++ p = &((*p)->next); ++ } ++ } ++ meta_channel = -1; ++} ++ ++ ++void Alg_midifile_reader::update(int chan, int key, Alg_parameter_ptr param) ++{ ++ Alg_update_ptr update = new Alg_update; ++ update->time = get_time(); ++ update->chan = chan; ++ if (chan != -1) { ++ update->chan = chan + channel_offset + port * channel_offset_per_port; ++ } ++ update->set_identifier(key); ++ update->parameter = *param; ++ // prevent the destructor from destroying the string twice! ++ // the new Update takes the string from param ++ if (param->attr_type() == 's') param->s = NULL; ++ track->append(update); ++} ++ ++ ++void Alg_midifile_reader::Mf_pressure(int chan, int key, int val) ++{ ++ Alg_parameter parameter; ++ parameter.set_attr(symbol_table.insert_string("pressurer")); ++ parameter.r = val / 127.0; ++ update(chan, key, ¶meter); ++ meta_channel = -1; ++} ++ ++ ++void Alg_midifile_reader::Mf_controller(int chan, int control, int val) ++{ ++ Alg_parameter parameter; ++ char name[32]; ++#pragma warning(disable: 4996) // name is long enough ++ sprintf(name, "control%dr", control); ++#pragma warning(default: 4996) ++ parameter.set_attr(symbol_table.insert_string(name)); ++ parameter.r = val / 127.0; ++ update(chan, -1, ¶meter); ++ meta_channel = -1; ++} ++ ++ ++void Alg_midifile_reader::Mf_pitchbend(int chan, int c1, int c2) ++{ ++ Alg_parameter parameter; ++ parameter.set_attr(symbol_table.insert_string("bendr")); ++ parameter.r = ((c2 << 7) + c1) / 8192.0 - 1.0; ++ update(chan, -1, ¶meter); ++ meta_channel = -1; ++} ++ ++ ++void Alg_midifile_reader::Mf_program(int chan, int program) ++{ ++ Alg_parameter parameter; ++ parameter.set_attr(symbol_table.insert_string("programi")); ++ parameter.i = program; ++ update(chan, -1, ¶meter); ++ meta_channel = -1; ++} ++ ++ ++void Alg_midifile_reader::Mf_chanpressure(int chan, int val) ++{ ++ Alg_parameter parameter; ++ parameter.set_attr(symbol_table.insert_string("pressurer")); ++ parameter.r = val / 127.0; ++ update(chan, -1, ¶meter); ++ meta_channel = -1; ++} ++ ++ ++void Alg_midifile_reader::binary_msg(int len, unsigned char *msg, ++ const char *attr_string) ++{ ++ Alg_parameter parameter; ++ char *hexstr = new char[len * 2 + 1]; ++ for (int i = 0; i < len; i++) { ++#pragma warning(disable: 4996) // hexstr is long enough ++ sprintf(hexstr + 2 * i, "%02x", (0xFF & msg[i])); ++#pragma warning(default: 4996) ++ } ++ parameter.s = hexstr; ++ parameter.set_attr(symbol_table.insert_string(attr_string)); ++ update(meta_channel, -1, ¶meter); ++} ++ ++ ++void Alg_midifile_reader::Mf_sysex(int len, unsigned char *msg) ++{ ++ // sysex messages become updates with attribute sysexs and a hex string ++ binary_msg(len, msg, "sysexs"); ++} ++ ++ ++void Alg_midifile_reader::Mf_arbitrary(int len, unsigned char *msg) ++{ ++ Mf_error("arbitrary data ignored"); ++} ++ ++ ++void Alg_midifile_reader::Mf_metamisc(int type, int len, unsigned char *msg) ++{ ++ char text[128]; ++#pragma warning(disable: 4996) // text is long enough ++ sprintf(text, "metamsic data, type 0x%x, ignored", type); ++#pragma warning(default: 4996) ++ Mf_error(text); ++} ++ ++ ++void Alg_midifile_reader::Mf_seqnum(int n) ++{ ++ Mf_error("seqnum data ignored"); ++} ++ ++ ++static char *fpsstr[4] = {"24", "25", "29.97", "30"}; ++ ++void Alg_midifile_reader::Mf_smpte(int hours, int mins, int secs, ++ int frames, int subframes) ++{ ++ // string will look like "24fps:01h:27m:07s:19.00f" ++ // 30fps (drop frame) is notated as "29.97fps" ++ char text[32]; ++ int fps = (hours >> 6) & 3; ++ hours &= 0x1F; ++#pragma warning(disable: 4996) // text is long enough ++ sprintf(text, "%sfps:%02dh:%02dm:%02ds:%02d.%02df", ++ fpsstr[fps], hours, mins, secs, frames, subframes); ++#pragma warning(default: 4996) ++ Alg_parameter smpteoffset; ++ smpteoffset.s = heapify(text); ++ smpteoffset.set_attr(symbol_table.insert_string("smpteoffsets")); ++ update(meta_channel, -1, &smpteoffset); ++ // Mf_error("SMPTE data ignored"); ++} ++ ++ ++void Alg_midifile_reader::Mf_timesig(int i1, int i2, int i3, int i4) ++{ ++ seq->set_time_sig(double(get_currtime()) / divisions, i1, 1 << i2); ++} ++ ++ ++void Alg_midifile_reader::Mf_tempo(int tempo) ++{ ++ double beat = get_currtime(); ++ beat = beat / divisions; // convert to quarters ++ // 6000000 us/min / n us/beat => beat / min ++ double bpm = 60000000.0 / tempo; ++ seq->insert_tempo(bpm, beat); ++} ++ ++ ++void Alg_midifile_reader::Mf_keysig(int key, int mode) ++{ ++ Alg_parameter key_parm; ++ key_parm.set_attr(symbol_table.insert_string("keysigi")); ++ // use 0 for C major, 1 for G, -1 for F, etc., that is, ++ // the number of sharps, where flats are negative sharps ++ key_parm.i = key; //<<<---- fix this ++ // use -1 to mean "all channels" ++ update(meta_channel, -1, &key_parm); ++ Alg_parameter mode_parm; ++ mode_parm.set_attr(symbol_table.insert_string("modea")); ++ mode_parm.a = (mode == 0 ? symbol_table.insert_string("major") : ++ symbol_table.insert_string("minor")); ++ update(meta_channel, -1, &mode_parm); ++} ++ ++ ++void Alg_midifile_reader::Mf_sqspecific(int len, unsigned char *msg) ++{ ++ // sequencer specific messages become updates with attribute sqspecifics ++ // and a hex string for the value ++ binary_msg(len, msg, "sqspecifics"); ++} ++ ++ ++char *heapify2(int len, unsigned char *s) ++{ ++ char *h = new char[len + 1]; ++ memcpy(h, s, len); ++ h[len] = 0; ++ return h; ++} ++ ++ ++void Alg_midifile_reader::Mf_text(int type, int len, unsigned char *msg) ++{ ++ Alg_parameter text; ++ text.s = heapify2(len, msg); ++ const char *attr = "miscs"; ++ if (type == 1) attr = "texts"; ++ else if (type == 2) attr = "copyrights"; ++ else if (type == 3) ++ attr = (track_number == 0 ? "seqnames" : "tracknames"); ++ else if (type == 4) attr = "instruments"; ++ else if (type == 5) attr = "lyrics"; ++ else if (type == 6) attr = "markers"; ++ else if (type == 7) attr = "cues"; ++ text.set_attr(symbol_table.insert_string(attr)); ++ update(meta_channel, -1, &text); ++} ++ ++ ++// parse file into a seq. ++Alg_error alg_smf_read(istream &file, Alg_seq_ptr new_seq) ++{ ++ assert(new_seq); ++ Alg_midifile_reader ar(file, new_seq); ++ bool err = ar.parse(); ++ ar.seq->set_real_dur(ar.seq->get_time_map()-> ++ beat_to_time(ar.seq->get_beat_dur())); ++ return (err ? alg_error_syntax : alg_no_error); ++} +diff --git a/allegrosmfwr.cpp b/allegrosmfwr.cpp +index f581831..cd06251 100755 +--- a/allegrosmfwr.cpp ++++ b/allegrosmfwr.cpp +@@ -1,647 +1,647 @@ +-// allegrosmfwr.cpp -- Allegro Standard Midi File Write +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-using namespace std; +-#include "allegro.h" +- +-// event_queue is a list element that keeps track of pending +-// things to write to a track, including note-ons, note-offs, +-// updates, tempo changes, and time signatures +-// +-class event_queue{ +-public: +- char type;//'n' for note, 'o' for off, 's' for time signature, +- // 'c' for tempo changes +- double time; +- long index; //of the event in mSeq->notes +- class event_queue *next; +- event_queue(char t, double when, long x, class event_queue *n) { +- type = t; time = when; index = x; next = n; } +-}; +- +- +-class Alg_smf_write { +-public: +- Alg_smf_write(Alg_seq_ptr seq); +- ~Alg_smf_write(); +- long channels_per_track; // used to encode track number into chan field +- // chan is actual_channel + channels_per_track * track_number +- // default is 100, set this to 0 to merge all tracks to 16 channels +- +- void write(ostream &file /* , midiFileFormat = 1 */); +- +-private: +- long previous_divs; // time in ticks of most recently written event +- +- void write_track(int i); +- void write_tempo(int divs, int tempo); +- void write_tempo_change(int i); +- void write_time_signature(int i); +- void write_note(Alg_note_ptr note, bool on); +- void write_update(Alg_update_ptr update); +- void write_text(Alg_update_ptr update, char type); +- void write_binary(int type_byte, const char *msg); +- void write_midi_channel_prefix(Alg_update_ptr update); +- void write_smpteoffset(Alg_update_ptr update, char *s); +- void write_data(int data); +- int to_midi_channel(int channel); +- int to_track(int channel); +- +- ostream *out_file; +- +- Alg_seq_ptr seq; +- +- int num_tracks; // number of tracks not counting tempo track +- int division; // divisions per quarter note, default = 120 +- int initial_tempo; +- +- int timesig_num; // numerator of time signature +- int timesig_den; // denominator of time signature +- double timesig_when; // time of time signature +- +- int keysig; // number of sharps (+) or flats (-), -99 for undefined +- char keysig_mode; // 'M' or 'm' for major/minor +- double keysig_when; // time of key signature +- +- void write_delta(double event_time); +- void write_varinum(int num); +- void write_16bit(int num); +- void write_24bit(int num); +- void write_32bit(int num); +-}; +- +-#define ROUND(x) (int) ((x)+0.5) +- +-Alg_smf_write::Alg_smf_write(Alg_seq_ptr a_seq) +-{ +- out_file = NULL; +- +- // at 100bpm (a nominal tempo value), we would like a division +- // to represent 1ms of time. So +- // d ticks/beat * 100 beats/min = 60,000 ms/min * 1 tick/ms +- // solving for d, d = 600 +- division = 600; // divisions per quarter note +- timesig_num = timesig_den = 0; // initially undefined +- keysig = -99; +- keysig_mode = 0; +- initial_tempo = 500000; +- +- seq = a_seq; +- +- previous_divs = 0; // used to compute deltas for midifile +-} +- +- +-Alg_smf_write::~Alg_smf_write() +-{ +-} +- +- +-// sorting is quite subtle due to rounding +-// For example, suppose times from a MIDI file are exact, but in +-// decimal round to TW0.4167 Q0.3333. Since the time in whole notes +-// rounded up, this note will start late. Even though the duration +-// rounded down, the amount is 1/4 as much because units are quarter +-// notes. Therefore, the total roundup is 0.0001 beats. This is +-// enough to cause the note to sort later in the queue, perhaps +-// coming after a new note-on on the same pitch, and resulting in +-// a turning on-off, on-off into on, on, off, off if data is moved +-// to Allegro (ascii) format with rounding and then back to SMF. +-// +-// The solution here is to consider things that round to the same +-// tick to be simultaneous. Then, be sure to deal with note-offs +-// before note-ons. We're going to do that by using event_queue +-// times that are rounded to the nearest tick time. Except note-offs +-// are going to go in with times that are 1/4 tick earlier so they +-// get scheduled first, but still end up on the same tick. +-// +-event_queue* push(event_queue *queue, event_queue *event) +-{ +- // printf("push: %.6g, %c, %d\n", event->time, event->type, event->index); +- if (queue == NULL) { +- event->next = NULL; +- return event; +- } +- +- event_queue *marker1 = NULL; +- event_queue *marker2 = queue; +- while (marker2 != NULL && marker2->time <= event->time) { +- marker1 = marker2; +- marker2 = marker2->next; +- } +- event->next = marker2; +- if (marker1 != NULL) { +- marker1->next=event; +- return queue; +- } else return event; +-} +- +- +-void print_queue(event_queue *q) +-{ +- printf("Printing queue. . .\n"); +- event_queue *q2=q; +- while (q2) { +- printf("%c at %f ;", q2->type, q2->time); +- q2 = q2->next; +- } +- printf("\nDone printing.\n"); +-} +- +- +-void Alg_smf_write::write_note(Alg_note_ptr note, bool on) +-{ +- double event_time = (on ? note->time : note->time + note->dur); +- write_delta(event_time); +- +- //printf("deltaDivisions: %d, beats elapsed: %g, on? %c\n", deltaDivisions, note->time, on); +- +- char chan = char(note->chan & 15); +- int pitch = int(note->pitch + 0.5); +- if (pitch < 0) { +- pitch = pitch % 12; +- } else if (pitch > 127) { +- pitch = (pitch % 12) + 120; // put pitch in 10th octave +- if (pitch > 127) pitch -= 12; // or 9th octave +- } +- out_file->put(0x90 + chan); +- out_file->put(pitch); +- if (on) { +- int vel = (int) note->loud; +- if (vel <= 0) vel = 1; +- write_data(vel); +- } else out_file->put(0); // note-off indicated by velocty zero +-} +- +- +-void Alg_smf_write::write_midi_channel_prefix(Alg_update_ptr update) +-{ +- if (update->chan >= 0) { // write MIDI Channel Prefix +- write_delta(update->time); +- out_file->put('\xFF'); // Meta Event +- out_file->put('\x20'); // Type code for MIDI Channel Prefix +- out_file->put(1); // length +- out_file->put(to_midi_channel(update->chan)); +- // one thing odd about the Std MIDI File spec is that once +- // you turn on MIDI Channel Prefix, there seems to be no +- // way to cancel it unless a non-Meta event shows up. We +- // don't do any analysis to avoid assigning channels to +- // meta events. +- } +-} +- +- +-void Alg_smf_write::write_text(Alg_update_ptr update, char type) +-{ +- write_midi_channel_prefix(update); +- write_delta(update->time); +- out_file->put('\xFF'); +- out_file->put(type); +- out_file->put((char) strlen(update->parameter.s)); +- *out_file << update->parameter.s; +-} +- +- +-void Alg_smf_write::write_smpteoffset(Alg_update_ptr update, char *s) +-{ +- write_midi_channel_prefix(update); +- write_delta(update->time); +- out_file->put('\xFF'); // meta event +- out_file->put('\x54'); // smpte offset type code +- out_file->put(5); // length +- for (int i = 0; i < 5; i++) *out_file << s[i]; +-} +- +- +-// write_data - limit data to the range of [0...127] and write it +-void Alg_smf_write::write_data(int data) +-{ +- if (data < 0) data = 0; +- else if (data > 0x7F) data = 0x7F; +- +- out_file->put(data); +-} +- +- +-int Alg_smf_write::to_midi_channel(int channel) +-{ +- // allegro track number is stored as multiple of 100 +- // also mask off all but 4 channel bits just in case +- if (channels_per_track > 0) channel %= channels_per_track; +- return channel & 0xF; +-} +- +- +-int Alg_smf_write::to_track(int channel) +-{ +- if (channel == -1) return 0; +- return channel / channels_per_track; +-} +- +- +-static char hex_to_nibble(char c) +-{ +- if (isalpha(c)) { +- return 10 + (toupper(c) - 'A'); +- } else { +- return c - '0'; +- } +-} +- +- +-static char hex_to_char(const char *s) +-{ +- return (hex_to_nibble(s[0]) << 4) + hex_to_nibble(s[1]); +-} +- +- +-void Alg_smf_write::write_binary(int type_byte, const char *msg) +-{ +- int len = strlen(msg) / 2; +- out_file->put(type_byte); +- write_varinum(len); +- for (int i = 0; i < len; i++) { +- out_file->put(hex_to_char(msg)); +- msg += 2; +- } +-} +- +- +-void Alg_smf_write::write_update(Alg_update_ptr update) +-{ +- const char *name = update->parameter.attr_name(); +- +- /****Non-Meta Events****/ +- if (!strcmp(name, "pressurer")) { +- write_delta(update->time); +- if (update->get_identifier() < 0) { // channel pressure message +- out_file->put(0xD0 + to_midi_channel(update->chan)); +- write_data((int)(update->parameter.r * 127)); +- } else { // just 1 key -- poly pressure +- out_file->put(0xA0 + to_midi_channel(update->chan)); +- write_data(update->get_identifier()); +- write_data((int)(update->parameter.r * 127)); +- } +- } else if (!strcmp(name, "programi")) { +- write_delta(update->time); +- out_file->put(0xC0 + to_midi_channel(update->chan)); +- write_data(update->parameter.i); +- } else if (!strcmp(name, "bendr")) { +- int temp = ROUND(0x2000 * (update->parameter.r + 1)); +- if (temp > 0x3fff) temp = 0x3fff; // 14 bits maximum +- if (temp < 0) temp = 0; +- int c1 = temp & 0x7F; // low 7 bits +- int c2 = temp >> 7; // high 7 bits +- write_delta(update->time); +- out_file->put(0xE0 + to_midi_channel(update->chan)); +- write_data(c1); +- write_data(c2); +- } else if (!strncmp(name, "control", 7) && +- update->parameter.attr_type() == 'r') { +- int ctrlnum = atoi(name + 7); +- int val = ROUND(update->parameter.r * 127); +- write_delta(update->time); +- out_file->put(0xB0 + to_midi_channel(update->chan)); +- write_data(ctrlnum); +- write_data(val); +- } else if (!strcmp(name, "sysexs") && +- update->parameter.attr_type() == 's') { +- const char *s = update->parameter.s; +- if (s[0] && s[1] && toupper(s[0]) == 'F' && s[1] == '0') { +- s += 2; // skip the initial "F0" byte in message: it is implied +- } +- write_delta(update->time); +- write_binary(0xF0, s); +- } else if (!strcmp(name, "sqspecifics") && +- update->parameter.attr_type() == 's') { +- const char *s = update->parameter.s; +- write_delta(update->time); +- out_file->put('\xFF'); +- write_binary(0x7F, s); +- +- /****Text Events****/ +- } else if (!strcmp(name, "texts")) { +- write_text(update, 0x01); +- } else if (!strcmp(name, "copyrights")) { +- write_text(update, 0x02); +- } else if (!strcmp(name, "seqnames") || !strcmp(name, "tracknames")) { +- write_text(update, 0x03); +- } else if (!strcmp(name, "instruments")) { +- write_text(update, 0x04); +- } else if (!strcmp(name, "lyrics")) { +- write_text(update, 0x05); +- } else if (!strcmp(name, "markers")) { +- write_text(update, 0x06); +- } else if (!strcmp(name, "cues")) { +- write_text(update, 0x07); +- } else if (!strcmp(name, "miscs")) { +- write_text(update, 0x08); +- +- /****Other Events****/ +- } else if (!strcmp(name, "smpteoffsets")) { +-#define decimal(p) (((p)[0] - '0') * 10 + ((p)[1] - '0')) +- // smpteoffset is specified as "24fps:00h:10m:00s:11.00f" +- // the following simple parser does not reject all badly +- // formatted strings, but it should parse good strings ok +- const char *s = update->parameter.s; +- int len = strlen(s); +- char smpteoffset[5]; +- if (len < 24) return; // not long enough, must be bad format +- int fps; +- if (s[0] == '2') { +- if (s[1] == '4') fps = 0; +- else if (s[1] == '5') fps = 1; +- else if (s[1] == '9') { +- fps = 2; +- if (len != 27) return; // not right length +- s += 3; // cancel effect of longer string +- } +- } else fps = 3; +- s += 6; int hours = decimal(s); +- s += 4; int mins = decimal(s); +- s += 4; int secs = decimal(s); +- s += 4; int frames = decimal(s); +- s += 3; int subframes = decimal(s); +- smpteoffset[0] = (fps << 6) + hours; +- smpteoffset[1] = mins; +- smpteoffset[2] = secs; +- smpteoffset[3] = frames; +- smpteoffset[4] = subframes; +- write_smpteoffset(update, smpteoffset); +- +- // key signature is special because it takes two events in the Alg_seq +- // structure to make one midi file event. When we encounter one or +- // the other event, we'll just record it in the Alg_smf_write object. +- // After both events are seen, we write the data. (See below.) +- } else if (!strcmp(name, "keysigi")) { +- keysig = update->parameter.i; +- keysig_when = update->time; +- } else if (!strcmp(name, "modea")) { +- if (!strcmp(alg_attr_name(update->parameter.a), "major")) +- keysig_mode = 'M'; +- else keysig_mode = 'm'; +- keysig_when = update->time; +- } +- if (keysig != -99 && keysig_mode) { // write when both are defined +- write_delta(keysig_when); +- out_file->put('\xFF'); +- out_file->put('\x59'); +- out_file->put(2); +- // mask off high bits so that this value appears to be positive +- // i.e. -1 -> 0xFF (otherwise, write_data will clip -1 to 0) +- out_file->put(keysig & 0xFF); +- out_file->put(keysig_mode == 'm'); +- keysig = -99; +- keysig_mode = false; +- } +- //printf("Update: %s, key: %g\n", update->parameter.attr_name(), update->key); +-} +- +- +-// see notes on event_queue::push, TICK_TIME converts from beat to +-// the number of the nearest tick. The second parameter is an offset in +-// quarter ticks. By scheduling with -1, note-offs should get dispatched +-// first. Note that TICK_TIME only determines the order of events, so +-// it is ok to change units from beats to ticks, saving a divide. +-#define TICK_TIME(t, o) (ROUND((t) * division) + 0.25 * (o)) +- +-void Alg_smf_write::write_track(int i) +-{ +- int j = 0; // note index +- Alg_events ¬es = seq->track_list[i]; +- event_queue *pending = NULL; +- if (notes.length() > 0) { +- pending = new event_queue('n', TICK_TIME(notes[j]->time, 0), 0, NULL); +- } +- if (i == 0) { // track 0 may have tempo and timesig info +- if (seq->get_time_map()->last_tempo_flag || seq->get_time_map()->beats.len > 0) { +- pending = push(pending, new event_queue('c', 0.0, 0, NULL)); +- } +- if (seq->time_sig.length() > 0) { +- pending = push(pending, new event_queue('s', +- TICK_TIME(seq->time_sig[0].beat, 0), 0, NULL)); +- } +- } +- while (pending) { +- event_queue *current = pending; +- pending = pending->next; +- if (current->type == 'n') { +- Alg_note_ptr n = (Alg_note_ptr) notes[current->index]; +- if (n->is_note()) { +- write_note(n, true); +- pending = push(pending, new event_queue('o', +- TICK_TIME(n->time + n->dur, -1), current->index, NULL)); +- } else if (n->is_update()) { +- Alg_update_ptr u = (Alg_update_ptr) n; +- write_update(u); +- } +- int next = current->index + 1; +- if (next < notes.length()) { +- current->time = TICK_TIME(notes[next]->time, 0); +- current->index = next; +- pending = push(pending, current); +- } +- } else if (current->type == 'o') { //note-off +- Alg_note_ptr n = (Alg_note_ptr) notes[current->index]; +- write_note(n, false); +- delete current; +- } else if (current->type == 'c') { // tempo change +- write_tempo_change(current->index); +- current->index++; // -R +- if (current->index < seq->get_time_map()->beats.len) { +- current->time = +- TICK_TIME(seq->get_time_map()-> +- beats[current->index].beat, 0); +- pending = push(pending, current); +- } else { +- delete current; +- } +- } else if (current->type == 's') { // time sig +- write_time_signature(current->index); +- current->index++; +- if (current->index < seq->time_sig.length()) { +- current->time = +- TICK_TIME(seq->time_sig[current->index].beat, 0); +- pending = push(pending, current); +- } else { +- delete current; +- } +- } +- } +-} +- +- +-void Alg_smf_write::write_tempo(int divs, int tempo) +-{ +- // printf("Inserting tempo %f after %f clocks.\n", tempo, delta); +- write_varinum(divs - previous_divs); +- previous_divs = divs; +- out_file->put('\xFF'); +- out_file->put('\x51'); +- out_file->put('\x03'); +- write_24bit((int)tempo); +-} +- +- +-void Alg_smf_write::write_tempo_change(int i) +- // i is index of tempo map +-{ +- // extract tempo map +- Alg_beats &b = seq->get_time_map()->beats; +- double tempo; +- long divs; +- if (i < seq->get_time_map()->beats.len - 1) { +- tempo = 1000000 * ((b[i+1].time - b[i].time) / +- (b[i+1].beat - b[i].beat)); +- divs = ROUND(b[i].beat * division); +- write_tempo(divs, ROUND(tempo)); +- } else if (seq->get_time_map()->last_tempo_flag) { // write the final tempo +- divs = ROUND(division * b[i].beat); +- tempo = (1000000.0 / seq->get_time_map()->last_tempo); +- write_tempo(divs, ROUND(tempo)); +- } +-} +- +- +-void Alg_smf_write::write_time_signature(int i) +-{ +- Alg_time_sigs &ts = seq->time_sig; +- write_delta(ts[i].beat); +- // write the time signature +- out_file->put('\xFF'); +- out_file->put('\x58'); // time signature +- out_file->put('\x04'); // length of message +- out_file->put(ROUND(ts[i].num)); +- int den = ROUND(ts[i].den); +- int den_byte = 0; +- while (den > 1) { // compute the log2 of denominator +- den_byte++; +- den >>= 1; +- } +- out_file->put(den_byte); +- out_file->put(24); // clocks per quarter +- out_file->put(8); // 32nd notes per 24 clocks +-} +- +- +- +-void Alg_smf_write::write(ostream &file) +-{ +- int track_len_offset; +- int track_end_offset; +- int track_len; +- +- out_file = &file; +- +- // Header +- file << "MThd"; +- +- write_32bit(6); // chunk length +- +- write_16bit(1); // format 1 MIDI file +- +- write_16bit(seq->tracks()); // number of tracks +- write_16bit(division); // divisions per quarter note +- +- +- // write_ all tracks +- seq->convert_to_beats(); +- int i; +- for (i = 0; i < seq->tracks(); i++) { +- previous_divs = 0; +- *out_file << "MTrk"; +- track_len_offset = out_file->tellp(); +- write_32bit(0); // track len placeholder +- +- write_track(i); +- +- // End of track event +- write_varinum(0); // delta time +- out_file->put('\xFF'); +- out_file->put('\x2F'); +- out_file->put('\x00'); +- +- // Go back and write in the length of the track +- track_end_offset = out_file->tellp(); +- track_len = track_end_offset - track_len_offset - 4; +- out_file->seekp(track_len_offset); +- write_32bit(track_len); +- out_file->seekp(track_end_offset); +- } +-} +- +- +-void Alg_smf_write::write_16bit(int num) +-{ +- out_file->put((num & 0xFF00) >> 8); +- out_file->put(num & 0xFF); +-} +- +-void Alg_smf_write::write_24bit(int num) +-{ +- out_file->put((num & 0xFF0000) >> 16); +- out_file->put((num & 0xFF00) >> 8); +- out_file->put((num & 0xFF)); +-} +- +-void Alg_smf_write::write_32bit(int num) +-{ +- out_file->put((num & 0xFF000000) >> 24); +- out_file->put((num & 0xFF0000) >> 16); +- out_file->put((num & 0xFF00) >> 8); +- out_file->put((num & 0xFF)); +-} +- +- +-void Alg_smf_write::write_delta(double event_time) +-{ +- // divisions is ideal absolute time in divisions +- long divisions = ROUND(division * event_time); +- long delta_divs = divisions - previous_divs; +- write_varinum(delta_divs); +- previous_divs = divisions; +-} +- +- +-void Alg_smf_write::write_varinum(int value) +-{ +- if(value<0) value=0;//this line should not have to be here! +- int buffer; +- +- buffer = value & 0x7f; +- while ((value >>= 7) > 0) { +- buffer <<= 8; +- buffer |= 0x80; +- buffer += (value & 0x7f); +- } +- +- for(;;) { +- out_file->put(buffer); +- if (buffer & 0x80) +- buffer >>= 8; +- else +- break; +- } +-} +- +- +-void Alg_seq::smf_write(ostream &file) +-{ +- Alg_smf_write writer(this); +- writer.write(file); +-} +- +-bool Alg_seq::smf_write(const char *filename) +-{ +- ofstream outf(filename, ios::binary | ios::out); +- if (outf.fail()) return false; +- smf_write(outf); +- outf.close(); +- return true; +-} ++// allegrosmfwr.cpp -- Allegro Standard Midi File Write ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++using namespace std; ++#include "allegro.h" ++ ++// event_queue is a list element that keeps track of pending ++// things to write to a track, including note-ons, note-offs, ++// updates, tempo changes, and time signatures ++// ++class event_queue{ ++public: ++ char type;//'n' for note, 'o' for off, 's' for time signature, ++ // 'c' for tempo changes ++ double time; ++ long index; //of the event in mSeq->notes ++ class event_queue *next; ++ event_queue(char t, double when, long x, class event_queue *n) { ++ type = t; time = when; index = x; next = n; } ++}; ++ ++ ++class Alg_smf_write { ++public: ++ Alg_smf_write(Alg_seq_ptr seq); ++ ~Alg_smf_write(); ++ long channels_per_track; // used to encode track number into chan field ++ // chan is actual_channel + channels_per_track * track_number ++ // default is 100, set this to 0 to merge all tracks to 16 channels ++ ++ void write(ostream &file /* , midiFileFormat = 1 */); ++ ++private: ++ long previous_divs; // time in ticks of most recently written event ++ ++ void write_track(int i); ++ void write_tempo(int divs, int tempo); ++ void write_tempo_change(int i); ++ void write_time_signature(int i); ++ void write_note(Alg_note_ptr note, bool on); ++ void write_update(Alg_update_ptr update); ++ void write_text(Alg_update_ptr update, char type); ++ void write_binary(int type_byte, const char *msg); ++ void write_midi_channel_prefix(Alg_update_ptr update); ++ void write_smpteoffset(Alg_update_ptr update, char *s); ++ void write_data(int data); ++ int to_midi_channel(int channel); ++ int to_track(int channel); ++ ++ ostream *out_file; ++ ++ Alg_seq_ptr seq; ++ ++ int num_tracks; // number of tracks not counting tempo track ++ int division; // divisions per quarter note, default = 120 ++ int initial_tempo; ++ ++ int timesig_num; // numerator of time signature ++ int timesig_den; // denominator of time signature ++ double timesig_when; // time of time signature ++ ++ int keysig; // number of sharps (+) or flats (-), -99 for undefined ++ char keysig_mode; // 'M' or 'm' for major/minor ++ double keysig_when; // time of key signature ++ ++ void write_delta(double event_time); ++ void write_varinum(int num); ++ void write_16bit(int num); ++ void write_24bit(int num); ++ void write_32bit(int num); ++}; ++ ++#define ROUND(x) (int) ((x)+0.5) ++ ++Alg_smf_write::Alg_smf_write(Alg_seq_ptr a_seq) ++{ ++ out_file = NULL; ++ ++ // at 100bpm (a nominal tempo value), we would like a division ++ // to represent 1ms of time. So ++ // d ticks/beat * 100 beats/min = 60,000 ms/min * 1 tick/ms ++ // solving for d, d = 600 ++ division = 600; // divisions per quarter note ++ timesig_num = timesig_den = 0; // initially undefined ++ keysig = -99; ++ keysig_mode = 0; ++ initial_tempo = 500000; ++ ++ seq = a_seq; ++ ++ previous_divs = 0; // used to compute deltas for midifile ++} ++ ++ ++Alg_smf_write::~Alg_smf_write() ++{ ++} ++ ++ ++// sorting is quite subtle due to rounding ++// For example, suppose times from a MIDI file are exact, but in ++// decimal round to TW0.4167 Q0.3333. Since the time in whole notes ++// rounded up, this note will start late. Even though the duration ++// rounded down, the amount is 1/4 as much because units are quarter ++// notes. Therefore, the total roundup is 0.0001 beats. This is ++// enough to cause the note to sort later in the queue, perhaps ++// coming after a new note-on on the same pitch, and resulting in ++// a turning on-off, on-off into on, on, off, off if data is moved ++// to Allegro (ascii) format with rounding and then back to SMF. ++// ++// The solution here is to consider things that round to the same ++// tick to be simultaneous. Then, be sure to deal with note-offs ++// before note-ons. We're going to do that by using event_queue ++// times that are rounded to the nearest tick time. Except note-offs ++// are going to go in with times that are 1/4 tick earlier so they ++// get scheduled first, but still end up on the same tick. ++// ++event_queue* push(event_queue *queue, event_queue *event) ++{ ++ // printf("push: %.6g, %c, %d\n", event->time, event->type, event->index); ++ if (queue == NULL) { ++ event->next = NULL; ++ return event; ++ } ++ ++ event_queue *marker1 = NULL; ++ event_queue *marker2 = queue; ++ while (marker2 != NULL && marker2->time <= event->time) { ++ marker1 = marker2; ++ marker2 = marker2->next; ++ } ++ event->next = marker2; ++ if (marker1 != NULL) { ++ marker1->next=event; ++ return queue; ++ } else return event; ++} ++ ++ ++void print_queue(event_queue *q) ++{ ++ printf("Printing queue. . .\n"); ++ event_queue *q2=q; ++ while (q2) { ++ printf("%c at %f ;", q2->type, q2->time); ++ q2 = q2->next; ++ } ++ printf("\nDone printing.\n"); ++} ++ ++ ++void Alg_smf_write::write_note(Alg_note_ptr note, bool on) ++{ ++ double event_time = (on ? note->time : note->time + note->dur); ++ write_delta(event_time); ++ ++ //printf("deltaDivisions: %d, beats elapsed: %g, on? %c\n", deltaDivisions, note->time, on); ++ ++ char chan = char(note->chan & 15); ++ int pitch = int(note->pitch + 0.5); ++ if (pitch < 0) { ++ pitch = pitch % 12; ++ } else if (pitch > 127) { ++ pitch = (pitch % 12) + 120; // put pitch in 10th octave ++ if (pitch > 127) pitch -= 12; // or 9th octave ++ } ++ out_file->put(0x90 + chan); ++ out_file->put(pitch); ++ if (on) { ++ int vel = (int) note->loud; ++ if (vel <= 0) vel = 1; ++ write_data(vel); ++ } else out_file->put(0); // note-off indicated by velocty zero ++} ++ ++ ++void Alg_smf_write::write_midi_channel_prefix(Alg_update_ptr update) ++{ ++ if (update->chan >= 0) { // write MIDI Channel Prefix ++ write_delta(update->time); ++ out_file->put('\xFF'); // Meta Event ++ out_file->put('\x20'); // Type code for MIDI Channel Prefix ++ out_file->put(1); // length ++ out_file->put(to_midi_channel(update->chan)); ++ // one thing odd about the Std MIDI File spec is that once ++ // you turn on MIDI Channel Prefix, there seems to be no ++ // way to cancel it unless a non-Meta event shows up. We ++ // don't do any analysis to avoid assigning channels to ++ // meta events. ++ } ++} ++ ++ ++void Alg_smf_write::write_text(Alg_update_ptr update, char type) ++{ ++ write_midi_channel_prefix(update); ++ write_delta(update->time); ++ out_file->put('\xFF'); ++ out_file->put(type); ++ out_file->put((char) strlen(update->parameter.s)); ++ *out_file << update->parameter.s; ++} ++ ++ ++void Alg_smf_write::write_smpteoffset(Alg_update_ptr update, char *s) ++{ ++ write_midi_channel_prefix(update); ++ write_delta(update->time); ++ out_file->put('\xFF'); // meta event ++ out_file->put('\x54'); // smpte offset type code ++ out_file->put(5); // length ++ for (int i = 0; i < 5; i++) *out_file << s[i]; ++} ++ ++ ++// write_data - limit data to the range of [0...127] and write it ++void Alg_smf_write::write_data(int data) ++{ ++ if (data < 0) data = 0; ++ else if (data > 0x7F) data = 0x7F; ++ ++ out_file->put(data); ++} ++ ++ ++int Alg_smf_write::to_midi_channel(int channel) ++{ ++ // allegro track number is stored as multiple of 100 ++ // also mask off all but 4 channel bits just in case ++ if (channels_per_track > 0) channel %= channels_per_track; ++ return channel & 0xF; ++} ++ ++ ++int Alg_smf_write::to_track(int channel) ++{ ++ if (channel == -1) return 0; ++ return channel / channels_per_track; ++} ++ ++ ++static char hex_to_nibble(char c) ++{ ++ if (isalpha(c)) { ++ return 10 + (toupper(c) - 'A'); ++ } else { ++ return c - '0'; ++ } ++} ++ ++ ++static char hex_to_char(const char *s) ++{ ++ return (hex_to_nibble(s[0]) << 4) + hex_to_nibble(s[1]); ++} ++ ++ ++void Alg_smf_write::write_binary(int type_byte, const char *msg) ++{ ++ int len = strlen(msg) / 2; ++ out_file->put(type_byte); ++ write_varinum(len); ++ for (int i = 0; i < len; i++) { ++ out_file->put(hex_to_char(msg)); ++ msg += 2; ++ } ++} ++ ++ ++void Alg_smf_write::write_update(Alg_update_ptr update) ++{ ++ const char *name = update->parameter.attr_name(); ++ ++ /****Non-Meta Events****/ ++ if (!strcmp(name, "pressurer")) { ++ write_delta(update->time); ++ if (update->get_identifier() < 0) { // channel pressure message ++ out_file->put(0xD0 + to_midi_channel(update->chan)); ++ write_data((int)(update->parameter.r * 127)); ++ } else { // just 1 key -- poly pressure ++ out_file->put(0xA0 + to_midi_channel(update->chan)); ++ write_data(update->get_identifier()); ++ write_data((int)(update->parameter.r * 127)); ++ } ++ } else if (!strcmp(name, "programi")) { ++ write_delta(update->time); ++ out_file->put(0xC0 + to_midi_channel(update->chan)); ++ write_data(update->parameter.i); ++ } else if (!strcmp(name, "bendr")) { ++ int temp = ROUND(0x2000 * (update->parameter.r + 1)); ++ if (temp > 0x3fff) temp = 0x3fff; // 14 bits maximum ++ if (temp < 0) temp = 0; ++ int c1 = temp & 0x7F; // low 7 bits ++ int c2 = temp >> 7; // high 7 bits ++ write_delta(update->time); ++ out_file->put(0xE0 + to_midi_channel(update->chan)); ++ write_data(c1); ++ write_data(c2); ++ } else if (!strncmp(name, "control", 7) && ++ update->parameter.attr_type() == 'r') { ++ int ctrlnum = atoi(name + 7); ++ int val = ROUND(update->parameter.r * 127); ++ write_delta(update->time); ++ out_file->put(0xB0 + to_midi_channel(update->chan)); ++ write_data(ctrlnum); ++ write_data(val); ++ } else if (!strcmp(name, "sysexs") && ++ update->parameter.attr_type() == 's') { ++ const char *s = update->parameter.s; ++ if (s[0] && s[1] && toupper(s[0]) == 'F' && s[1] == '0') { ++ s += 2; // skip the initial "F0" byte in message: it is implied ++ } ++ write_delta(update->time); ++ write_binary(0xF0, s); ++ } else if (!strcmp(name, "sqspecifics") && ++ update->parameter.attr_type() == 's') { ++ const char *s = update->parameter.s; ++ write_delta(update->time); ++ out_file->put('\xFF'); ++ write_binary(0x7F, s); ++ ++ /****Text Events****/ ++ } else if (!strcmp(name, "texts")) { ++ write_text(update, 0x01); ++ } else if (!strcmp(name, "copyrights")) { ++ write_text(update, 0x02); ++ } else if (!strcmp(name, "seqnames") || !strcmp(name, "tracknames")) { ++ write_text(update, 0x03); ++ } else if (!strcmp(name, "instruments")) { ++ write_text(update, 0x04); ++ } else if (!strcmp(name, "lyrics")) { ++ write_text(update, 0x05); ++ } else if (!strcmp(name, "markers")) { ++ write_text(update, 0x06); ++ } else if (!strcmp(name, "cues")) { ++ write_text(update, 0x07); ++ } else if (!strcmp(name, "miscs")) { ++ write_text(update, 0x08); ++ ++ /****Other Events****/ ++ } else if (!strcmp(name, "smpteoffsets")) { ++#define decimal(p) (((p)[0] - '0') * 10 + ((p)[1] - '0')) ++ // smpteoffset is specified as "24fps:00h:10m:00s:11.00f" ++ // the following simple parser does not reject all badly ++ // formatted strings, but it should parse good strings ok ++ const char *s = update->parameter.s; ++ int len = strlen(s); ++ char smpteoffset[5]; ++ if (len < 24) return; // not long enough, must be bad format ++ int fps; ++ if (s[0] == '2') { ++ if (s[1] == '4') fps = 0; ++ else if (s[1] == '5') fps = 1; ++ else if (s[1] == '9') { ++ fps = 2; ++ if (len != 27) return; // not right length ++ s += 3; // cancel effect of longer string ++ } ++ } else fps = 3; ++ s += 6; int hours = decimal(s); ++ s += 4; int mins = decimal(s); ++ s += 4; int secs = decimal(s); ++ s += 4; int frames = decimal(s); ++ s += 3; int subframes = decimal(s); ++ smpteoffset[0] = (fps << 6) + hours; ++ smpteoffset[1] = mins; ++ smpteoffset[2] = secs; ++ smpteoffset[3] = frames; ++ smpteoffset[4] = subframes; ++ write_smpteoffset(update, smpteoffset); ++ ++ // key signature is special because it takes two events in the Alg_seq ++ // structure to make one midi file event. When we encounter one or ++ // the other event, we'll just record it in the Alg_smf_write object. ++ // After both events are seen, we write the data. (See below.) ++ } else if (!strcmp(name, "keysigi")) { ++ keysig = update->parameter.i; ++ keysig_when = update->time; ++ } else if (!strcmp(name, "modea")) { ++ if (!strcmp(alg_attr_name(update->parameter.a), "major")) ++ keysig_mode = 'M'; ++ else keysig_mode = 'm'; ++ keysig_when = update->time; ++ } ++ if (keysig != -99 && keysig_mode) { // write when both are defined ++ write_delta(keysig_when); ++ out_file->put('\xFF'); ++ out_file->put('\x59'); ++ out_file->put(2); ++ // mask off high bits so that this value appears to be positive ++ // i.e. -1 -> 0xFF (otherwise, write_data will clip -1 to 0) ++ out_file->put(keysig & 0xFF); ++ out_file->put(keysig_mode == 'm'); ++ keysig = -99; ++ keysig_mode = false; ++ } ++ //printf("Update: %s, key: %g\n", update->parameter.attr_name(), update->key); ++} ++ ++ ++// see notes on event_queue::push, TICK_TIME converts from beat to ++// the number of the nearest tick. The second parameter is an offset in ++// quarter ticks. By scheduling with -1, note-offs should get dispatched ++// first. Note that TICK_TIME only determines the order of events, so ++// it is ok to change units from beats to ticks, saving a divide. ++#define TICK_TIME(t, o) (ROUND((t) * division) + 0.25 * (o)) ++ ++void Alg_smf_write::write_track(int i) ++{ ++ int j = 0; // note index ++ Alg_events ¬es = seq->track_list[i]; ++ event_queue *pending = NULL; ++ if (notes.length() > 0) { ++ pending = new event_queue('n', TICK_TIME(notes[j]->time, 0), 0, NULL); ++ } ++ if (i == 0) { // track 0 may have tempo and timesig info ++ if (seq->get_time_map()->last_tempo_flag || seq->get_time_map()->beats.len > 0) { ++ pending = push(pending, new event_queue('c', 0.0, 0, NULL)); ++ } ++ if (seq->time_sig.length() > 0) { ++ pending = push(pending, new event_queue('s', ++ TICK_TIME(seq->time_sig[0].beat, 0), 0, NULL)); ++ } ++ } ++ while (pending) { ++ event_queue *current = pending; ++ pending = pending->next; ++ if (current->type == 'n') { ++ Alg_note_ptr n = (Alg_note_ptr) notes[current->index]; ++ if (n->is_note()) { ++ write_note(n, true); ++ pending = push(pending, new event_queue('o', ++ TICK_TIME(n->time + n->dur, -1), current->index, NULL)); ++ } else if (n->is_update()) { ++ Alg_update_ptr u = (Alg_update_ptr) n; ++ write_update(u); ++ } ++ int next = current->index + 1; ++ if (next < notes.length()) { ++ current->time = TICK_TIME(notes[next]->time, 0); ++ current->index = next; ++ pending = push(pending, current); ++ } ++ } else if (current->type == 'o') { //note-off ++ Alg_note_ptr n = (Alg_note_ptr) notes[current->index]; ++ write_note(n, false); ++ delete current; ++ } else if (current->type == 'c') { // tempo change ++ write_tempo_change(current->index); ++ current->index++; // -R ++ if (current->index < seq->get_time_map()->beats.len) { ++ current->time = ++ TICK_TIME(seq->get_time_map()-> ++ beats[current->index].beat, 0); ++ pending = push(pending, current); ++ } else { ++ delete current; ++ } ++ } else if (current->type == 's') { // time sig ++ write_time_signature(current->index); ++ current->index++; ++ if (current->index < seq->time_sig.length()) { ++ current->time = ++ TICK_TIME(seq->time_sig[current->index].beat, 0); ++ pending = push(pending, current); ++ } else { ++ delete current; ++ } ++ } ++ } ++} ++ ++ ++void Alg_smf_write::write_tempo(int divs, int tempo) ++{ ++ // printf("Inserting tempo %f after %f clocks.\n", tempo, delta); ++ write_varinum(divs - previous_divs); ++ previous_divs = divs; ++ out_file->put('\xFF'); ++ out_file->put('\x51'); ++ out_file->put('\x03'); ++ write_24bit((int)tempo); ++} ++ ++ ++void Alg_smf_write::write_tempo_change(int i) ++ // i is index of tempo map ++{ ++ // extract tempo map ++ Alg_beats &b = seq->get_time_map()->beats; ++ double tempo; ++ long divs; ++ if (i < seq->get_time_map()->beats.len - 1) { ++ tempo = 1000000 * ((b[i+1].time - b[i].time) / ++ (b[i+1].beat - b[i].beat)); ++ divs = ROUND(b[i].beat * division); ++ write_tempo(divs, ROUND(tempo)); ++ } else if (seq->get_time_map()->last_tempo_flag) { // write the final tempo ++ divs = ROUND(division * b[i].beat); ++ tempo = (1000000.0 / seq->get_time_map()->last_tempo); ++ write_tempo(divs, ROUND(tempo)); ++ } ++} ++ ++ ++void Alg_smf_write::write_time_signature(int i) ++{ ++ Alg_time_sigs &ts = seq->time_sig; ++ write_delta(ts[i].beat); ++ // write the time signature ++ out_file->put('\xFF'); ++ out_file->put('\x58'); // time signature ++ out_file->put('\x04'); // length of message ++ out_file->put(ROUND(ts[i].num)); ++ int den = ROUND(ts[i].den); ++ int den_byte = 0; ++ while (den > 1) { // compute the log2 of denominator ++ den_byte++; ++ den >>= 1; ++ } ++ out_file->put(den_byte); ++ out_file->put(24); // clocks per quarter ++ out_file->put(8); // 32nd notes per 24 clocks ++} ++ ++ ++ ++void Alg_smf_write::write(ostream &file) ++{ ++ int track_len_offset; ++ int track_end_offset; ++ int track_len; ++ ++ out_file = &file; ++ ++ // Header ++ file << "MThd"; ++ ++ write_32bit(6); // chunk length ++ ++ write_16bit(1); // format 1 MIDI file ++ ++ write_16bit(seq->tracks()); // number of tracks ++ write_16bit(division); // divisions per quarter note ++ ++ ++ // write_ all tracks ++ seq->convert_to_beats(); ++ int i; ++ for (i = 0; i < seq->tracks(); i++) { ++ previous_divs = 0; ++ *out_file << "MTrk"; ++ track_len_offset = out_file->tellp(); ++ write_32bit(0); // track len placeholder ++ ++ write_track(i); ++ ++ // End of track event ++ write_varinum(0); // delta time ++ out_file->put('\xFF'); ++ out_file->put('\x2F'); ++ out_file->put('\x00'); ++ ++ // Go back and write in the length of the track ++ track_end_offset = out_file->tellp(); ++ track_len = track_end_offset - track_len_offset - 4; ++ out_file->seekp(track_len_offset); ++ write_32bit(track_len); ++ out_file->seekp(track_end_offset); ++ } ++} ++ ++ ++void Alg_smf_write::write_16bit(int num) ++{ ++ out_file->put((num & 0xFF00) >> 8); ++ out_file->put(num & 0xFF); ++} ++ ++void Alg_smf_write::write_24bit(int num) ++{ ++ out_file->put((num & 0xFF0000) >> 16); ++ out_file->put((num & 0xFF00) >> 8); ++ out_file->put((num & 0xFF)); ++} ++ ++void Alg_smf_write::write_32bit(int num) ++{ ++ out_file->put((num & 0xFF000000) >> 24); ++ out_file->put((num & 0xFF0000) >> 16); ++ out_file->put((num & 0xFF00) >> 8); ++ out_file->put((num & 0xFF)); ++} ++ ++ ++void Alg_smf_write::write_delta(double event_time) ++{ ++ // divisions is ideal absolute time in divisions ++ long divisions = ROUND(division * event_time); ++ long delta_divs = divisions - previous_divs; ++ write_varinum(delta_divs); ++ previous_divs = divisions; ++} ++ ++ ++void Alg_smf_write::write_varinum(int value) ++{ ++ if(value<0) value=0;//this line should not have to be here! ++ int buffer; ++ ++ buffer = value & 0x7f; ++ while ((value >>= 7) > 0) { ++ buffer <<= 8; ++ buffer |= 0x80; ++ buffer += (value & 0x7f); ++ } ++ ++ for(;;) { ++ out_file->put(buffer); ++ if (buffer & 0x80) ++ buffer >>= 8; ++ else ++ break; ++ } ++} ++ ++ ++void Alg_seq::smf_write(ostream &file) ++{ ++ Alg_smf_write writer(this); ++ writer.write(file); ++} ++ ++bool Alg_seq::smf_write(const char *filename) ++{ ++ ofstream outf(filename, ios::binary | ios::out); ++ if (outf.fail()) return false; ++ smf_write(outf); ++ outf.close(); ++ return true; ++} +diff --git a/allegrowr.cpp b/allegrowr.cpp +index 3142cfd..54bf601 100755 +--- a/allegrowr.cpp ++++ b/allegrowr.cpp +@@ -1,183 +1,183 @@ +-// allegrowr.cpp -- write sequence to an Allegro file (text) +- +-#include "assert.h" +-#include "stdlib.h" +-#include +-#include +-#include +-#include +-#include +-#include "memory.h" +-using namespace std; +-#include "strparse.h" +-#include "allegro.h" +- +-// Note about precision: %g prints 6 significant digits. For 1ms precision, +-// the maximum magnitude is 999.999, i.e. 1000s < 17minutes. For anything +-// over 1000s, time in seconds will be printed with 10ms precision, which +-// is not good. Therefore, times and durations are printed as %.4d, which +-// gives 100us precision. +-// The following define allows you to change this decision: +-/* #define TIMFMT "%.4d" */ +-#define TIMPREC 4 +-#define TIMFMT fixed << setprecision(TIMPREC) +-#define GFMT resetiosflags(ios::floatfield) << setprecision(6) +- +-void parameter_print(ostream &file, Alg_parameter_ptr p) +-{ +- file << " -" << p->attr_name() << ":"; +- switch (p->attr_type()) { +- case 'a': +- file << "'" << alg_attr_name(p->a) << "'"; +- break; +- case 'i': +- file << p->i; +- break; +- case 'l': +- file << (p->l ? "true" : "false"); +- break; +- case 'r': +- file << p->r; +- break; +- case 's': { +- string str; +- string_escape(str, p->s, "\""); +- file << str; +- break; +- } +- } +-} +- +-Alg_event_ptr Alg_seq::write_track_name(ostream &file, int n, +- Alg_events &events) +-// write #track +-// if we write the name on the "#track" line, then we do *not* want +-// to write again as an update: "-seqnames:"Jordu", so if we do +-// find a name and write it, return a pointer to it so the track +-// writer knows what update (if any) to skip +-{ +- Alg_event_ptr e = NULL; // e is the result, default is NULL +- file << "#track " << n; +- const char *attr = symbol_table.insert_string( +- n == 0 ? "seqnames" : "tracknames"); +- // search for name in events with timestamp of 0 +- for (int i = 0; i < events.length(); i++) { +- Alg_event_ptr ue = events[i]; +- if (ue->time > 0) break; +- if (ue->is_update()) { +- Alg_update_ptr u = (Alg_update_ptr) ue; +- if (u->parameter.attr == attr) { +- file << " " << u->parameter.s; +- e = ue; // return the update event we found +- break; +- } +- } +- } +- file << endl; // end of line containing #track [] +- return e; // return parameter event with name if one was found +-} +- +- +-void Alg_seq::write(ostream &file, bool in_secs, double offset) +-{ +- int i, j; +- if (in_secs) convert_to_seconds(); +- else convert_to_beats(); +- file << "#offset " << offset << endl; +- Alg_event_ptr update_to_skip = write_track_name(file, 0, track_list[0]); +- Alg_beats &beats = time_map->beats; +- for (i = 0; i < beats.len - 1; i++) { +- Alg_beat_ptr b = &(beats[i]); +- if (in_secs) { +- file << "T" << TIMFMT << b->time; +- } else { +- file << "TW" << TIMFMT << b->beat / 4; +- } +- double tempo = (beats[i + 1].beat - b->beat) / +- (beats[i + 1].time - beats[i].time); +- file << " -tempor:" << GFMT << tempo * 60 << "\n"; +- } +- if (time_map->last_tempo_flag) { // we have final tempo: +- Alg_beat_ptr b = &(beats[beats.len - 1]); +- if (in_secs) { +- file << "T" << TIMFMT << b->time; +- } else { +- file << "TW" << TIMFMT << b->beat / 4; +- } +- file << " -tempor:" << GFMT << time_map->last_tempo * 60.0 << "\n"; +- } +- +- // write the time signatures +- for (i = 0; i < time_sig.length(); i++) { +- Alg_time_sig &ts = time_sig[i]; +- double time = ts.beat; +- if (in_secs) { +- file << "T" << TIMFMT << time << " V- -timesig_numr:" << +- GFMT << ts.num << "\n"; +- file << "T" << TIMFMT << time << " V- -timesig_denr:" << +- GFMT << ts.den << "\n"; +- } else { +- double wholes = ts.beat / 4; +- file << "TW" << TIMFMT << wholes << " V- -timesig_numr:" << +- GFMT << ts.num << "\n"; +- file << "TW" << TIMFMT << wholes << " V- -timesig_denr:" << +- GFMT << ts.den << "\n"; +- } +- } +- +- for (j = 0; j < track_list.length(); j++) { +- Alg_events ¬es = track_list[j]; +- if (j != 0) update_to_skip = write_track_name(file, j, notes); +- // now write the notes at beat positions +- for (i = 0; i < notes.length(); i++) { +- Alg_event_ptr e = notes[i]; +- // if we already wrote this event as a track or sequence name, +- // do not write it again +- if (e == update_to_skip) continue; +- double start = e->time; +- if (in_secs) { +- file << "T" << TIMFMT << start; +- } else { +- file << "TW" << TIMFMT << start / 4; +- } +- // write the channel as Vn or V- +- if (e->chan == -1) file << " V-"; +- else file << " V" << e->chan; +- // write the note or update data +- if (e->is_note()) { +- Alg_note_ptr n = (Alg_note_ptr) e; +- double dur = n->dur; +- file << " K" << n->get_identifier() << +- " P" << GFMT << n->pitch; +- if (in_secs) { +- file << " U" << TIMFMT << dur; +- } else { +- file << " Q" << TIMFMT << dur; +- } +- file << " L" << GFMT << n->loud; +- Alg_parameters_ptr p = n->parameters; +- while (p) { +- parameter_print(file, &(p->parm)); +- p = p->next; +- } +- } else { // an update +- assert(e->is_update()); +- Alg_update_ptr u = (Alg_update_ptr) e; +- if (u->get_identifier() != -1) { +- file << " K" << u->get_identifier(); +- } +- parameter_print(file, &(u->parameter)); +- } +- file << "\n"; +- } +- } +-} +- +-bool Alg_seq::write(const char *filename, double offset) +-{ +- ofstream file(filename); +- if (file.fail()) return false; +- write(file, units_are_seconds, offset); +- file.close(); +- return true; +-} ++// allegrowr.cpp -- write sequence to an Allegro file (text) ++ ++#include "assert.h" ++#include "stdlib.h" ++#include ++#include ++#include ++#include ++#include ++#include "memory.h" ++using namespace std; ++#include "strparse.h" ++#include "allegro.h" ++ ++// Note about precision: %g prints 6 significant digits. For 1ms precision, ++// the maximum magnitude is 999.999, i.e. 1000s < 17minutes. For anything ++// over 1000s, time in seconds will be printed with 10ms precision, which ++// is not good. Therefore, times and durations are printed as %.4d, which ++// gives 100us precision. ++// The following define allows you to change this decision: ++/* #define TIMFMT "%.4d" */ ++#define TIMPREC 4 ++#define TIMFMT fixed << setprecision(TIMPREC) ++#define GFMT resetiosflags(ios::floatfield) << setprecision(6) ++ ++void parameter_print(ostream &file, Alg_parameter_ptr p) ++{ ++ file << " -" << p->attr_name() << ":"; ++ switch (p->attr_type()) { ++ case 'a': ++ file << "'" << alg_attr_name(p->a) << "'"; ++ break; ++ case 'i': ++ file << p->i; ++ break; ++ case 'l': ++ file << (p->l ? "true" : "false"); ++ break; ++ case 'r': ++ file << p->r; ++ break; ++ case 's': { ++ string str; ++ string_escape(str, p->s, "\""); ++ file << str; ++ break; ++ } ++ } ++} ++ ++Alg_event_ptr Alg_seq::write_track_name(ostream &file, int n, ++ Alg_events &events) ++// write #track ++// if we write the name on the "#track" line, then we do *not* want ++// to write again as an update: "-seqnames:"Jordu", so if we do ++// find a name and write it, return a pointer to it so the track ++// writer knows what update (if any) to skip ++{ ++ Alg_event_ptr e = NULL; // e is the result, default is NULL ++ file << "#track " << n; ++ const char *attr = symbol_table.insert_string( ++ n == 0 ? "seqnames" : "tracknames"); ++ // search for name in events with timestamp of 0 ++ for (int i = 0; i < events.length(); i++) { ++ Alg_event_ptr ue = events[i]; ++ if (ue->time > 0) break; ++ if (ue->is_update()) { ++ Alg_update_ptr u = (Alg_update_ptr) ue; ++ if (u->parameter.attr == attr) { ++ file << " " << u->parameter.s; ++ e = ue; // return the update event we found ++ break; ++ } ++ } ++ } ++ file << endl; // end of line containing #track [] ++ return e; // return parameter event with name if one was found ++} ++ ++ ++void Alg_seq::write(ostream &file, bool in_secs, double offset) ++{ ++ int i, j; ++ if (in_secs) convert_to_seconds(); ++ else convert_to_beats(); ++ file << "#offset " << offset << endl; ++ Alg_event_ptr update_to_skip = write_track_name(file, 0, track_list[0]); ++ Alg_beats &beats = time_map->beats; ++ for (i = 0; i < beats.len - 1; i++) { ++ Alg_beat_ptr b = &(beats[i]); ++ if (in_secs) { ++ file << "T" << TIMFMT << b->time; ++ } else { ++ file << "TW" << TIMFMT << b->beat / 4; ++ } ++ double tempo = (beats[i + 1].beat - b->beat) / ++ (beats[i + 1].time - beats[i].time); ++ file << " -tempor:" << GFMT << tempo * 60 << "\n"; ++ } ++ if (time_map->last_tempo_flag) { // we have final tempo: ++ Alg_beat_ptr b = &(beats[beats.len - 1]); ++ if (in_secs) { ++ file << "T" << TIMFMT << b->time; ++ } else { ++ file << "TW" << TIMFMT << b->beat / 4; ++ } ++ file << " -tempor:" << GFMT << time_map->last_tempo * 60.0 << "\n"; ++ } ++ ++ // write the time signatures ++ for (i = 0; i < time_sig.length(); i++) { ++ Alg_time_sig &ts = time_sig[i]; ++ double time = ts.beat; ++ if (in_secs) { ++ file << "T" << TIMFMT << time << " V- -timesig_numr:" << ++ GFMT << ts.num << "\n"; ++ file << "T" << TIMFMT << time << " V- -timesig_denr:" << ++ GFMT << ts.den << "\n"; ++ } else { ++ double wholes = ts.beat / 4; ++ file << "TW" << TIMFMT << wholes << " V- -timesig_numr:" << ++ GFMT << ts.num << "\n"; ++ file << "TW" << TIMFMT << wholes << " V- -timesig_denr:" << ++ GFMT << ts.den << "\n"; ++ } ++ } ++ ++ for (j = 0; j < track_list.length(); j++) { ++ Alg_events ¬es = track_list[j]; ++ if (j != 0) update_to_skip = write_track_name(file, j, notes); ++ // now write the notes at beat positions ++ for (i = 0; i < notes.length(); i++) { ++ Alg_event_ptr e = notes[i]; ++ // if we already wrote this event as a track or sequence name, ++ // do not write it again ++ if (e == update_to_skip) continue; ++ double start = e->time; ++ if (in_secs) { ++ file << "T" << TIMFMT << start; ++ } else { ++ file << "TW" << TIMFMT << start / 4; ++ } ++ // write the channel as Vn or V- ++ if (e->chan == -1) file << " V-"; ++ else file << " V" << e->chan; ++ // write the note or update data ++ if (e->is_note()) { ++ Alg_note_ptr n = (Alg_note_ptr) e; ++ double dur = n->dur; ++ file << " K" << n->get_identifier() << ++ " P" << GFMT << n->pitch; ++ if (in_secs) { ++ file << " U" << TIMFMT << dur; ++ } else { ++ file << " Q" << TIMFMT << dur; ++ } ++ file << " L" << GFMT << n->loud; ++ Alg_parameters_ptr p = n->parameters; ++ while (p) { ++ parameter_print(file, &(p->parm)); ++ p = p->next; ++ } ++ } else { // an update ++ assert(e->is_update()); ++ Alg_update_ptr u = (Alg_update_ptr) e; ++ if (u->get_identifier() != -1) { ++ file << " K" << u->get_identifier(); ++ } ++ parameter_print(file, &(u->parameter)); ++ } ++ file << "\n"; ++ } ++ } ++} ++ ++bool Alg_seq::write(const char *filename, double offset) ++{ ++ ofstream file(filename); ++ if (file.fail()) return false; ++ write(file, units_are_seconds, offset); ++ file.close(); ++ return true; ++} +diff --git a/configure.ac b/configure.ac +index 0e605aa..ea873c3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,136 +1,136 @@ +-dnl +-dnl portSMF configure.in script - version not using libtool +-dnl +-dnl Joshua Haberman +-dnl Dominic Mazzoni +-dnl Richard Ash +-dnl +- +-dnl +-dnl Instructions: to create "configure" from "configure.in", run: +-dnl aclocal +-dnl autoconf +- +-dnl Process this file with autoconf to produce a configure script. +- +-dnl Require autoconf >= 2.61 +-AC_PREREQ(2.61) +- +-dnl Init autoconf and automake +-AC_INIT([portSMF],[0.1]) +-dnl check that we have some source code +-AC_CONFIG_SRCDIR([allegro.h]) +-dnl keep autools files in a subdirectory +-AC_CONFIG_AUX_DIR(autotools) +-# which also contains a subdir containing macros +-AC_CONFIG_MACRO_DIR([autotools/m4]) +-dnl set up automake +-AM_INIT_AUTOMAKE([-Wall foreign]) +-dnl Audacity policy: don't enable automatic rebuild of configure et al if +-dnl sources change +-AM_MAINTAINER_MODE([enabled]) +- +-dnl ------------------------------------------------------- +-dnl Checks for programs. +-dnl ------------------------------------------------------- +-dnl save $CFLAGS etc. since AC_PROG_CC likes to insert "-g -O2" +-dnl if $CFLAGS is blank and it finds GCC +-cflags_save="$CFLAGS" +-cppflags_save="$CPPFLAGS" +-cxxflags_save="$CXXFLAGS" +-AC_PROG_CC +-AC_LANG([C++]) +-AC_PROG_CXX +-AC_PROG_CXXCPP +-CFLAGS="$cflags_save" +-CPPFLAGS="$cppflags_save" +-CXXFLAGS="$cxxflags_save" +- +-dnl we will need an "install" program to be available +-AC_PROG_INSTALL +-dnl and ranlib for static libraries +-AC_PROG_RANLIB +- +-dnl Make the install prefix available to the program so that the pkg-config file +-dnl can be created correctly +-AC_PREFIX_DEFAULT(/usr/local) +-if [[ $prefix = "NONE" ]] ; then +- AC_DEFINE(INSTALL_PREFIX, "/usr/local", +- [define as prefix where Audacity is installed]) +-else +- AC_DEFINE_UNQUOTED(INSTALL_PREFIX, "$prefix") +-fi +- +-dnl Build Options +- +-AC_ARG_ENABLE(debug, +- [AS_HELP_STRING([--enable-debug], +- [enable debug support [default=no]])], +- debug_preference="$enableval", +- debug_preference="no") +- +-dnl ---------------------------------------------------- +-dnl If user asked for debug, put debug in compiler flags +-dnl ---------------------------------------------------- +- +-if test x"$debug_preference" = "xyes" ; then +- dnl we want debuging on +- AC_MSG_NOTICE([Adding -g for debugging to CFLAGS and CXXFLAGS ...]) +- CFLAGS="${CFLAGS} -g " +- CXXFLAGS="${CXXFLAGS} -g " +-fi +- +-dnl -------------------------------------------------------------------------- +-dnl We would like warnings enabled on the builds, but different compilers need +-dnl different options for these. This bit tries to work out what flags we +-dnl should add to the compiler we are using. +-dnl -------------------------------------------------------------------------- +- +-dnl Strict prototypes flags for C (only C because doesn't work for C++) +-AX_CFLAGS_STRICT_PROTOTYPES(CFLAGS) +- +-dnl Sensible warnings for C +-AX_CFLAGS_WARN_ALL(wall_flags) +-CFLAGS="${CFLAGS} $wall_flags" +-dnl try and use it on C++ as well +-AX_CXX_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cxx_does_wall="yes", cxx_does_wall="no") +-if test "x$cxx_does_wall" = "xyes" ; then +- dnl can use all warnings flag on the C++ compiler +- CXXFLAGS="${CXXFLAGS} $wall_flags" +-fi +-AX_CXXCPP_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cpp_does_wall="yes", cpp_does_wall="no") +-if test "x$cpp_does_wall" = "xyes" ; then +- dnl can use all warnings flag on the C++ pre-processor +- CPPFLAGS="${CPPFLAGS} $wall_flags" +-fi +- +-dnl --- check for required libraries --- +-dnl system libraries +-AC_CHECK_FUNCS([strchr memmove]) +-AC_FUNC_MALLOC +-AC_HEADER_STDBOOL +- +-dnl Checks for header files. +-AC_HEADER_STDC +-AC_CHECK_HEADERS([stdlib.h string.h]) +- +-dnl Checks for typedefs, structures, and compiler characteristics. +-AC_C_CONST +-AC_TYPE_SIZE_T +- +-AC_CONFIG_FILES([Makefile portSMF.pc portSMF-uninstalled.pc]) +- +-AC_OUTPUT +- +-echo "" +-echo "Run 'configure --help' for an explanation of the possible options," +-echo "otherwise run 'make' to build portSMF." +- +-dnl Indentation settings for Vim and Emacs and unique identifier for Arch, a +-dnl version control system. Please do not modify past this point. +-# Local Variables: +-# c-basic-offset: 3 +-# indent-tabs-mode: nil +-# End: +-# +-# vim: et sts=3 sw=3 ++dnl ++dnl portSMF configure.in script - version not using libtool ++dnl ++dnl Joshua Haberman ++dnl Dominic Mazzoni ++dnl Richard Ash ++dnl ++ ++dnl ++dnl Instructions: to create "configure" from "configure.in", run: ++dnl aclocal ++dnl autoconf ++ ++dnl Process this file with autoconf to produce a configure script. ++ ++dnl Require autoconf >= 2.61 ++AC_PREREQ(2.61) ++ ++dnl Init autoconf and automake ++AC_INIT([portSMF],[0.1]) ++dnl check that we have some source code ++AC_CONFIG_SRCDIR([allegro.h]) ++dnl keep autools files in a subdirectory ++AC_CONFIG_AUX_DIR(autotools) ++# which also contains a subdir containing macros ++AC_CONFIG_MACRO_DIR([autotools/m4]) ++dnl set up automake ++AM_INIT_AUTOMAKE([-Wall foreign]) ++dnl Audacity policy: don't enable automatic rebuild of configure et al if ++dnl sources change ++AM_MAINTAINER_MODE([enabled]) ++ ++dnl ------------------------------------------------------- ++dnl Checks for programs. ++dnl ------------------------------------------------------- ++dnl save $CFLAGS etc. since AC_PROG_CC likes to insert "-g -O2" ++dnl if $CFLAGS is blank and it finds GCC ++cflags_save="$CFLAGS" ++cppflags_save="$CPPFLAGS" ++cxxflags_save="$CXXFLAGS" ++AC_PROG_CC ++AC_LANG([C++]) ++AC_PROG_CXX ++AC_PROG_CXXCPP ++CFLAGS="$cflags_save" ++CPPFLAGS="$cppflags_save" ++CXXFLAGS="$cxxflags_save" ++ ++dnl we will need an "install" program to be available ++AC_PROG_INSTALL ++dnl and ranlib for static libraries ++AC_PROG_RANLIB ++ ++dnl Make the install prefix available to the program so that the pkg-config file ++dnl can be created correctly ++AC_PREFIX_DEFAULT(/usr/local) ++if [[ $prefix = "NONE" ]] ; then ++ AC_DEFINE(INSTALL_PREFIX, "/usr/local", ++ [define as prefix where Audacity is installed]) ++else ++ AC_DEFINE_UNQUOTED(INSTALL_PREFIX, "$prefix") ++fi ++ ++dnl Build Options ++ ++AC_ARG_ENABLE(debug, ++ [AS_HELP_STRING([--enable-debug], ++ [enable debug support [default=no]])], ++ debug_preference="$enableval", ++ debug_preference="no") ++ ++dnl ---------------------------------------------------- ++dnl If user asked for debug, put debug in compiler flags ++dnl ---------------------------------------------------- ++ ++if test x"$debug_preference" = "xyes" ; then ++ dnl we want debuging on ++ AC_MSG_NOTICE([Adding -g for debugging to CFLAGS and CXXFLAGS ...]) ++ CFLAGS="${CFLAGS} -g " ++ CXXFLAGS="${CXXFLAGS} -g " ++fi ++ ++dnl -------------------------------------------------------------------------- ++dnl We would like warnings enabled on the builds, but different compilers need ++dnl different options for these. This bit tries to work out what flags we ++dnl should add to the compiler we are using. ++dnl -------------------------------------------------------------------------- ++ ++dnl Strict prototypes flags for C (only C because doesn't work for C++) ++AX_CFLAGS_STRICT_PROTOTYPES(CFLAGS) ++ ++dnl Sensible warnings for C ++AX_CFLAGS_WARN_ALL(wall_flags) ++CFLAGS="${CFLAGS} $wall_flags" ++dnl try and use it on C++ as well ++AX_CXX_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cxx_does_wall="yes", cxx_does_wall="no") ++if test "x$cxx_does_wall" = "xyes" ; then ++ dnl can use all warnings flag on the C++ compiler ++ CXXFLAGS="${CXXFLAGS} $wall_flags" ++fi ++AX_CXXCPP_CHECK_FLAG([$wall_flags], [[int foo;]], [[foo = 1;]], cpp_does_wall="yes", cpp_does_wall="no") ++if test "x$cpp_does_wall" = "xyes" ; then ++ dnl can use all warnings flag on the C++ pre-processor ++ CPPFLAGS="${CPPFLAGS} $wall_flags" ++fi ++ ++dnl --- check for required libraries --- ++dnl system libraries ++AC_CHECK_FUNCS([strchr memmove]) ++AC_FUNC_MALLOC ++AC_HEADER_STDBOOL ++ ++dnl Checks for header files. ++AC_HEADER_STDC ++AC_CHECK_HEADERS([stdlib.h string.h]) ++ ++dnl Checks for typedefs, structures, and compiler characteristics. ++AC_C_CONST ++AC_TYPE_SIZE_T ++ ++AC_CONFIG_FILES([Makefile portSMF.pc portSMF-uninstalled.pc]) ++ ++AC_OUTPUT ++ ++echo "" ++echo "Run 'configure --help' for an explanation of the possible options," ++echo "otherwise run 'make' to build portSMF." ++ ++dnl Indentation settings for Vim and Emacs and unique identifier for Arch, a ++dnl version control system. Please do not modify past this point. ++# Local Variables: ++# c-basic-offset: 3 ++# indent-tabs-mode: nil ++# End: ++# ++# vim: et sts=3 sw=3 +diff --git a/mfmidi.cpp b/mfmidi.cpp +index eba292f..6aa2529 100755 +--- a/mfmidi.cpp ++++ b/mfmidi.cpp +@@ -1,486 +1,486 @@ +-/* +- * Read a Standard MIDI File. Externally-assigned function pointers are +- * called upon recognizing things in the file. See midifile(3). +- */ +- +-/***************************************************************************** +-* Change Log +-* Date | who : Change +-*-----------+----------------------------------------------------------------- +-* 2-Mar-92 | GWL : created changelog; MIDIFILE_ERROR to satisfy compiler +-*****************************************************************************/ +- +-#include "stdio.h" +-#include "mfmidi.h" +-#include "string.h" +-#include "assert.h" +- +-#define MIDIFILE_ERROR -1 +- +-/* public stuff */ +-extern int abort_flag; +- +- +-void Midifile_reader::midifile() +-{ +- int ntrks; +- midifile_error = 0; +- +- ntrks = readheader(); +- if (midifile_error) return; +- if (ntrks <= 0) { +- mferror("No tracks!"); +- /* no need to return since midifile_error is set */ +- } +- while (ntrks-- > 0 && !midifile_error) readtrack(); +-} +- +-int Midifile_reader::readmt(char *s, int skip) +- /* read through the "MThd" or "MTrk" header string */ +- /* if skip == 1, we attempt to skip initial garbage. */ +-{ +- assert(strlen(s) == 4); // must be "MThd" or "MTrk" +- int nread = 0; +- char b[4]; +- char buff[32]; +- int c; +- char *errmsg = "expecting "; +- +- retry: +- while ( nread<4 ) { +- c = Mf_getc(); +- if ( c == EOF ) { +- errmsg = "EOF while expecting "; +- goto err; +- } +- b[nread++] = c; +- } +- /* See if we found the 4 characters we're looking for */ +- if ( s[0]==b[0] && s[1]==b[1] && s[2]==b[2] && s[3]==b[3] ) +- return(0); +- if ( skip ) { +- /* If we are supposed to skip initial garbage, */ +- /* try again with the next character. */ +- b[0]=b[1]; +- b[1]=b[2]; +- b[2]=b[3]; +- nread = 3; +- goto retry; +- } +- err: +-#pragma warning(disable: 4996) // strcpy is safe since strings have known lengths +- (void) strcpy(buff,errmsg); +- (void) strcat(buff,s); +-#pragma warning(default: 4996) // turn it back on +- mferror(buff); +- return(0); +-} +- +-int Midifile_reader::egetc() +- /* read a single character and abort on EOF */ +-{ +- int c = Mf_getc(); +- +- if ( c == EOF ) { +- mferror("premature EOF"); +- return EOF; +- } +- Mf_toberead--; +- return(c); +-} +- +-int Midifile_reader::readheader() +- /* read a header chunk */ +-{ +- int format, ntrks, division; +- +- if ( readmt("MThd",Mf_skipinit) == EOF ) +- return(0); +- +- Mf_toberead = read32bit(); +- if (midifile_error) return MIDIFILE_ERROR; +- format = read16bit(); +- if (midifile_error) return MIDIFILE_ERROR; +- ntrks = read16bit(); +- if (midifile_error) return MIDIFILE_ERROR; +- division = read16bit(); +- if (midifile_error) return MIDIFILE_ERROR; +- +- Mf_header(format,ntrks,division); +- +- /* flush any extra stuff, in case the length of header is not 6 */ +- while ( Mf_toberead > 0 && !midifile_error) +- (void) egetc(); +- return(ntrks); +-} +- +-void Midifile_reader::readtrack() +- /* read a track chunk */ +-{ +- /* This array is indexed by the high half of a status byte. It's */ +- /* value is either the number of bytes needed (1 or 2) for a channel */ +- /* message, or 0 (meaning it's not a channel message). */ +- static int chantype[] = { +- 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 through 0x70 */ +- 2, 2, 2, 2, 1, 1, 2, 0 /* 0x80 through 0xf0 */ +- }; +- long lookfor, lng; +- int c, c1, type; +- int sysexcontinue = 0; /* 1 if last message was an unfinished sysex */ +- int running = 0; /* 1 when running status used */ +- int status = 0; /* (possibly running) status byte */ +- int needed; +- +- if ( readmt("MTrk",0) == EOF ) +- return; +- +- Mf_toberead = read32bit(); +- +- if (midifile_error) return; +- +- Mf_currtime = 0L; +- +- Mf_starttrack(); +- +- while ( Mf_toberead > 0 ) { +- +- Mf_currtime += readvarinum(); /* delta time */ +- if (midifile_error) return; +- +- c = egetc(); +- if (midifile_error) return; +- +- if ( sysexcontinue && c != 0xf7 ) { +- mferror("didn't find expected continuation of a sysex"); +- return; +- } +- if ( (c & 0x80) == 0 ) { /* running status? */ +- if ( status == 0 ) { +- mferror("unexpected running status"); +- return; +- } +- running = 1; +- } else { +- status = c; +- running = 0; +- } +- +- needed = chantype[ (status>>4) & 0xf ]; +- +- if ( needed ) { /* ie. is it a channel message? */ +- +- if ( running ) +- c1 = c; +- else { +- c1 = egetc(); +- if (midifile_error) return; +- } +- chanmessage( status, c1, (needed>1) ? egetc() : 0 ); +- if (midifile_error) return; +- continue;; +- } +- +- switch ( c ) { +- +- case 0xff: /* meta event */ +- +- type = egetc(); +- if (midifile_error) return; +- /* watch out - Don't combine the next 2 statements */ +- lng = readvarinum(); +- if (midifile_error) return; +- lookfor = Mf_toberead - lng; +- msginit(); +- +- while ( Mf_toberead > lookfor ) { +- unsigned char c = egetc(); +- if (midifile_error) return; +- msgadd(c); +- } +- metaevent(type); +- break; +- +- case 0xf0: /* start of system exclusive */ +- +- /* watch out - Don't combine the next 2 statements */ +- lng = readvarinum(); +- if (midifile_error) return; +- lookfor = Mf_toberead - lng; +- msginit(); +- msgadd(0xf0); +- +- while ( Mf_toberead > lookfor ) { +- c = egetc(); +- if (midifile_error) return; +- msgadd(c); +- } +- if ( c==0xf7 || Mf_nomerge==0 ) +- sysex(); +- else +- sysexcontinue = 1; /* merge into next msg */ +- break; +- +- case 0xf7: /* sysex continuation or arbitrary stuff */ +- +- /* watch out - Don't combine the next 2 statements */ +- lng = readvarinum(); +- if (midifile_error) return; +- lookfor = Mf_toberead - lng; +- +- if ( ! sysexcontinue ) +- msginit(); +- +- while ( Mf_toberead > lookfor ) { +- c = egetc(); +- if (midifile_error) return; +- msgadd(c); +- } +- if ( ! sysexcontinue ) { +- Mf_arbitrary(msgleng(), msg()); +- } +- else if ( c == 0xf7 ) { +- sysex(); +- sysexcontinue = 0; +- } +- break; +- default: +- +- badbyte(c); +- +- break; +- } +- } +- Mf_endtrack(); +- return; +-} +- +-void Midifile_reader::badbyte(int c) +-{ +- char buff[32]; +-#pragma warning(disable: 4996) // safe in this case +- (void) sprintf(buff,"unexpected byte: 0x%02x",c); +-#pragma warning(default: 4996) +- mferror(buff); +-} +- +-void Midifile_reader::metaevent(int type) +-{ +- int leng = msgleng(); +- // made this unsigned to avoid sign extend +- unsigned char *m = msg(); +- +- switch ( type ) { +- case 0x00: +- Mf_seqnum(to16bit(m[0],m[1])); +- break; +- case 0x01: /* Text event */ +- case 0x02: /* Copyright notice */ +- case 0x03: /* Sequence/Track name */ +- case 0x04: /* Instrument name */ +- case 0x05: /* Lyric */ +- case 0x06: /* Marker */ +- case 0x07: /* Cue point */ +- case 0x08: +- case 0x09: +- case 0x0a: +- case 0x0b: +- case 0x0c: +- case 0x0d: +- case 0x0e: +- case 0x0f: +- /* These are all text events */ +- Mf_text(type,leng,m); +- break; +- case 0x20: +- Mf_chanprefix(m[0]); +- break; +- case 0x21: +- Mf_portprefix(m[0]); +- break; +- case 0x2f: /* End of Track */ +- Mf_eot(); +- break; +- case 0x51: /* Set tempo */ +- Mf_tempo(to32bit(0,m[0],m[1],m[2])); +- break; +- case 0x54: +- Mf_smpte(m[0],m[1],m[2],m[3],m[4]); +- break; +- case 0x58: +- Mf_timesig(m[0],m[1],m[2],m[3]); +- break; +- case 0x59: +- Mf_keysig(m[0],m[1]); +- break; +- case 0x7f: +- Mf_sqspecific(leng,m); +- break; +- default: +- Mf_metamisc(type,leng,m); +- } +-} +- +- +-void Midifile_reader::sysex() +-{ +- Mf_sysex(msgleng(), msg()); +-} +- +- +-void Midifile_reader::chanmessage(int status, int c1, int c2) +-{ +- int chan = status & 0xf; +- +- switch ( status & 0xf0 ) { +- case NOTEOFF: +- Mf_off(chan,c1,c2); +- break; +- case NOTEON: +- Mf_on(chan,c1,c2); +- break; +- case PRESSURE: +- Mf_pressure(chan,c1,c2); +- break; +- case CONTROLLER: +- Mf_controller(chan,c1,c2); +- break; +- case PITCHBEND: +- Mf_pitchbend(chan,c1,c2); +- break; +- case PROGRAM: +- Mf_program(chan,c1); +- break; +- case CHANPRESSURE: +- Mf_chanpressure(chan,c1); +- break; +- } +-} +- +-/* readvarinum - read a varying-length number, and return the */ +-/* number of characters it took. */ +- +-long Midifile_reader::readvarinum() +-{ +- long value; +- int c; +- +- c = egetc(); +- if (midifile_error) return 0; +- +- value = (long) c; +- if ( c & 0x80 ) { +- value &= 0x7f; +- do { +- c = egetc(); +- if (midifile_error) return 0; +- value = (value << 7) + (c & 0x7f); +- } while (c & 0x80); +- } +- return (value); +-} +- +-long Midifile_reader::to32bit(int c1, int c2, int c3, int c4) +-{ +- long value = 0L; +- +- value = (c1 & 0xff); +- value = (value<<8) + (c2 & 0xff); +- value = (value<<8) + (c3 & 0xff); +- value = (value<<8) + (c4 & 0xff); +- return (value); +-} +- +-int Midifile_reader::to16bit(int c1, int c2) +-{ +- return ((c1 & 0xff ) << 8) + (c2 & 0xff); +-} +- +-long Midifile_reader::read32bit() +-{ +- int c1, c2, c3, c4; +- +- c1 = egetc(); if (midifile_error) return 0; +- c2 = egetc(); if (midifile_error) return 0; +- c3 = egetc(); if (midifile_error) return 0; +- c4 = egetc(); if (midifile_error) return 0; +- return to32bit(c1,c2,c3,c4); +-} +- +-int Midifile_reader::read16bit() +-{ +- int c1, c2; +- c1 = egetc(); if (midifile_error) return 0; +- c2 = egetc(); if (midifile_error) return 0; +- return to16bit(c1,c2); +-} +- +-void Midifile_reader::mferror(char *s) +-{ +- Mf_error(s); +- midifile_error = 1; +-} +- +-/* The code below allows collection of a system exclusive message of */ +-/* arbitrary length. The Msgbuff is expanded as necessary. The only */ +-/* visible data/routines are msginit(), msgadd(), msg(), msgleng(). */ +- +-#define MSGINCREMENT 128 +- +-Midifile_reader::Midifile_reader() +-{ +- Mf_nomerge = 0; +- Mf_currtime = 0L; +- Mf_skipinit = 0; +- Mf_toberead = 0; +- +- Msgbuff = 0; /* message buffer */ +- Msgsize = 0; /* Size of currently allocated Msg */ +- Msgindex = 0; /* index of next available location in Msg */ +-} +- +-void Midifile_reader::finalize() +-{ +- if (Msgbuff) Mf_free(Msgbuff, Msgsize); +- Msgbuff = NULL; +-} +- +- +-void Midifile_reader::msginit() +-{ +- Msgindex = 0; +-} +- +-unsigned char *Midifile_reader::msg() +-{ +- return(Msgbuff); +-} +- +-int Midifile_reader::msgleng() +-{ +- return(Msgindex); +-} +- +-void Midifile_reader::msgadd(int c) +-{ +- /* If necessary, allocate larger message buffer. */ +- if ( Msgindex >= Msgsize ) +- msgenlarge(); +- Msgbuff[Msgindex++] = c; +-} +- +-void Midifile_reader::msgenlarge() +-{ +- unsigned char *newmess; +- unsigned char *oldmess = Msgbuff; +- int oldleng = Msgsize; +- +- Msgsize += MSGINCREMENT; +- newmess = (unsigned char *) Mf_malloc((sizeof(unsigned char) * Msgsize) ); +- +- /* copy old message into larger new one */ +- if ( oldmess != 0 ) { +- memcpy(newmess, oldmess, oldleng); +- Mf_free(oldmess, oldleng); +- } +- Msgbuff = newmess; +-} ++/* ++ * Read a Standard MIDI File. Externally-assigned function pointers are ++ * called upon recognizing things in the file. See midifile(3). ++ */ ++ ++/***************************************************************************** ++* Change Log ++* Date | who : Change ++*-----------+----------------------------------------------------------------- ++* 2-Mar-92 | GWL : created changelog; MIDIFILE_ERROR to satisfy compiler ++*****************************************************************************/ ++ ++#include "stdio.h" ++#include "mfmidi.h" ++#include "string.h" ++#include "assert.h" ++ ++#define MIDIFILE_ERROR -1 ++ ++/* public stuff */ ++extern int abort_flag; ++ ++ ++void Midifile_reader::midifile() ++{ ++ int ntrks; ++ midifile_error = 0; ++ ++ ntrks = readheader(); ++ if (midifile_error) return; ++ if (ntrks <= 0) { ++ mferror("No tracks!"); ++ /* no need to return since midifile_error is set */ ++ } ++ while (ntrks-- > 0 && !midifile_error) readtrack(); ++} ++ ++int Midifile_reader::readmt(char *s, int skip) ++ /* read through the "MThd" or "MTrk" header string */ ++ /* if skip == 1, we attempt to skip initial garbage. */ ++{ ++ assert(strlen(s) == 4); // must be "MThd" or "MTrk" ++ int nread = 0; ++ char b[4]; ++ char buff[32]; ++ int c; ++ char *errmsg = "expecting "; ++ ++ retry: ++ while ( nread<4 ) { ++ c = Mf_getc(); ++ if ( c == EOF ) { ++ errmsg = "EOF while expecting "; ++ goto err; ++ } ++ b[nread++] = c; ++ } ++ /* See if we found the 4 characters we're looking for */ ++ if ( s[0]==b[0] && s[1]==b[1] && s[2]==b[2] && s[3]==b[3] ) ++ return(0); ++ if ( skip ) { ++ /* If we are supposed to skip initial garbage, */ ++ /* try again with the next character. */ ++ b[0]=b[1]; ++ b[1]=b[2]; ++ b[2]=b[3]; ++ nread = 3; ++ goto retry; ++ } ++ err: ++#pragma warning(disable: 4996) // strcpy is safe since strings have known lengths ++ (void) strcpy(buff,errmsg); ++ (void) strcat(buff,s); ++#pragma warning(default: 4996) // turn it back on ++ mferror(buff); ++ return(0); ++} ++ ++int Midifile_reader::egetc() ++ /* read a single character and abort on EOF */ ++{ ++ int c = Mf_getc(); ++ ++ if ( c == EOF ) { ++ mferror("premature EOF"); ++ return EOF; ++ } ++ Mf_toberead--; ++ return(c); ++} ++ ++int Midifile_reader::readheader() ++ /* read a header chunk */ ++{ ++ int format, ntrks, division; ++ ++ if ( readmt("MThd",Mf_skipinit) == EOF ) ++ return(0); ++ ++ Mf_toberead = read32bit(); ++ if (midifile_error) return MIDIFILE_ERROR; ++ format = read16bit(); ++ if (midifile_error) return MIDIFILE_ERROR; ++ ntrks = read16bit(); ++ if (midifile_error) return MIDIFILE_ERROR; ++ division = read16bit(); ++ if (midifile_error) return MIDIFILE_ERROR; ++ ++ Mf_header(format,ntrks,division); ++ ++ /* flush any extra stuff, in case the length of header is not 6 */ ++ while ( Mf_toberead > 0 && !midifile_error) ++ (void) egetc(); ++ return(ntrks); ++} ++ ++void Midifile_reader::readtrack() ++ /* read a track chunk */ ++{ ++ /* This array is indexed by the high half of a status byte. It's */ ++ /* value is either the number of bytes needed (1 or 2) for a channel */ ++ /* message, or 0 (meaning it's not a channel message). */ ++ static int chantype[] = { ++ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 through 0x70 */ ++ 2, 2, 2, 2, 1, 1, 2, 0 /* 0x80 through 0xf0 */ ++ }; ++ long lookfor, lng; ++ int c, c1, type; ++ int sysexcontinue = 0; /* 1 if last message was an unfinished sysex */ ++ int running = 0; /* 1 when running status used */ ++ int status = 0; /* (possibly running) status byte */ ++ int needed; ++ ++ if ( readmt("MTrk",0) == EOF ) ++ return; ++ ++ Mf_toberead = read32bit(); ++ ++ if (midifile_error) return; ++ ++ Mf_currtime = 0L; ++ ++ Mf_starttrack(); ++ ++ while ( Mf_toberead > 0 ) { ++ ++ Mf_currtime += readvarinum(); /* delta time */ ++ if (midifile_error) return; ++ ++ c = egetc(); ++ if (midifile_error) return; ++ ++ if ( sysexcontinue && c != 0xf7 ) { ++ mferror("didn't find expected continuation of a sysex"); ++ return; ++ } ++ if ( (c & 0x80) == 0 ) { /* running status? */ ++ if ( status == 0 ) { ++ mferror("unexpected running status"); ++ return; ++ } ++ running = 1; ++ } else { ++ status = c; ++ running = 0; ++ } ++ ++ needed = chantype[ (status>>4) & 0xf ]; ++ ++ if ( needed ) { /* ie. is it a channel message? */ ++ ++ if ( running ) ++ c1 = c; ++ else { ++ c1 = egetc(); ++ if (midifile_error) return; ++ } ++ chanmessage( status, c1, (needed>1) ? egetc() : 0 ); ++ if (midifile_error) return; ++ continue;; ++ } ++ ++ switch ( c ) { ++ ++ case 0xff: /* meta event */ ++ ++ type = egetc(); ++ if (midifile_error) return; ++ /* watch out - Don't combine the next 2 statements */ ++ lng = readvarinum(); ++ if (midifile_error) return; ++ lookfor = Mf_toberead - lng; ++ msginit(); ++ ++ while ( Mf_toberead > lookfor ) { ++ unsigned char c = egetc(); ++ if (midifile_error) return; ++ msgadd(c); ++ } ++ metaevent(type); ++ break; ++ ++ case 0xf0: /* start of system exclusive */ ++ ++ /* watch out - Don't combine the next 2 statements */ ++ lng = readvarinum(); ++ if (midifile_error) return; ++ lookfor = Mf_toberead - lng; ++ msginit(); ++ msgadd(0xf0); ++ ++ while ( Mf_toberead > lookfor ) { ++ c = egetc(); ++ if (midifile_error) return; ++ msgadd(c); ++ } ++ if ( c==0xf7 || Mf_nomerge==0 ) ++ sysex(); ++ else ++ sysexcontinue = 1; /* merge into next msg */ ++ break; ++ ++ case 0xf7: /* sysex continuation or arbitrary stuff */ ++ ++ /* watch out - Don't combine the next 2 statements */ ++ lng = readvarinum(); ++ if (midifile_error) return; ++ lookfor = Mf_toberead - lng; ++ ++ if ( ! sysexcontinue ) ++ msginit(); ++ ++ while ( Mf_toberead > lookfor ) { ++ c = egetc(); ++ if (midifile_error) return; ++ msgadd(c); ++ } ++ if ( ! sysexcontinue ) { ++ Mf_arbitrary(msgleng(), msg()); ++ } ++ else if ( c == 0xf7 ) { ++ sysex(); ++ sysexcontinue = 0; ++ } ++ break; ++ default: ++ ++ badbyte(c); ++ ++ break; ++ } ++ } ++ Mf_endtrack(); ++ return; ++} ++ ++void Midifile_reader::badbyte(int c) ++{ ++ char buff[32]; ++#pragma warning(disable: 4996) // safe in this case ++ (void) sprintf(buff,"unexpected byte: 0x%02x",c); ++#pragma warning(default: 4996) ++ mferror(buff); ++} ++ ++void Midifile_reader::metaevent(int type) ++{ ++ int leng = msgleng(); ++ // made this unsigned to avoid sign extend ++ unsigned char *m = msg(); ++ ++ switch ( type ) { ++ case 0x00: ++ Mf_seqnum(to16bit(m[0],m[1])); ++ break; ++ case 0x01: /* Text event */ ++ case 0x02: /* Copyright notice */ ++ case 0x03: /* Sequence/Track name */ ++ case 0x04: /* Instrument name */ ++ case 0x05: /* Lyric */ ++ case 0x06: /* Marker */ ++ case 0x07: /* Cue point */ ++ case 0x08: ++ case 0x09: ++ case 0x0a: ++ case 0x0b: ++ case 0x0c: ++ case 0x0d: ++ case 0x0e: ++ case 0x0f: ++ /* These are all text events */ ++ Mf_text(type,leng,m); ++ break; ++ case 0x20: ++ Mf_chanprefix(m[0]); ++ break; ++ case 0x21: ++ Mf_portprefix(m[0]); ++ break; ++ case 0x2f: /* End of Track */ ++ Mf_eot(); ++ break; ++ case 0x51: /* Set tempo */ ++ Mf_tempo(to32bit(0,m[0],m[1],m[2])); ++ break; ++ case 0x54: ++ Mf_smpte(m[0],m[1],m[2],m[3],m[4]); ++ break; ++ case 0x58: ++ Mf_timesig(m[0],m[1],m[2],m[3]); ++ break; ++ case 0x59: ++ Mf_keysig(m[0],m[1]); ++ break; ++ case 0x7f: ++ Mf_sqspecific(leng,m); ++ break; ++ default: ++ Mf_metamisc(type,leng,m); ++ } ++} ++ ++ ++void Midifile_reader::sysex() ++{ ++ Mf_sysex(msgleng(), msg()); ++} ++ ++ ++void Midifile_reader::chanmessage(int status, int c1, int c2) ++{ ++ int chan = status & 0xf; ++ ++ switch ( status & 0xf0 ) { ++ case NOTEOFF: ++ Mf_off(chan,c1,c2); ++ break; ++ case NOTEON: ++ Mf_on(chan,c1,c2); ++ break; ++ case PRESSURE: ++ Mf_pressure(chan,c1,c2); ++ break; ++ case CONTROLLER: ++ Mf_controller(chan,c1,c2); ++ break; ++ case PITCHBEND: ++ Mf_pitchbend(chan,c1,c2); ++ break; ++ case PROGRAM: ++ Mf_program(chan,c1); ++ break; ++ case CHANPRESSURE: ++ Mf_chanpressure(chan,c1); ++ break; ++ } ++} ++ ++/* readvarinum - read a varying-length number, and return the */ ++/* number of characters it took. */ ++ ++long Midifile_reader::readvarinum() ++{ ++ long value; ++ int c; ++ ++ c = egetc(); ++ if (midifile_error) return 0; ++ ++ value = (long) c; ++ if ( c & 0x80 ) { ++ value &= 0x7f; ++ do { ++ c = egetc(); ++ if (midifile_error) return 0; ++ value = (value << 7) + (c & 0x7f); ++ } while (c & 0x80); ++ } ++ return (value); ++} ++ ++long Midifile_reader::to32bit(int c1, int c2, int c3, int c4) ++{ ++ long value = 0L; ++ ++ value = (c1 & 0xff); ++ value = (value<<8) + (c2 & 0xff); ++ value = (value<<8) + (c3 & 0xff); ++ value = (value<<8) + (c4 & 0xff); ++ return (value); ++} ++ ++int Midifile_reader::to16bit(int c1, int c2) ++{ ++ return ((c1 & 0xff ) << 8) + (c2 & 0xff); ++} ++ ++long Midifile_reader::read32bit() ++{ ++ int c1, c2, c3, c4; ++ ++ c1 = egetc(); if (midifile_error) return 0; ++ c2 = egetc(); if (midifile_error) return 0; ++ c3 = egetc(); if (midifile_error) return 0; ++ c4 = egetc(); if (midifile_error) return 0; ++ return to32bit(c1,c2,c3,c4); ++} ++ ++int Midifile_reader::read16bit() ++{ ++ int c1, c2; ++ c1 = egetc(); if (midifile_error) return 0; ++ c2 = egetc(); if (midifile_error) return 0; ++ return to16bit(c1,c2); ++} ++ ++void Midifile_reader::mferror(char *s) ++{ ++ Mf_error(s); ++ midifile_error = 1; ++} ++ ++/* The code below allows collection of a system exclusive message of */ ++/* arbitrary length. The Msgbuff is expanded as necessary. The only */ ++/* visible data/routines are msginit(), msgadd(), msg(), msgleng(). */ ++ ++#define MSGINCREMENT 128 ++ ++Midifile_reader::Midifile_reader() ++{ ++ Mf_nomerge = 0; ++ Mf_currtime = 0L; ++ Mf_skipinit = 0; ++ Mf_toberead = 0; ++ ++ Msgbuff = 0; /* message buffer */ ++ Msgsize = 0; /* Size of currently allocated Msg */ ++ Msgindex = 0; /* index of next available location in Msg */ ++} ++ ++void Midifile_reader::finalize() ++{ ++ if (Msgbuff) Mf_free(Msgbuff, Msgsize); ++ Msgbuff = NULL; ++} ++ ++ ++void Midifile_reader::msginit() ++{ ++ Msgindex = 0; ++} ++ ++unsigned char *Midifile_reader::msg() ++{ ++ return(Msgbuff); ++} ++ ++int Midifile_reader::msgleng() ++{ ++ return(Msgindex); ++} ++ ++void Midifile_reader::msgadd(int c) ++{ ++ /* If necessary, allocate larger message buffer. */ ++ if ( Msgindex >= Msgsize ) ++ msgenlarge(); ++ Msgbuff[Msgindex++] = c; ++} ++ ++void Midifile_reader::msgenlarge() ++{ ++ unsigned char *newmess; ++ unsigned char *oldmess = Msgbuff; ++ int oldleng = Msgsize; ++ ++ Msgsize += MSGINCREMENT; ++ newmess = (unsigned char *) Mf_malloc((sizeof(unsigned char) * Msgsize) ); ++ ++ /* copy old message into larger new one */ ++ if ( oldmess != 0 ) { ++ memcpy(newmess, oldmess, oldleng); ++ Mf_free(oldmess, oldleng); ++ } ++ Msgbuff = newmess; ++} +diff --git a/mfmidi.h b/mfmidi.h +index 4c86202..a7f5c50 100755 +--- a/mfmidi.h ++++ b/mfmidi.h +@@ -1,98 +1,98 @@ +-#define NOTEOFF 0x80 +-#define NOTEON 0x90 +-#define PRESSURE 0xa0 +-#define CONTROLLER 0xb0 +-#define PITCHBEND 0xe0 +-#define PROGRAM 0xc0 +-#define CHANPRESSURE 0xd0 +- +-/* These are the strings used in keynote to identify Standard MIDI File */ +-/* meta text messages. */ +- +-#define METATEXT "Text Event" +-#define METACOPYRIGHT "Copyright Notice" +-#define METASEQUENCE "Sequence/Track Name" +-#define METAINSTRUMENT "Instrument Name" +-#define METALYRIC "Lyric" +-#define METAMARKER "Marker" +-#define METACUE "Cue Point" +-#define METAUNRECOGNIZED "Unrecognized" +- +- +-class Midifile_reader { +-public: +- void midifile(); +- int Mf_nomerge; /* 1 => continue'ed system exclusives are */ +- /* not collapsed. */ +- long Mf_currtime; /* current time in delta-time units */ +- int Mf_skipinit; /* 1 if initial garbage should be skipped */ +- Midifile_reader(); +- // call finalize() when done or you may leak memory. +- void finalize(); /* clean up before deletion */ +- // Note: rather than finalize, we should have ~Midifile_reader(), +- // but at least VC++ complains that there is no Mf_free(), even +- // though Mf_free is declared as virtual and this is an abstract +- // class. I don't understand this, so finalize() is a workaround. -RBD +- +-protected: +- int midifile_error; +- +- virtual void *Mf_malloc(size_t size) = 0; /* malloc() */ +- virtual void Mf_free(void *obj, size_t size) = 0; /* free() */ +- /* Methods to be called while processing the MIDI file. */ +- virtual void Mf_starttrack() = 0; +- virtual void Mf_endtrack() = 0; +- virtual int Mf_getc() = 0; +- virtual void Mf_chanprefix(int) = 0; +- virtual void Mf_portprefix(int) = 0; +- virtual void Mf_eot() = 0; +- virtual void Mf_error(char *) = 0; +- virtual void Mf_header(int,int,int) = 0; +- virtual void Mf_on(int,int,int) = 0; +- virtual void Mf_off(int,int,int) = 0; +- virtual void Mf_pressure(int,int,int) = 0; +- virtual void Mf_controller(int,int,int) = 0; +- virtual void Mf_pitchbend(int,int,int) = 0; +- virtual void Mf_program(int,int) = 0; +- virtual void Mf_chanpressure(int,int) = 0; +- virtual void Mf_sysex(int,unsigned char*) = 0; +- virtual void Mf_arbitrary(int,unsigned char*) = 0; +- virtual void Mf_metamisc(int,int,unsigned char*) = 0; +- virtual void Mf_seqnum(int) = 0; +- virtual void Mf_smpte(int,int,int,int,int) = 0; +- virtual void Mf_timesig(int,int,int,int) = 0; +- virtual void Mf_tempo(int) = 0; +- virtual void Mf_keysig(int,int) = 0; +- virtual void Mf_sqspecific(int,unsigned char*) = 0; +- virtual void Mf_text(int,int,unsigned char*) = 0; +- +-private: +- long Mf_toberead; +- +- long readvarinum(); +- long read32bit(); +- int read16bit(); +- void msgenlarge(); +- unsigned char *msg(); +- int readheader(); +- void readtrack(); +- void sysex(); +- void msginit(); +- int egetc(); +- int msgleng(); +- +- int readmt(char*,int); +- long to32bit(int,int,int,int); +- int to16bit(int,int); +- void mferror(char *); +- void badbyte(int); +- void metaevent(int); +- void msgadd(int); +- void chanmessage(int,int,int); +- +- unsigned char *Msgbuff; +- long Msgsize; +- long Msgindex; +-}; +- +- ++#define NOTEOFF 0x80 ++#define NOTEON 0x90 ++#define PRESSURE 0xa0 ++#define CONTROLLER 0xb0 ++#define PITCHBEND 0xe0 ++#define PROGRAM 0xc0 ++#define CHANPRESSURE 0xd0 ++ ++/* These are the strings used in keynote to identify Standard MIDI File */ ++/* meta text messages. */ ++ ++#define METATEXT "Text Event" ++#define METACOPYRIGHT "Copyright Notice" ++#define METASEQUENCE "Sequence/Track Name" ++#define METAINSTRUMENT "Instrument Name" ++#define METALYRIC "Lyric" ++#define METAMARKER "Marker" ++#define METACUE "Cue Point" ++#define METAUNRECOGNIZED "Unrecognized" ++ ++ ++class Midifile_reader { ++public: ++ void midifile(); ++ int Mf_nomerge; /* 1 => continue'ed system exclusives are */ ++ /* not collapsed. */ ++ long Mf_currtime; /* current time in delta-time units */ ++ int Mf_skipinit; /* 1 if initial garbage should be skipped */ ++ Midifile_reader(); ++ // call finalize() when done or you may leak memory. ++ void finalize(); /* clean up before deletion */ ++ // Note: rather than finalize, we should have ~Midifile_reader(), ++ // but at least VC++ complains that there is no Mf_free(), even ++ // though Mf_free is declared as virtual and this is an abstract ++ // class. I don't understand this, so finalize() is a workaround. -RBD ++ ++protected: ++ int midifile_error; ++ ++ virtual void *Mf_malloc(size_t size) = 0; /* malloc() */ ++ virtual void Mf_free(void *obj, size_t size) = 0; /* free() */ ++ /* Methods to be called while processing the MIDI file. */ ++ virtual void Mf_starttrack() = 0; ++ virtual void Mf_endtrack() = 0; ++ virtual int Mf_getc() = 0; ++ virtual void Mf_chanprefix(int) = 0; ++ virtual void Mf_portprefix(int) = 0; ++ virtual void Mf_eot() = 0; ++ virtual void Mf_error(char *) = 0; ++ virtual void Mf_header(int,int,int) = 0; ++ virtual void Mf_on(int,int,int) = 0; ++ virtual void Mf_off(int,int,int) = 0; ++ virtual void Mf_pressure(int,int,int) = 0; ++ virtual void Mf_controller(int,int,int) = 0; ++ virtual void Mf_pitchbend(int,int,int) = 0; ++ virtual void Mf_program(int,int) = 0; ++ virtual void Mf_chanpressure(int,int) = 0; ++ virtual void Mf_sysex(int,unsigned char*) = 0; ++ virtual void Mf_arbitrary(int,unsigned char*) = 0; ++ virtual void Mf_metamisc(int,int,unsigned char*) = 0; ++ virtual void Mf_seqnum(int) = 0; ++ virtual void Mf_smpte(int,int,int,int,int) = 0; ++ virtual void Mf_timesig(int,int,int,int) = 0; ++ virtual void Mf_tempo(int) = 0; ++ virtual void Mf_keysig(int,int) = 0; ++ virtual void Mf_sqspecific(int,unsigned char*) = 0; ++ virtual void Mf_text(int,int,unsigned char*) = 0; ++ ++private: ++ long Mf_toberead; ++ ++ long readvarinum(); ++ long read32bit(); ++ int read16bit(); ++ void msgenlarge(); ++ unsigned char *msg(); ++ int readheader(); ++ void readtrack(); ++ void sysex(); ++ void msginit(); ++ int egetc(); ++ int msgleng(); ++ ++ int readmt(char*,int); ++ long to32bit(int,int,int,int); ++ int to16bit(int,int); ++ void mferror(char *); ++ void badbyte(int); ++ void metaevent(int); ++ void msgadd(int); ++ void chanmessage(int,int,int); ++ ++ unsigned char *Msgbuff; ++ long Msgsize; ++ long Msgindex; ++}; ++ ++ +diff --git a/notes.txt b/notes.txt +index f894f5c..ede0432 100755 +--- a/notes.txt ++++ b/notes.txt +@@ -1,34 +1,34 @@ +-merged track is not in order +- +-notes: +-75 bpm @ beat 0 +-150 bpm @ beat 1 @ time 0.8 +-100 bpm @ beat 2 @ time 1.2 +-300 bpm @ beat 3 @ time 1.8 +- +-units are beats +- +-...output... +-#track 0 +-TW0 -tempor:75 +-TW0.25 -tempor:150 +-TW0.5 -tempor:100 +-TW0.75 -tempor:300 +-TW0 V0 -attackr:0.007 +-TW0 V0 K63 P63 Q1 L105 +-TW0.25 V0 K65 P65 Q1 L107 +-TW0.5 V0 K67 P67 Q1 L107 +-TW0.75 V0 K69 P69 Q1 L109 +-Writing MIDI file... +-track_len 64 +-Done +-#track 0 +-TW0 -tempor:75 +-TW0.25 -tempor:150 +-TW0.5 -tempor:100 +-TW3 -tempor:300 +-TW0 V0 K63 P63 Q0.8 L105 +-TW0.2 V0 K65 P65 Q0.4 L107 +-TW0.3 V0 K67 P67 Q0.6 L107 +-TW0.45 V0 K69 P69 Q0.2 L109 +-done, type return to exit ++merged track is not in order ++ ++notes: ++75 bpm @ beat 0 ++150 bpm @ beat 1 @ time 0.8 ++100 bpm @ beat 2 @ time 1.2 ++300 bpm @ beat 3 @ time 1.8 ++ ++units are beats ++ ++...output... ++#track 0 ++TW0 -tempor:75 ++TW0.25 -tempor:150 ++TW0.5 -tempor:100 ++TW0.75 -tempor:300 ++TW0 V0 -attackr:0.007 ++TW0 V0 K63 P63 Q1 L105 ++TW0.25 V0 K65 P65 Q1 L107 ++TW0.5 V0 K67 P67 Q1 L107 ++TW0.75 V0 K69 P69 Q1 L109 ++Writing MIDI file... ++track_len 64 ++Done ++#track 0 ++TW0 -tempor:75 ++TW0.25 -tempor:150 ++TW0.5 -tempor:100 ++TW3 -tempor:300 ++TW0 V0 K63 P63 Q0.8 L105 ++TW0.2 V0 K65 P65 Q0.4 L107 ++TW0.3 V0 K67 P67 Q0.6 L107 ++TW0.45 V0 K69 P69 Q0.2 L109 ++done, type return to exit +diff --git a/portSMF-uninstalled.pc.in b/portSMF-uninstalled.pc.in +index 716b9f2..7d7806a 100644 +--- a/portSMF-uninstalled.pc.in ++++ b/portSMF-uninstalled.pc.in +@@ -1,16 +1,16 @@ +-# This pkg-config file lets you use the compiled lib without having to first +-# install it anywhere. Simply put the directory the pkg-config file is in on the +-# PKG_CONFIG_PATH and look for portSMF as normal - the uninstalled file +-# is prefered to the installed one if both are found +-libdir=@abs_builddir@ +-# The library always ends up in the build dir. +-includedir=@abs_srcdir@ +-# The headers are always in the source dir +- +-Name: portSMF +-Description: Portmedia Simple Midi File library +-Requires: +-Version: 0.1 +- +-Libs: -L${libdir} -lportSMF @LIBS@ +-Cflags: -I${includedir} @CXXFLAGS@ ++# This pkg-config file lets you use the compiled lib without having to first ++# install it anywhere. Simply put the directory the pkg-config file is in on the ++# PKG_CONFIG_PATH and look for portSMF as normal - the uninstalled file ++# is prefered to the installed one if both are found ++libdir=@abs_builddir@ ++# The library always ends up in the build dir. ++includedir=@abs_srcdir@ ++# The headers are always in the source dir ++ ++Name: portSMF ++Description: Portmedia Simple Midi File library ++Requires: ++Version: 0.1 ++ ++Libs: -L${libdir} -lportSMF @LIBS@ ++Cflags: -I${includedir} @CXXFLAGS@ +diff --git a/portSMF.pc.in b/portSMF.pc.in +index f144ad7..cf5c8e0 100644 +--- a/portSMF.pc.in ++++ b/portSMF.pc.in +@@ -1,10 +1,10 @@ +-libdir=@libdir@ +-includedir=@includedir@ +- +-Name: portSMF +-Description: Portmedia Simple Midi File library +-Requires: +-Version: 0.1 +- +-Libs: -L${libdir} -lportSMF @LIBS@ +-Cflags: -I${includedir} @CXXFLAGS@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: portSMF ++Description: Portmedia Simple Midi File library ++Requires: ++Version: 0.1 ++ ++Libs: -L${libdir} -lportSMF @LIBS@ ++Cflags: -I${includedir} @CXXFLAGS@ +diff --git a/portsmf-VC8.sln b/portsmf-VC8.sln +index e76f873..1c5f2db 100644 +--- a/portsmf-VC8.sln ++++ b/portsmf-VC8.sln +@@ -1,29 +1,29 @@ +- +-Microsoft Visual Studio Solution File, Format Version 9.00 +-# Visual C++ Express 2005 +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf", "portsmf-VC8.vcproj", "{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf_test", "portsmf_test\portsmf_test-VC8.vcproj", "{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}" +- ProjectSection(ProjectDependencies) = postProject +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346} = {D035BCF8-CF15-4456-A4E1-C7E6ACD79346} +- EndProjectSection +-EndProject +-Global +- GlobalSection(SolutionConfigurationPlatforms) = preSolution +- Debug|Win32 = Debug|Win32 +- Release|Win32 = Release|Win32 +- EndGlobalSection +- GlobalSection(ProjectConfigurationPlatforms) = postSolution +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.ActiveCfg = Debug|Win32 +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.Build.0 = Debug|Win32 +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.ActiveCfg = Release|Win32 +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.Build.0 = Release|Win32 +- {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.ActiveCfg = Debug|Win32 +- {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.Build.0 = Debug|Win32 +- {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.ActiveCfg = Release|Win32 +- {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.Build.0 = Release|Win32 +- EndGlobalSection +- GlobalSection(SolutionProperties) = preSolution +- HideSolutionNode = FALSE +- EndGlobalSection +-EndGlobal ++ ++Microsoft Visual Studio Solution File, Format Version 9.00 ++# Visual C++ Express 2005 ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf", "portsmf-VC8.vcproj", "{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf_test", "portsmf_test\portsmf_test-VC8.vcproj", "{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}" ++ ProjectSection(ProjectDependencies) = postProject ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346} = {D035BCF8-CF15-4456-A4E1-C7E6ACD79346} ++ EndProjectSection ++EndProject ++Global ++ GlobalSection(SolutionConfigurationPlatforms) = preSolution ++ Debug|Win32 = Debug|Win32 ++ Release|Win32 = Release|Win32 ++ EndGlobalSection ++ GlobalSection(ProjectConfigurationPlatforms) = postSolution ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.Build.0 = Debug|Win32 ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.ActiveCfg = Release|Win32 ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.Build.0 = Release|Win32 ++ {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.Build.0 = Debug|Win32 ++ {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.ActiveCfg = Release|Win32 ++ {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.Build.0 = Release|Win32 ++ EndGlobalSection ++ GlobalSection(SolutionProperties) = preSolution ++ HideSolutionNode = FALSE ++ EndGlobalSection ++EndGlobal +diff --git a/portsmf-VC8.vcproj b/portsmf-VC8.vcproj +index 9e9bde2..4838794 100644 +--- a/portsmf-VC8.vcproj ++++ b/portsmf-VC8.vcproj +@@ -1,213 +1,213 @@ +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/portsmf.sln b/portsmf.sln +index 174208b..245f000 100644 +--- a/portsmf.sln ++++ b/portsmf.sln +@@ -1,35 +1,35 @@ +- +-Microsoft Visual Studio Solution File, Format Version 10.00 +-# Visual C++ Express 2008 +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf", "portsmf.vcproj", "{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf_test", "portsmf_test\portsmf_test.vcproj", "{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}" +- ProjectSection(ProjectDependencies) = postProject +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346} = {D035BCF8-CF15-4456-A4E1-C7E6ACD79346} +- EndProjectSection +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allegroconvert", "apps\allegroconvert.vcproj", "{3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}" +-EndProject +-Global +- GlobalSection(SolutionConfigurationPlatforms) = preSolution +- Debug|Win32 = Debug|Win32 +- Release|Win32 = Release|Win32 +- EndGlobalSection +- GlobalSection(ProjectConfigurationPlatforms) = postSolution +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.ActiveCfg = Debug|Win32 +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.Build.0 = Debug|Win32 +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.ActiveCfg = Release|Win32 +- {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.Build.0 = Release|Win32 +- {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.ActiveCfg = Debug|Win32 +- {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.Build.0 = Debug|Win32 +- {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.ActiveCfg = Release|Win32 +- {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.Build.0 = Release|Win32 +- {3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Debug|Win32.ActiveCfg = Debug|Win32 +- {3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Debug|Win32.Build.0 = Debug|Win32 +- {3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Release|Win32.ActiveCfg = Debug|Win32 +- {3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Release|Win32.Build.0 = Debug|Win32 +- EndGlobalSection +- GlobalSection(SolutionProperties) = preSolution +- HideSolutionNode = FALSE +- EndGlobalSection +-EndGlobal ++ ++Microsoft Visual Studio Solution File, Format Version 10.00 ++# Visual C++ Express 2008 ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf", "portsmf.vcproj", "{D035BCF8-CF15-4456-A4E1-C7E6ACD79346}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portsmf_test", "portsmf_test\portsmf_test.vcproj", "{AF00107F-E436-4EBC-A1F3-CB176E7D1F84}" ++ ProjectSection(ProjectDependencies) = postProject ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346} = {D035BCF8-CF15-4456-A4E1-C7E6ACD79346} ++ EndProjectSection ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "allegroconvert", "apps\allegroconvert.vcproj", "{3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}" ++EndProject ++Global ++ GlobalSection(SolutionConfigurationPlatforms) = preSolution ++ Debug|Win32 = Debug|Win32 ++ Release|Win32 = Release|Win32 ++ EndGlobalSection ++ GlobalSection(ProjectConfigurationPlatforms) = postSolution ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Debug|Win32.Build.0 = Debug|Win32 ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.ActiveCfg = Release|Win32 ++ {D035BCF8-CF15-4456-A4E1-C7E6ACD79346}.Release|Win32.Build.0 = Release|Win32 ++ {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Debug|Win32.Build.0 = Debug|Win32 ++ {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.ActiveCfg = Release|Win32 ++ {AF00107F-E436-4EBC-A1F3-CB176E7D1F84}.Release|Win32.Build.0 = Release|Win32 ++ {3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Debug|Win32.Build.0 = Debug|Win32 ++ {3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Release|Win32.ActiveCfg = Debug|Win32 ++ {3CF9F99C-ADB3-4CD2-A6F9-2472C2083324}.Release|Win32.Build.0 = Debug|Win32 ++ EndGlobalSection ++ GlobalSection(SolutionProperties) = preSolution ++ HideSolutionNode = FALSE ++ EndGlobalSection ++EndGlobal +diff --git a/portsmf.vcproj b/portsmf.vcproj +index 8f6d864..efb1e3d 100644 +--- a/portsmf.vcproj ++++ b/portsmf.vcproj +@@ -1,214 +1,214 @@ +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/strparse.cpp b/strparse.cpp +index 592a21d..547424e 100755 +--- a/strparse.cpp ++++ b/strparse.cpp +@@ -1,87 +1,87 @@ +-#include +-#include +-// #include -- for debugging (cout) +-#include "ctype.h" +-using namespace std; +-#include "strparse.h" +- +-void String_parse::skip_space() +-{ +- while ((*str)[pos] && isspace((*str)[pos])) { +- pos = pos + 1; +- } +-} +- +- +-char String_parse::peek() +-{ +- return (*str)[pos]; +-} +- +- +-void String_parse::get_nonspace_quoted(string &field) +-{ +- field.clear(); +- skip_space(); +- bool quoted = false; +- if ((*str)[pos] == '"') { +- quoted = true; +- field.append(1, '"'); +- pos = pos + 1; +- } +- while ((*str)[pos] && (quoted || !isspace((*str)[pos]))) { +- if ((*str)[pos] == '"') { +- if (quoted) { +- field.append(1, '"'); +- pos = pos + 1; +- } +- return; +- } +- if ((*str)[pos] == '\\') { +- pos = pos + 1; +- } +- if ((*str)[pos]) { +- field.append(1, (*str)[pos]); +- pos = pos + 1; +- } +- } +-} +- +- +-static const char *const escape_chars[] = {"\\n", "\\t", "\\\\", "\\r", "\\\""}; +- +- +-void string_escape(string &result, const char *str, const char *quote) +-{ +- int length = (int) strlen(str); +- if (quote[0]) { +- result.append(1, quote[0]); +- } +- for (int i = 0; i < length; i++) { +- if (!isalnum((unsigned char) str[i])) { +- const char *const chars = "\n\t\\\r\""; +- const char *const special = strchr(chars, str[i]); +- if (special) { +- result.append(escape_chars[special - chars]); +- } else { +- result.append(1, str[i]); +- } +- } else { +- result.append(1, str[i]); +- } +- } +- result.append(1, quote[0]); +-} +- +-void String_parse::get_remainder(std::string &field) +-{ +- field.clear(); +- skip_space(); +- int len = str->length() - pos; +- if ((len > 0) && ((*str)[len - 1] == '\n')) { // if str ends in newline, +- len--; // reduce length to ignore newline +- } +- field.insert(0, *str, pos, len); +-} +- +- ++#include ++#include ++// #include -- for debugging (cout) ++#include "ctype.h" ++using namespace std; ++#include "strparse.h" ++ ++void String_parse::skip_space() ++{ ++ while ((*str)[pos] && isspace((*str)[pos])) { ++ pos = pos + 1; ++ } ++} ++ ++ ++char String_parse::peek() ++{ ++ return (*str)[pos]; ++} ++ ++ ++void String_parse::get_nonspace_quoted(string &field) ++{ ++ field.clear(); ++ skip_space(); ++ bool quoted = false; ++ if ((*str)[pos] == '"') { ++ quoted = true; ++ field.append(1, '"'); ++ pos = pos + 1; ++ } ++ while ((*str)[pos] && (quoted || !isspace((*str)[pos]))) { ++ if ((*str)[pos] == '"') { ++ if (quoted) { ++ field.append(1, '"'); ++ pos = pos + 1; ++ } ++ return; ++ } ++ if ((*str)[pos] == '\\') { ++ pos = pos + 1; ++ } ++ if ((*str)[pos]) { ++ field.append(1, (*str)[pos]); ++ pos = pos + 1; ++ } ++ } ++} ++ ++ ++static const char *const escape_chars[] = {"\\n", "\\t", "\\\\", "\\r", "\\\""}; ++ ++ ++void string_escape(string &result, const char *str, const char *quote) ++{ ++ int length = (int) strlen(str); ++ if (quote[0]) { ++ result.append(1, quote[0]); ++ } ++ for (int i = 0; i < length; i++) { ++ if (!isalnum((unsigned char) str[i])) { ++ const char *const chars = "\n\t\\\r\""; ++ const char *const special = strchr(chars, str[i]); ++ if (special) { ++ result.append(escape_chars[special - chars]); ++ } else { ++ result.append(1, str[i]); ++ } ++ } else { ++ result.append(1, str[i]); ++ } ++ } ++ result.append(1, quote[0]); ++} ++ ++void String_parse::get_remainder(std::string &field) ++{ ++ field.clear(); ++ skip_space(); ++ int len = str->length() - pos; ++ if ((len > 0) && ((*str)[len - 1] == '\n')) { // if str ends in newline, ++ len--; // reduce length to ignore newline ++ } ++ field.insert(0, *str, pos, len); ++} ++ ++ +diff --git a/strparse.h b/strparse.h +index 0c64b07..046b1dd 100755 +--- a/strparse.h ++++ b/strparse.h +@@ -1,18 +1,18 @@ +-// strparse.h -- header for String_parse class +- +-class String_parse { +-public: +- int pos; +- std::string *str; +- void init(std::string *s) { +- str = s; +- pos = 0; +- } +- void skip_space(); +- char peek(); +- void get_nonspace_quoted(std::string &field); +- // get the remaining characters, skipping initial spaces and final return +- void get_remainder(std::string &field); +-}; +- +-void string_escape(std::string &result, const char *s, const char *quote); ++// strparse.h -- header for String_parse class ++ ++class String_parse { ++public: ++ int pos; ++ std::string *str; ++ void init(std::string *s) { ++ str = s; ++ pos = 0; ++ } ++ void skip_space(); ++ char peek(); ++ void get_nonspace_quoted(std::string &field); ++ // get the remaining characters, skipping initial spaces and final return ++ void get_remainder(std::string &field); ++}; ++ ++void string_escape(std::string &result, const char *s, const char *quote); +diff --git a/todo.txt b/todo.txt +index c55db11..d94c328 100755 +--- a/todo.txt ++++ b/todo.txt +@@ -1,4 +1,4 @@ +-TODO: +- +-continue translating serpent code (in comments in allegro_test.cpp) +-to C++ and running tests. ++TODO: ++ ++continue translating serpent code (in comments in allegro_test.cpp) ++to C++ and running tests. +diff --git a/trace.cpp b/trace.cpp +index 38c050f..5070753 100755 +--- a/trace.cpp ++++ b/trace.cpp +@@ -1,25 +1,25 @@ +-// trace.cpp -- debugging print function +-// +-// (I think this was created to provide a generic print function +-// for use in non-command-line Windows applications where printf +-// does not work. Currently, it is not used, but kept around for +-// possible debugging needs. -RBD) +- +-#include "stdarg.h" +-#include "stdio.h" +-#include "crtdbg.h" +- +- +-void trace(char *format, ...) +-{ +- char msg[256]; +- va_list args; +- va_start(args, format); +- _vsnprintf_s(msg, 256, _TRUNCATE, format, args); +- va_end(args); +-#ifdef _DEBUG +- _CrtDbgReport(_CRT_WARN, NULL, NULL, NULL, msg); +-#else +- printf(msg); +-#endif +-} ++// trace.cpp -- debugging print function ++// ++// (I think this was created to provide a generic print function ++// for use in non-command-line Windows applications where printf ++// does not work. Currently, it is not used, but kept around for ++// possible debugging needs. -RBD) ++ ++#include "stdarg.h" ++#include "stdio.h" ++#include "crtdbg.h" ++ ++ ++void trace(char *format, ...) ++{ ++ char msg[256]; ++ va_list args; ++ va_start(args, format); ++ _vsnprintf_s(msg, 256, _TRUNCATE, format, args); ++ va_end(args); ++#ifdef _DEBUG ++ _CrtDbgReport(_CRT_WARN, NULL, NULL, NULL, msg); ++#else ++ printf(msg); ++#endif ++} +diff --git a/trace.h b/trace.h +index 5726f0c..52a23a6 100755 +--- a/trace.h ++++ b/trace.h +@@ -1,2 +1,2 @@ +-void trace(char *format, ...); +- ++void trace(char *format, ...); ++ +-- +2.43.0 + diff --git a/runtime-multimedia/portsmf/autobuild/patches/0002-Use-libtool-for-shared-library-creation.patch b/runtime-multimedia/portsmf/autobuild/patches/0002-Use-libtool-for-shared-library-creation.patch new file mode 100644 index 00000000000..286b8f17949 --- /dev/null +++ b/runtime-multimedia/portsmf/autobuild/patches/0002-Use-libtool-for-shared-library-creation.patch @@ -0,0 +1,46 @@ +From 8367da95feb5aef03887c3dc3a029be8b19872fb Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 29 Jan 2024 03:09:18 -0800 +Subject: [PATCH 2/4] Use libtool for shared library creation + +Co-Authored-By: Benjamin Drung +--- + Makefile.am | 4 ++-- + configure.ac | 4 +++- + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 25c81ea..139f332 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,10 +6,10 @@ + ACLOCAL_AMFLAGS = -I autotools/m4 + + # define the output library (link with -lportSMF) +-lib_LIBRARIES = libportSMF.a ++lib_LTLIBRARIES = libportSMF.la + + # define the source files to use +-libportSMF_a_SOURCES = allegro.cpp \ ++libportSMF_la_SOURCES = allegro.cpp \ + allegrosmfwr.cpp \ + allegrord.cpp \ + allegrowr.cpp \ +diff --git a/configure.ac b/configure.ac +index ea873c3..f26b74e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -49,7 +49,9 @@ CXXFLAGS="$cxxflags_save" + dnl we will need an "install" program to be available + AC_PROG_INSTALL + dnl and ranlib for static libraries +-AC_PROG_RANLIB ++# AC_PROG_RANLIB ++ ++AC_PROG_LIBTOOL + + dnl Make the install prefix available to the program so that the pkg-config file + dnl can be created correctly +-- +2.43.0 + diff --git a/runtime-multimedia/portsmf/autobuild/patches/0003-Fix-and-install-pkg-config-file.patch b/runtime-multimedia/portsmf/autobuild/patches/0003-Fix-and-install-pkg-config-file.patch new file mode 100644 index 00000000000..0f0e4db753f --- /dev/null +++ b/runtime-multimedia/portsmf/autobuild/patches/0003-Fix-and-install-pkg-config-file.patch @@ -0,0 +1,41 @@ +From 76131c07b0ceec08b4c9bd1f0bd85fbfe0ac93d8 Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 29 Jan 2024 03:12:11 -0800 +Subject: [PATCH 3/4] Fix and install pkg-config file + +Co-Authored-By: Benjamin Drung +--- + Makefile.am | 3 +++ + portSMF.pc.in | 4 +++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 139f332..c49b571 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -44,3 +44,6 @@ AUX_DIST = $(ac_aux_dir)/config.guess \ + # Documentation files that should be both distributed and installed in the doc + # directory, + dist_doc_DATA = README.txt license.txt ++ ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = portSMF.pc +diff --git a/portSMF.pc.in b/portSMF.pc.in +index cf5c8e0..d415fec 100644 +--- a/portSMF.pc.in ++++ b/portSMF.pc.in +@@ -1,3 +1,5 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ + libdir=@libdir@ + includedir=@includedir@ + +@@ -7,4 +9,4 @@ Requires: + Version: 0.1 + + Libs: -L${libdir} -lportSMF @LIBS@ +-Cflags: -I${includedir} @CXXFLAGS@ ++Cflags: -I${includedir} +-- +2.43.0 + diff --git a/runtime-multimedia/portsmf/autobuild/patches/0004-Install-headers-to-subdirectory.patch b/runtime-multimedia/portsmf/autobuild/patches/0004-Install-headers-to-subdirectory.patch new file mode 100644 index 00000000000..2370710b1ee --- /dev/null +++ b/runtime-multimedia/portsmf/autobuild/patches/0004-Install-headers-to-subdirectory.patch @@ -0,0 +1,38 @@ +From 87cda0a4e3966a25d4ff61d95f7d65d08a3e4843 Mon Sep 17 00:00:00 2001 +From: Jiangjin Wang +Date: Mon, 29 Jan 2024 03:14:30 -0800 +Subject: [PATCH 4/4] Install headers to subdirectory + +Co-Authored-By: Benjamin Drung +--- + Makefile.am | 3 ++- + portSMF.pc.in | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index c49b571..ab8e46a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -24,7 +24,8 @@ libportSMF_la_SOURCES = allegro.cpp \ + # but that would mean re-organising them here (a subdirectory called portSMF to + # keep headers in, add -I$(srcdir)/portSMF/ to AM_CXXFLAGS, change the paths + # to the headers here and change the name of the variable to nobase_include_... +-include_HEADERS = allegro.h \ ++library_includedir = $(includedir)/portSMF ++library_include_HEADERS = allegro.h \ + mfmidi.h \ + strparse.h \ + trace.h +diff --git a/portSMF.pc.in b/portSMF.pc.in +index d415fec..40207eb 100644 +--- a/portSMF.pc.in ++++ b/portSMF.pc.in +@@ -9,4 +9,4 @@ Requires: + Version: 0.1 + + Libs: -L${libdir} -lportSMF @LIBS@ +-Cflags: -I${includedir} ++Cflags: -I${includedir}/portSMF +-- +2.43.0 + diff --git a/runtime-multimedia/portsmf/spec b/runtime-multimedia/portsmf/spec new file mode 100644 index 00000000000..e1043a7b80b --- /dev/null +++ b/runtime-multimedia/portsmf/spec @@ -0,0 +1,4 @@ +VER=0+svn20101009 +SRCS="svn::commit=220::https://svn.code.sf.net/p/portmedia/code/portsmf/trunk" +CHKSUMS="SKIP" +CHKUPDATE="anitya::id=371134" diff --git a/runtime-scientific/vigra/autobuild/defines b/runtime-scientific/vigra/autobuild/defines index b95b2db5fa2..f56bcd7be7a 100644 --- a/runtime-scientific/vigra/autobuild/defines +++ b/runtime-scientific/vigra/autobuild/defines @@ -4,9 +4,14 @@ PKGDEP="libpng libtiff openexr bash hdf5 fftw numpy" BUILDDEP="boost cmake doxygen sphinx" PKGDES="A computer vision library" +ABTYPE=cmakeninja CMAKE_AFTER="-DPYTHON_EXECUTABLE=/usr/bin/python3 \ -DWITH_OPENEXR=true \ -DWITH_VIGRANUMPY=1 \ -DDOCINSTALL=share/doc" + +# FIXME: OOM on M1 buildbots +NOPARALLEL_ARM64=1 + AB_FLAGS_O3=1 PKGBREAK="enblend-enfuse<=4.1.5-3 libreoffice<=5.3.2.2" diff --git a/runtime-scientific/vigra/spec b/runtime-scientific/vigra/spec index 42b2cc6888c..e2ff385e4e4 100644 --- a/runtime-scientific/vigra/spec +++ b/runtime-scientific/vigra/spec @@ -1,5 +1,5 @@ VER=1.11.1 -REL=13 +REL=14 SRCS="tbl::https://github.com/ukoethe/vigra/archive/Version-${VER//./-}.tar.gz" CHKSUMS="sha256::b2718250d28baf1932fcbe8e30f7e4d146e751ad0e726e375a72a0cdb4e3250e" SUBDIR="vigra-Version-${VER//./-}" diff --git a/runtime-web/libfilezilla/autobuild/defines b/runtime-web/libfilezilla/autobuild/defines index 62a85ddfd5b..dc9428fadac 100644 --- a/runtime-web/libfilezilla/autobuild/defines +++ b/runtime-web/libfilezilla/autobuild/defines @@ -4,10 +4,10 @@ PKGDEP="gcc-runtime" BUILDDEP="cppunit doxygen llvm" PKGDES="The FileZilla runtime libraries" +ABTYPE=autotools AUTOTOOLS_AFTER="--enable-doxygen-man" -USECLANG=1 -PKGBREAK="filezilla<=3.16.1" +PKGBREAK="filezilla<=3.50.0" PKGREP="filezilla<=3.19.0" PKGEPOCH=1 diff --git a/runtime-web/libfilezilla/spec b/runtime-web/libfilezilla/spec index 2df341c5348..04000e3d514 100644 --- a/runtime-web/libfilezilla/spec +++ b/runtime-web/libfilezilla/spec @@ -1,5 +1,4 @@ -VER=0.24.1 -REL=1 -SRCS="tbl::https://download.filezilla-project.org/libfilezilla/libfilezilla-$VER.tar.bz2" -CHKSUMS="sha256::fdd5b4ee1916af7b1d402e7dd467f05df7624bb65fb95a0875a03712ecc2d6fd" +VER=0.45.0 +SRCS="tbl::https://download.filezilla-project.org/libfilezilla/libfilezilla-$VER.tar.xz" +CHKSUMS="sha256::3c1454bc1586d17776f62c7505d43a06d3abd2e2e35642cca477fa22f27d982f" CHKUPDATE="anitya::id=15391"