{ "info": { "author": "Wojciech Mu\u0142a", "author_email": "wojciech_mula@poczta.onet.pl", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Topic :: Multimedia :: Graphics :: Capture :: Screen Capture", "Topic :: Multimedia :: Graphics :: Graphics Conversion", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Tkinter canvas to SVG exporter\n========================================================================\n\nThis module provides function ``convert`` that convert all or selected\nitems placed on given canvas object.\n\nSupported items:\n\n* lines\n* lines with arrows\n* polygons\n* smoothed lines and polygons\n* ovals (i.e. circle & ellipse)\n* arcs (all kind, i.e. ARC, CHORD, PIESLICE)\n* rectangles\n* text (**unwrapped** only i.e. attribute ``width = 0``)\n\nUnsupported items:\n\n* images\n* bitmaps\n* windows\n\nStipples are not applied.\n\n\nPublic functions\n------------------------------------------------------------------------\n\n``convert(document, canvas, items=None, tounicode=None)``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n* ``document`` --- SVG document, object that support DOM, i.e. provides\n ``createElement`` method etc. (function ``SVGdocument`` can be used\n to get such object)\n* ``canvas`` --- Tkinter.Canvas object\n* ``items`` --- list of objects to convert; if ``None`` then all items\n are converted\n* ``tounicode`` --- user function that should return proper unicode\n string if Tkinter app use other then ASCII encoding. By default\n ``tounicode = lambda text: unicode(text).encode('utf-8')``.\n Thanks to **Jan B\u00f6cker** who provided solution.\n\n\n``SVGdocument``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTakes no arguments, returns SVG document; class provided in standard\n``xml.dom.minidom`` module is used.\n\n\n``saveall(filename, canvas, items=None, margin=10, tounicode=None)``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nHelper function: saves whole canvas or selected items in SVG file,\nsets proper dimensions, and viewport; additional ``margin`` can\nbe set.\n\n\n``warnings(mode)``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nModule might emit warnings. By default it use custom function which\nprints message on the standard error. You can change this by calling\nmethod ``canvasvg.warnings(mode)`` with three possible values:\n\n* ``canvasvg.PYTHON`` --- use ``warn`` from the standard module\n ``warnings``;\n* ``canvasvg.MODULE`` --- use the custom function;\n* ``canvasvg.NONE`` --- do not print any message.\n\n\n``configure(*flags)``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nModule might use either ```` or ```` tag for segment\nrepresentation. By default it uses ````. The behaviour could be changed\nglobally by calling ``canvasvg.configure(*flags)`` with one of consequent\nvalues:\n\n* ``canvasvg.SEGMENT_TO_LINE`` --- use ```` tag;\n* ``canvasvg.SEGMENT_TO_PATH`` --- use ```` tag.\n\n\nChangelog\n------------------------------------------------------------------------\n\nBelow are major changes made before moving on Github__.\n\n* 2013-07-23 --- support for \"raw\" smoothed lines (contributed by Marc Culler, author of plink__)\n* 2011-02-20 --- python3 compatibility\n* 2011-01-25 --- update ``saveall``: use list of items to export\n* 2008-11-08 --- added ``tounicode``, optional argument\n* 2006-12-01 --- initial release\n\n__ https://github.com/WojciechMula/canvas2svg\n__ http://www.math.uic.edu/t3m/plink/doc/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/WojciechMula/canvas2svg", "keywords": "tkinter,tk,canvas,svg,screenshot", "license": "BSD (3 clauses)", "maintainer": null, "maintainer_email": null, "name": "canvasvg", "package_url": "https://pypi.org/project/canvasvg/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/canvasvg/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/WojciechMula/canvas2svg" }, "release_url": "https://pypi.org/project/canvasvg/1.0.5/", "requires_dist": null, "requires_python": null, "summary": "Save Tkinter Canvas in SVG file", "version": "1.0.5" }, "last_serial": 2646454, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8fe44c797a62f26776d96c981c0e35f3", "sha256": "febff94241fed86ff1e6ba61bd88edaa2afa067ede83a17d0a45cee2e519e754" }, "downloads": -1, "filename": "canvasvg-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8fe44c797a62f26776d96c981c0e35f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10091, "upload_time": "2014-11-23T09:57:08", "url": "https://files.pythonhosted.org/packages/ac/c6/d14dc9ce199895f837ba0eeda6428417c2e42021f01266d1a1d42d535fd7/canvasvg-1.0.0.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "12190ecf3d2b789889d340443d2489b5", "sha256": "275b7f48dc72f61ac98d14a32ad191e4af7b5ea6105d4559ef3cf5d7e47d9a99" }, "downloads": -1, "filename": "canvasvg-1.0.3.tar.gz", "has_sig": false, "md5_digest": "12190ecf3d2b789889d340443d2489b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10958, "upload_time": "2017-01-15T19:00:14", "url": "https://files.pythonhosted.org/packages/7d/0c/7d9ae025e224528d4fdc659c9ddb70be07b7172daf9ef0d6cd0bfb51ec32/canvasvg-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "a6102a562d1366376eb623abe9459f64", "sha256": "02b265050a8d2084827c9d8590285bef5899a391759ab8db8bb81b8983dfb076" }, "downloads": -1, "filename": "canvasvg-1.0.4.tar.gz", "has_sig": false, "md5_digest": "a6102a562d1366376eb623abe9459f64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11590, "upload_time": "2017-02-10T17:42:38", "url": "https://files.pythonhosted.org/packages/5e/49/d11567da9f1c398a0b4880cbfad18380e0c99a16d0fa597807945876a2ec/canvasvg-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "ef6b286343e63bbf61786305ecec3f03", "sha256": "d98d5ff84a511a3bf777b5899cbc8fb780a2bfbbafb54fbb18b49ac5cf2732a8" }, "downloads": -1, "filename": "canvasvg-1.0.5.tar.gz", "has_sig": false, "md5_digest": "ef6b286343e63bbf61786305ecec3f03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11609, "upload_time": "2017-02-16T10:01:40", "url": "https://files.pythonhosted.org/packages/73/9d/f5ab2a9c0784d9de7bc1c35f81813b50c557cf9f7b39dd27747abb6388d8/canvasvg-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ef6b286343e63bbf61786305ecec3f03", "sha256": "d98d5ff84a511a3bf777b5899cbc8fb780a2bfbbafb54fbb18b49ac5cf2732a8" }, "downloads": -1, "filename": "canvasvg-1.0.5.tar.gz", "has_sig": false, "md5_digest": "ef6b286343e63bbf61786305ecec3f03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11609, "upload_time": "2017-02-16T10:01:40", "url": "https://files.pythonhosted.org/packages/73/9d/f5ab2a9c0784d9de7bc1c35f81813b50c557cf9f7b39dd27747abb6388d8/canvasvg-1.0.5.tar.gz" } ] }