{ "info": { "author": "Al Sweigart", "author_email": "al@inventwithpython.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: MacOS X", "Environment :: Win32 (MS Windows)", "Environment :: X11 Applications", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "===========\nPyBresenham\n===========\n\nA Python module of generators that generate x, y coordinates for various vector shapes such as lines, rectangles, etc. Named after Bresenham of line-algorithm fame.\n\nFor example:\n\n >>> import pybresenham\n >>> pybresenham.line(0, 0, 3, 6)\n \n >>> list(pybresenham.line(0, 0, 3, 6))\n [(0, 0), (0, 1), (1, 2), (1, 3), (2, 4), (2, 5), (3, 6)]\n\nPyBresenham is currently under development, and is seeking contributors!\n\n\nInstallation\n============\n\n ``pip install pybresenham``\n\nQuickstart Guide\n================\n\nGet the points of a line from (0, 0) to (5, 10):\n\n >>> import pybresenham\n >>> for x, y in pybresenham.line(0, 0, 5, 10):\n ... print('(%s, %s)' % (x, y))\n ...\n (0, 0)\n (0, 1)\n (1, 2)\n (1, 3)\n (2, 4)\n (2, 5)\n (3, 6)\n (3, 7)\n (4, 8)\n (4, 9)\n (5, 10)\n >>> list(pybresenham.line(0, 0, 5, 10))\n [(0, 0), (0, 1), (1, 2), (1, 3), (2, 4), (2, 5), (3, 6), (3, 7), (4, 8), (4, 9), (5, 10)]\n\nGet the points of a multiline from (0, 0) to (2, 0) to (2, 2):\n\n >>> import pybresenham\n >>> list(pybresenham.lines([(0, 0), (2, 0), (2, 2)]))\n [(0, 0), (1, 0), (2, 0), (2, 1), (2, 2)]\n\nGet the points of a circle, centered on (0, 0), with radius 3:\n\n >>> list(pybresenham.circle(0, 0, 3))\n [(0, -3), (3, 0), (0, 3), (1, -3), (3, -1), (3, 1), (-1, 3), (-3, -1), (-3, 1), (-1, -3), (1, 3), (2, -2), (2, 2), (-2, 2), (-2, -2)]\n\nGet a quick drawing of the above circle:\n\n >>> import pybresenham\n >>> pybresenham._drawPoints(pybresenham.circle(0, 0, 3), bg=' ')\n OOO\n O O\n O O\n O O\n O O\n O O\n OOO\n\nGet a quick drawing of a square and rectangle:\n\n >>> import pybresenham\n >>> list(pybresenham.square(0, 0, 4))\n [(0, 0), (1, 0), (2, 0), (3, 0), (3, 1), (3, 2), (3, 3), (2, 3), (1, 3), (0, 3), (0, 2), (0, 1)]\n >>> pybresenham._drawPoints(pybresenham.square(0, 0, 4), bg=' ')\n OOOO\n O O\n O O\n OOOO\n >>> pybresenham._drawPoints(pybresenham.rectangle(0, 0, 15, 4), bg=' ')\n OOOOOOOOOOOOOOO\n O O\n O O\n OOOOOOOOOOOOOOO\n\n >>> drawPoints(polygon(10, 10, 8, 5), bg=' ')\n O\n O O\n O OO\n O O\n OO O\n O O\n O O\n O O\n O O\n O O\n O O\n O O\n O O\n O O\n OOOOOOOOO\n\n >>> drawPoints(polygon(10, 10, 8, 5, rotationDegrees=20), bg=' ')\n OO\n O OOO\n O OO\n O OO\n O O\n O O\n O O\n O O\n O O\n O O\n O O\n O OO\n O OO\n O OOO\n OO\n\n\nRoad Map\n========\n\nThe following functions aren't yet implemented:\n\n* ``ellipse()``\n* ``ellipseVertices()``\n* ``arc()``\n* ``arcVertices()``\n* ``star()``\n* ``starVertices()``\n* ``hexGrid()``\n* ``hexGridVertices()``\n* ``hexGridInterior()``\n* ``bezier()``\n* ``bezierVertices()``\n* ``roundedBox()``\n* ``roundedBoxVertices()``\n\nThe `thickness`, `filled`, `endcap`, and `viewport` parameters are still unimplemented. (Except for square() and rectangle(), which do implement the `filled` parameter.)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/asweigart/pybresenham", "keywords": "bresenham line circle drawing 2D geometry shapes vector bitmap rotate rotation vector2bitmap", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "PyBresenham", "package_url": "https://pypi.org/project/PyBresenham/", "platform": "", "project_url": "https://pypi.org/project/PyBresenham/", "project_urls": { "Homepage": "https://github.com/asweigart/pybresenham" }, "release_url": "https://pypi.org/project/PyBresenham/0.0.6/", "requires_dist": null, "requires_python": "", "summary": "A Python module of generators that generate x, y coordinates for various vector shapes such as lines, rectangles, etc. Named after Bresenham of line-algorithm fame.", "version": "0.0.6" }, "last_serial": 4216598, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "87f2ddfc00d753c035ecb11639d2f9b8", "sha256": "369380f63fb133aff401569b88535077922ca737b8e82618cb8de9196f571e6a" }, "downloads": -1, "filename": "PyBresenham-0.0.4.tar.gz", "has_sig": false, "md5_digest": "87f2ddfc00d753c035ecb11639d2f9b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8931, "upload_time": "2018-05-03T06:33:38", "url": "https://files.pythonhosted.org/packages/55/f7/b16f4540171e94a7ead28ee6df3080225d3b3ca2f28772f27441ca529d03/PyBresenham-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "c017125ed33d25741959ad471963ab91", "sha256": "a2ddfd4dc87a6c77dddf60b595bdcb0f7f34bd9c5a1d0d5e36d69c7e74cdb3d0" }, "downloads": -1, "filename": "PyBresenham-0.0.5.tar.gz", "has_sig": false, "md5_digest": "c017125ed33d25741959ad471963ab91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19192, "upload_time": "2018-08-28T02:04:53", "url": "https://files.pythonhosted.org/packages/90/60/d910211729e2dbfb70fe6b5045fe23298ad51483cde2863c8c9a00b04bae/PyBresenham-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "aa41b6e214d86a1c5d121821c6ef99d3", "sha256": "24290d8abf6f10593008611c40202707ddb08ea1a08a318beee25c9b5534c3f9" }, "downloads": -1, "filename": "PyBresenham-0.0.6.tar.gz", "has_sig": false, "md5_digest": "aa41b6e214d86a1c5d121821c6ef99d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19417, "upload_time": "2018-08-28T20:58:57", "url": "https://files.pythonhosted.org/packages/3e/ba/3c401f5578a65c8a4b580f5a36b4bac03eb0f488a552509a08e287a2ca30/PyBresenham-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "aa41b6e214d86a1c5d121821c6ef99d3", "sha256": "24290d8abf6f10593008611c40202707ddb08ea1a08a318beee25c9b5534c3f9" }, "downloads": -1, "filename": "PyBresenham-0.0.6.tar.gz", "has_sig": false, "md5_digest": "aa41b6e214d86a1c5d121821c6ef99d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19417, "upload_time": "2018-08-28T20:58:57", "url": "https://files.pythonhosted.org/packages/3e/ba/3c401f5578a65c8a4b580f5a36b4bac03eb0f488a552509a08e287a2ca30/PyBresenham-0.0.6.tar.gz" } ] }