{ "info": { "author": "Jonathan Hartley", "author_email": "tartley@tartley.com", "bugtrack_url": null, "classifiers": [], "description": "svgbatch\n--------\n\nThe latest version of this documentation is online at `http://pypi.python.org/pypi/svgbatch`__\n\n__ http://pypi.python.org/pypi/svgbatch\n\nSvgBatch is a pure Python package to load `SVG`__ vector graphic files, and\nconvert them into `pyglet`__ Batch objects, for OpenGL rendering.\n\n__ http://www.w3.org/TR/SVG11\n__ http://www.pyglet.org\n\nThe polygons from the SVG file are tessellated using `GLU functions`__, and\nused to create a `pyglet Batch object`__ of indexed vertex arrays of\nGL_TRIANGLES. The Batch will aggregate all paths from an SVG file into a single\nOpenGL primitive for rendering. Each path is also exposed in its untessellated\nform, so the application could use them for things other than rendering, for\nexample collision detection.\n\n__ http://www.glprogramming.com/red/chapter11.html\n__ http://www.pyglet.org/doc/api/pyglet.graphics.Batch-class.html\n\nCurrently only a subset of SVG is handled - paths forming closed polygons,\nfilled with solid color. Each path may comprise multiple loops (disjoint areas \nor holes), but must be made up from straight line edges. Arcs, beziers,\ngradient fills and other SVG entities such as rectangles or text are not\ncurrently handled.\n\nDependencies\n------------\n\nOnly tested on Windows, but should be cross-platform. Only tested on Python 2.5 and 2.6. Requires the fabulous `pyglet`__.\n\n__ http://www.pyglet.org \n\n\nStatus\n------\n\nNominally complete, and works with some simple SVG files that were generated by\n`Inkscape`__, but has not yet been used in earnest.\n\n__ http://www.inkscape.org\n\n\nDownload\n--------\n\nYou can install *svgbatch* to your *site-packages* directory, making it\navailable for import by any Python programs on your computer. The automated way\nto do this is to install setuptools, then use the command-line::\n\n easy_install svgbatch\n\nThe manual way to do the same thing is to download the source distribution\nfrom the bottom of `the project PyPI page`__ and install manually, using the command-line::\n\n python setup.py install\n\n__ http://pypi.python.org/pypi/svgbatch\n\nAlternatively, the *svgbatch* package from the above source distribution can\nbe copied directly into your own project, which might be useful if you intend\nto modify it.\n\nFinally, to get the very latest (possibly broken) version, you might want to\ncheck it out from `Subversion on Google Code`__.\n\n__ http://code.google.com/p/svgload/source/checkout \n\n\nUsage\n-----\n\nVery straightforward::\n\n svg = SvgBatch('data/logo.svg')\n batch = svg.create_batch()\n\n``create_batch()`` returns a pyglet Batch object, which can be rendered in\na pyglet program using ``batch.draw()`` (see `demo.py`__.)\n\n__ http://code.google.com/p/svgload/source/browse/trunk/svgbatch/demo.py\n\nYour application can access the untessellated geometry of each path, indexed\nby id, using::\n\n path = svg.path_by_id['pathid']\n\nwhere ``pathid`` is the string ID of the path tag in the SVG file. A path's ID\ncan be set from within Inkscape by editing its object properties. The returned\nPath object has the following attributes:\n\n * ``id``: string, copied from the svg tag's id attribute\n * ``color``: triple of unsigned bytes, (r, g, b)\n * ``loops``: a list of loops. A loop is a list of vertices representing a\n closed polygonal boundary (which may be convex.) A vertex is a pair of\n floats or ints.\n * ``bounds``: an object which provides the path's axis-aligned extents, as\n ``xmin``, ``xmax``, ``ymin`` and ``ymax``.\n * ``offset(x, y)``: adds the given offset to all vertices in the path\n\n\nKnown Issues\n------------\n\n * It generally chokes on real-world SVG files other than the small ones I'm\n saving from Inkscape, due to unhandled SVG entities such as rectangles or\n text. Avoid this by just using closed, straight-edged paths filled with\n plain color.\n * I've only tested it on Windows. My lappy graphics chipset doesn't work for\n OpenGL stuff on Ubuntu since Jaunty. Thanks ATI.\n\n\nPlans\n-----\n\nSee TODO.txt__\n\n__ http://code.google.com/p/svgload/source/browse/trunk/docs/TODO.txt \n\n\nAcknowledgements\n----------------\n\nMany thanks to Martin O'Leary of supereffective.org__, whose Squirtle__ module\nformed a major inspiration for this project, and in particular for his\nsublime tesselation code, which I have copied wholesale under the terms of the\nBSD.\n\n__ http://www.supereffective.org\n__ http://www.supereffective.org/pages/Squirtle-SVG-Library \n\n\nThis project's tests use a slightly-modified embedded copy of `voidspace's\nsuperbly useful mock library`__.\n\n__ http://www.voidspace.org.uk/python/mock", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/svgload/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "svgbatch", "package_url": "https://pypi.org/project/svgbatch/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/svgbatch/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.google.com/p/svgload/" }, "release_url": "https://pypi.org/project/svgbatch/0.1.9/", "requires_dist": null, "requires_python": null, "summary": "Loads SVG files into pyglet Batch objects for OpenGL rendering.", "version": "0.1.9" }, "last_serial": 771711, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "df27af29108bf53737df78729fac7cf2", "sha256": "5a127f0b9a937122c6bc44bb87fcd83398aeb45b2f8bc394f0fc32290f8fc8b3" }, "downloads": -1, "filename": "svgbatch-0.1.1.zip", "has_sig": false, "md5_digest": "df27af29108bf53737df78729fac7cf2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10319, "upload_time": "2009-08-04T23:32:17", "url": "https://files.pythonhosted.org/packages/82/92/d2a139291f6426c038ba043f16d819e92ab232e1a04474fe4437bab65ef5/svgbatch-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "89cdff28eaf4823c00a9a91719bd90a2", "sha256": "11b618f19220e914c48b1a33e94522206572b3fc2dc3fd4cfe7c846ae11750a5" }, "downloads": -1, "filename": "svgbatch-0.1.2.zip", "has_sig": false, "md5_digest": "89cdff28eaf4823c00a9a91719bd90a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10487, "upload_time": "2009-08-05T00:09:35", "url": "https://files.pythonhosted.org/packages/a1/63/6157c5ba6b6152912bff79eeeb169c604707160287219a9814e99735f3c9/svgbatch-0.1.2.zip" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "37c57244ec042a0afeb733317c8e3697", "sha256": "430cba53491e38d8f783c3721331ca1a19be0d953de1a5b49d158aee1a0b7a87" }, "downloads": -1, "filename": "svgbatch-0.1.3.tar.gz", "has_sig": false, "md5_digest": "37c57244ec042a0afeb733317c8e3697", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8065, "upload_time": "2009-08-05T10:37:58", "url": "https://files.pythonhosted.org/packages/49/27/c6f2d8a1dfc2b3db98240e1eec3893fb55fd176a5f5226a0307e0b05e096/svgbatch-0.1.3.tar.gz" }, { "comment_text": "", "digests": { "md5": "a5f604aa9c8b3b83d3222e1aa9f6fcdf", "sha256": "8f0be3130d1a8dc9bedc29c0c1fc5f1eed23c2ba18d8d1518f8e6b095643564b" }, "downloads": -1, "filename": "svgbatch-0.1.3.zip", "has_sig": false, "md5_digest": "a5f604aa9c8b3b83d3222e1aa9f6fcdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10788, "upload_time": "2009-08-05T00:24:02", "url": "https://files.pythonhosted.org/packages/d1/45/e7288c870ffdfbc9c5ad9bfe8c80e21431741e414e649b78edec12991ec3/svgbatch-0.1.3.zip" } ], "0.1.4": [], "0.1.5": [ { "comment_text": "", "digests": { "md5": "125ab2e8dcd3ea149f96050c9a33a284", "sha256": "57ec40a29c5beec04ed8865246aa0298dc4c887af038ede0a419f9d766dd71d3" }, "downloads": -1, "filename": "svgbatch-0.1.5.tar.gz", "has_sig": false, "md5_digest": "125ab2e8dcd3ea149f96050c9a33a284", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14899, "upload_time": "2009-08-07T10:53:32", "url": "https://files.pythonhosted.org/packages/7d/d7/e54cb3517996089cafb6e0b33a2b4dcaeb160ed85c7f9856995a90ff9000/svgbatch-0.1.5.tar.gz" }, { "comment_text": "", "digests": { "md5": "eae651ab117d9b7470009dae46f1ca6f", "sha256": "c9c51c2fedd5e93eca9635a934a3e781413baf488097a6c99b79a00859450d0c" }, "downloads": -1, "filename": "svgbatch-0.1.5.zip", "has_sig": false, "md5_digest": "eae651ab117d9b7470009dae46f1ca6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21139, "upload_time": "2009-08-07T10:41:00", "url": "https://files.pythonhosted.org/packages/7b/b3/084c374cbb9299543a1fee23d6df20c4661d4ba7927a5babc32fee276030/svgbatch-0.1.5.zip" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "9228ef473efde500eb7c09a07a728934", "sha256": "76344808195de6f59bcdf9b5f5b01674c5d734fbda98cbe48dd95752206f47cc" }, "downloads": -1, "filename": "svgbatch-0.1.6.zip", "has_sig": false, "md5_digest": "9228ef473efde500eb7c09a07a728934", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43444, "upload_time": "2009-08-07T20:18:04", "url": "https://files.pythonhosted.org/packages/41/29/8fb63e491e242c41ef65253853df7ed619ffe044baa361c48a212fdea979/svgbatch-0.1.6.zip" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "19a8ee94bf2e35808dced92495670365", "sha256": "0c33b788e4159be610176cd9cd59e95ab7c4db6d4ed9843acfbf9fd4075181f5" }, "downloads": -1, "filename": "svgbatch-0.1.7.tar.gz", "has_sig": false, "md5_digest": "19a8ee94bf2e35808dced92495670365", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19735, "upload_time": "2009-08-07T20:26:44", "url": "https://files.pythonhosted.org/packages/8d/15/b40b83aa960f62f6d1827f70812b74485bab8b69356ec3227ce40649a973/svgbatch-0.1.7.tar.gz" }, { "comment_text": "", "digests": { "md5": "3853ce8986e7926f28a52ecabaf5134a", "sha256": "07a4a9c5979bdd2708ccaad3fd85023e37f0740e0e3c83a523b0771c39cb3439" }, "downloads": -1, "filename": "svgbatch-0.1.7.zip", "has_sig": false, "md5_digest": "3853ce8986e7926f28a52ecabaf5134a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32472, "upload_time": "2009-08-07T20:26:44", "url": "https://files.pythonhosted.org/packages/0b/3b/a6b196777d37010fada75ac946afb5592bff0cccf26257b5ab7347cfab97/svgbatch-0.1.7.zip" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "2f813f36c4edca7bc0fddeec8221879b", "sha256": "01d5217c4d9c0d3a65b87f0f6247796df526b2a82feba724abe207fb9de98c27" }, "downloads": -1, "filename": "svgbatch-0.1.8.tar.gz", "has_sig": false, "md5_digest": "2f813f36c4edca7bc0fddeec8221879b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19719, "upload_time": "2009-08-08T12:15:01", "url": "https://files.pythonhosted.org/packages/4d/ff/8a89d7134f4845e7b6327c85eefbf186091c2463daa8f7e4457af7024891/svgbatch-0.1.8.tar.gz" }, { "comment_text": "", "digests": { "md5": "0922fcf63776e2c9991d597e6be00791", "sha256": "f2b33748d46f7ca0233363714694fb84f8c872ca60214acd3fb2cb7beb3caf43" }, "downloads": -1, "filename": "svgbatch-0.1.8.zip", "has_sig": false, "md5_digest": "0922fcf63776e2c9991d597e6be00791", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32484, "upload_time": "2009-08-08T12:15:00", "url": "https://files.pythonhosted.org/packages/48/f3/d3bce4c92446c3c5ab64420618616cba5b8d5e8649be86409260a3be5d7f/svgbatch-0.1.8.zip" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "a1fabf461df3e26f105abbf54b937414", "sha256": "20eef20a611947dd184ddf38ee11999810bc272eecbbf04e5e9d05021199ae15" }, "downloads": -1, "filename": "svgbatch-0.1.9.tar.gz", "has_sig": false, "md5_digest": "a1fabf461df3e26f105abbf54b937414", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19944, "upload_time": "2009-08-08T12:15:30", "url": "https://files.pythonhosted.org/packages/01/06/74a1b2b7efdec1bc0dc91729aac7045464c11f69e9e31af40e4f8f6e8ad9/svgbatch-0.1.9.tar.gz" }, { "comment_text": "", "digests": { "md5": "b2cd80c0167c5b86e5a43b6402aac091", "sha256": "e1b2df99b4ba1986e9ab04de5088506a804a21fd525d1cd07c24e47903929d3e" }, "downloads": -1, "filename": "svgbatch-0.1.9.zip", "has_sig": false, "md5_digest": "b2cd80c0167c5b86e5a43b6402aac091", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34776, "upload_time": "2009-08-08T12:15:30", "url": "https://files.pythonhosted.org/packages/f9/45/01c3f8d015eca7f4ef41bd3517b038807104cfe8dc2b35fc0cf7e0cac61c/svgbatch-0.1.9.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a1fabf461df3e26f105abbf54b937414", "sha256": "20eef20a611947dd184ddf38ee11999810bc272eecbbf04e5e9d05021199ae15" }, "downloads": -1, "filename": "svgbatch-0.1.9.tar.gz", "has_sig": false, "md5_digest": "a1fabf461df3e26f105abbf54b937414", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19944, "upload_time": "2009-08-08T12:15:30", "url": "https://files.pythonhosted.org/packages/01/06/74a1b2b7efdec1bc0dc91729aac7045464c11f69e9e31af40e4f8f6e8ad9/svgbatch-0.1.9.tar.gz" }, { "comment_text": "", "digests": { "md5": "b2cd80c0167c5b86e5a43b6402aac091", "sha256": "e1b2df99b4ba1986e9ab04de5088506a804a21fd525d1cd07c24e47903929d3e" }, "downloads": -1, "filename": "svgbatch-0.1.9.zip", "has_sig": false, "md5_digest": "b2cd80c0167c5b86e5a43b6402aac091", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34776, "upload_time": "2009-08-08T12:15:30", "url": "https://files.pythonhosted.org/packages/f9/45/01c3f8d015eca7f4ef41bd3517b038807104cfe8dc2b35fc0cf7e0cac61c/svgbatch-0.1.9.zip" } ] }