{ "info": { "author": "Al Sweigart", "author_email": "al@inventwithpython.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: MacOS X", "Environment :: Win32 (MS Windows)", "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": "======\nPyRect\n======\nPyRect is a simple module with a Rect class for Pygame-like rectangular areas.\n\nThis module is like a stand-alone version of Pygame's Rect class. It is similar to the Rect module by Simon Wittber, but compatible with both Python 2 and 3.\n\nCurrently under development, though the basic features work.\n\nInstallation\n============\n\n ``pip install rect``\n\nQuickstart Guide\n================\n\nFirst, create a Rect object by providing the XY coordinates of its top-left corner, and then the width and height:\n\n >>> import pyrect\n >>> r = pyrect.Rect(0, 0, 10, 20)\n\nThere are several attributes that are automatically calculated (they have the same names as Pygame's Rect objects):\n\n >>> r.width, r.height, r.size\n (10, 20, (10, 20))\n >>> r. left\n 0\n >>> r.right\n 10\n >>> r.top\n 0\n >>> r.bottom\n 20\n >>> r.center\n (5, 10)\n >>> r.topleft\n (0, 0)\n >>> r.topright\n (10, 0)\n >>> r.midleft\n (0, 10)\n\nChanging these attributes re-calculates the others. The top-left corner is anchored for any growing or shrinking that takes place.\n\n >>> r.topleft\n (0, 0)\n >>> r.left = 100\n >>> r.topleft\n (100, 0)\n >>> r.topright\n (110, 0)\n >>> r.width = 30\n >>> r.topright\n (130, 0)\n\nRect objects are locked to integers, unless you set `enableFloat` to `True`:\n\n >>> r = pyrect.Rect(0, 0, 10, 20)\n >>> r.width = 10.5\n >>> r.width\n 10\n >>> r.enableFloat = True\n >>> r.width = 10.5\n >>> r.width\n 10.5\n >>> r2 = pyrect.Rect(0, 0, 10.5, 20.5, enableFloat=True)\n >>> r2.size\n (10.5, 20.5)\n\nRect Attributes\n===============\n\nRect objects have several attributes that can be read or modified. They are identical to Pygame's Rect objects:\n\n ``x, y``\n\n ``top, left, bottom, right``\n\n ``topleft, bottomleft, topright, bottomright``\n\n ``midtop, midleft, midbottom, midright``\n\n ``center, centerx, centery``\n\n ``size, width, height``\n\n ``w, h``\n\nThere are a couple other attributes as well:\n\n ``box (a tuple (left, top, width, height))``\n\n ``area (read-only)``", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/asweigart/pyrect", "keywords": "pygame rect rectangular rectangle area", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "PyRect", "package_url": "https://pypi.org/project/PyRect/", "platform": "", "project_url": "https://pypi.org/project/PyRect/", "project_urls": { "Homepage": "https://github.com/asweigart/pyrect" }, "release_url": "https://pypi.org/project/PyRect/0.1.4/", "requires_dist": null, "requires_python": "", "summary": "PyRect is a simple module with a Rect class for Pygame-like rectangular areas.", "version": "0.1.4" }, "last_serial": 4657769, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "3eb4cddfdbf2cb633ae3dda71d637c1e", "sha256": "4b66c0cf8aaab222d093ce5b9a6f87aefb12b1ca3341eaef107010c011ac60a3" }, "downloads": -1, "filename": "PyRect-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3eb4cddfdbf2cb633ae3dda71d637c1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7942, "upload_time": "2018-05-23T22:46:19", "url": "https://files.pythonhosted.org/packages/a9/70/8d3c38490b1bce8a65dc264188ec26a692a216254830fe6c839c703ed181/PyRect-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "0beb73fb976469746dd5cb0e71280a44", "sha256": "a1500257d9791c7fc336ba470bd66c93d6bf20f059f497bfc9e1c9cf2fb88da5" }, "downloads": -1, "filename": "PyRect-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0beb73fb976469746dd5cb0e71280a44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13237, "upload_time": "2018-08-28T02:03:03", "url": "https://files.pythonhosted.org/packages/8d/73/1d0f7cb0819ee0bf6b2fde784b8878cc08e810752163d552e352d27a8fa2/PyRect-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "6997d9431640fc3008d74815f832081b", "sha256": "55064fb8c013f26dacd60cba9af70868bae9f3c4175f028e668f5521cf5c3b26" }, "downloads": -1, "filename": "PyRect-0.0.3.tar.gz", "has_sig": false, "md5_digest": "6997d9431640fc3008d74815f832081b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13335, "upload_time": "2018-08-28T20:58:33", "url": "https://files.pythonhosted.org/packages/b4/1c/c6d5fcfab460bc8006ac90e26c7b4f500b491d0a0c8f0dbcdbb5f651c59e/PyRect-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "581c5752c1f7aa28f9606f448a51672a", "sha256": "fe680b692ed1f76effdfd1bb45dcc8041f1acd7ee4e8d969517b08f2ffb25cea" }, "downloads": -1, "filename": "PyRect-0.1.0.tar.gz", "has_sig": false, "md5_digest": "581c5752c1f7aa28f9606f448a51672a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14878, "upload_time": "2018-11-11T18:44:19", "url": "https://files.pythonhosted.org/packages/27/27/4a9f4209cff2df48b46c808eed9c0074026a9d0d2b38967e2a666489c46a/PyRect-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d3779deab5fceef71bc9ceef5d9488e7", "sha256": "c8d5a648e2df104568fd695c4a71e917bf293cc5da79605dbe55e8f6f4f5e651" }, "downloads": -1, "filename": "PyRect-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d3779deab5fceef71bc9ceef5d9488e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14884, "upload_time": "2018-11-11T19:00:46", "url": "https://files.pythonhosted.org/packages/62/b1/30b26123b47f1896f2155ad7a848b905f7f5410df7925a5385f05f771880/PyRect-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2f21861755d3ff89862edfa71ad8cf07", "sha256": "6b2865dfcb519825727536e9aab670a985f0b8be6f63053d99338d1bac1a6ee5" }, "downloads": -1, "filename": "PyRect-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2f21861755d3ff89862edfa71ad8cf07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15800, "upload_time": "2018-11-12T07:24:41", "url": "https://files.pythonhosted.org/packages/68/83/f59ba96b333b765eeaaae6f413a562ebd9fe0ebb25ffa9f7ac0c23869e2c/PyRect-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b0645127940d9f44ce609fc81ffcf280", "sha256": "2bf5fca2e3d580fa1a49825bce1afacfda102c6b4f4b21c7369e3035f9b059e4" }, "downloads": -1, "filename": "PyRect-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b0645127940d9f44ce609fc81ffcf280", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15797, "upload_time": "2018-11-12T07:42:05", "url": "https://files.pythonhosted.org/packages/fe/26/fe4ae740838e0831ca0aaa5ad57059f97ebe2dde2747e34eaf46a3ab44b6/PyRect-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "2de49323047388b0ef89b1e209f135bb", "sha256": "3b2fa7353ce32a11aa6b0a15495968d2a763423c8947ae248b92c037def4e202" }, "downloads": -1, "filename": "PyRect-0.1.4.tar.gz", "has_sig": false, "md5_digest": "2de49323047388b0ef89b1e209f135bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15699, "upload_time": "2019-01-03T21:18:01", "url": "https://files.pythonhosted.org/packages/2f/68/bd7bf96fc44217e769f27912e6c9bb3e9987cba286054af6120448ce8212/PyRect-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2de49323047388b0ef89b1e209f135bb", "sha256": "3b2fa7353ce32a11aa6b0a15495968d2a763423c8947ae248b92c037def4e202" }, "downloads": -1, "filename": "PyRect-0.1.4.tar.gz", "has_sig": false, "md5_digest": "2de49323047388b0ef89b1e209f135bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15699, "upload_time": "2019-01-03T21:18:01", "url": "https://files.pythonhosted.org/packages/2f/68/bd7bf96fc44217e769f27912e6c9bb3e9987cba286054af6120448ce8212/PyRect-0.1.4.tar.gz" } ] }