{ "info": { "author": "Ryan Hope", "author_email": "rmh3093@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Twisted", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python :: 2", "Topic :: Multimedia :: Graphics :: 3D Rendering", "Topic :: Software Development :: Libraries :: pygame" ], "description": "######\nPyGL2D \n######\n\nA 2D Graphics Library for PyGame using PyOpenGL.\n\n************\nREQUIREMENTS\n************\n\n- Python v2.5.2 - http://python.org/\n- PyGame v1.8.1 - http://pygame.org/\n- PyOpenGL v3.0.0b5 - http://pyopengl.sf.net/\n\n*************\nDOCUMENTATION\n*************\n\npygl2d.draw\n===========\n\nPyGL2D's draw module lets you render graphics primitives, including\nlines, polygons, circles, and rects. It supports antialiasing,\nalpha/transparency, and coloring. Remember colors in this module\nare based on an RGB scale of 0-255.\n\ndraw.line(point1, point2, color, width=1, aa=True, alpha=255.0)\n---------------------------------------------------------------\n\nDraw a line from point1 to point2. color is the color of the line on an RGB \nscale, width is the width of the line, aa is whether or not to antialias the \nlines, and alpha is the alpha of the line.\n\ndraw.lines(points, color, width=1, aa=True, closed=0, alpha=255.0)\n------------------------------------------------------------------\n\nDraw a series of lines. Note that the edges of the lines with thick widths are \n\"blocky\".\n \ndraw.polygon(points, color, aa=True, alpha=255.0)\n-------------------------------------------------\n\nDraw a filled polygon. This does not suffer from the \"blocky\" artifact.\n\ndraw.rect(rectstyle, color, width=0, alpha=255.0)\n-------------------------------------------------\n\nDraw a rect. rectstyle should be a tuple or list in the style of \n(x, y, width, height). You can use width to set the width of the rect's edges \n(and take out it's color filling)\n\ndraw.circle(pos, radius, color, alpha=255.0)\n--------------------------------------------\n\nDraw a circle at pos. radius should be the radius of the angle. Note that this \nfunction is VERY slow, as it is just a series of lines drawn at an angle.\n\npygl2d.font\n===========\n\nThe PyGL2D RenderText class allows you to render text with pygame fonts.\nIt also allows you to perform transformations to it, such as rotation,\nscaling, and coloring.\n\nclass RenderText(object)\n------------------------\n\n__init__(text, color, font)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n \ncreate a text to be rendered.\n \nchange_text(text, color='default') <- return None\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nchange the text string. Leave color at 'default' if you want to use the previous color.\n \ndraw(pos)\n^^^^^^^^^\n\ndraw the text at 'pos'. Note that pos is the topleft of the text.\n \nrotate(rotation)\n^^^^^^^^^^^^^^^^\n \nrotate the text to 'rotation', on a scale of 0-360 degrees.\n \nscale(scale)\n^^^^^^^^^^^^\n \nscale the text to 'scale', where 1.0 is the default scale of the text.\n \ncolorize(r, g, b, a)\n^^^^^^^^^^^^^^^^\n \ncolor the text on an RGBA scale. Remember this uses numeral from 0-255.\n \ndelete()\n^^^^^^^^\n \nDelete the text rendering from the memory, including it's opengl textures.\n\nget_width(), get_height()\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nreturn the text's width and height.\n \nget_rect()\n^^^^^^^^^^\n\nreturn a rect the size of the text.\n\npygl2d.geometry\n===============\n\nPyGL2D's geometry module lets you execute some simple geometry functions, such\nas circle collisions and line collisions. It has some other functions, but\nthey're not working correctly right now. Sorry!\n\ngeometry.line_collision(a, b) <- return bool\n--------------------------------------------\n\nDetects a collision between line a, and line b.\n\ngeometry.poly_collision(poly1, poly2) <- return bool\n----------------------------------------------------\n\nDetects a collision between two polys.\n\ngeometry.circle_collision(p1, p2, r1, r2) <- return bool\n--------------------------------------------------------\n\nDetects a collision between 2 circles. p1 and r1 should be the position and \nradius of the first circle, respectively. p2 and r2 should be the position and \nradius of the second circle, respectively.\n\npygl2d.image\n============\n\nThe Image object for PyGL2D allows you to load images and draw them. It also \nlets you perform transformations, such as scaling, rotating, and coloring. \nRemember when drawing the image that (0, 0) is the topleft corner of the screen.\n\nclass Image(object)\n-------------------\n\n__init__(filename) <- return None\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\ninitialise the Image. filename should be a path to the image file. Note that it \nCAN also be a pygame Surface.\n \ndelete() <- return None\n^^^^^^^^^^^^^^^^^^^^^^^\n\ndelete the image from the memory, including it's OpenGL texture.\n\ndraw(pos) <- return None\n^^^^^^^^^^^^^^^^^^^^^^^^\n\ndraws the image to the main screen at pos. Currently does not support drawing \nto other images.\n\nscale(scale) <- return None\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nscale the image where 1.0 is the image's default size.\n\nrotate(rotation) <- return None\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nrotate the image to the angle (rotation) given in degrees. e.g. image.scale(45)\n \ncolorize(r, g, b, a) <- return None\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\ncolor the image on an RGBA scale of 0-255. If you want to make your image \ntransparent, use the \"a\" value.\n\nget_width(self) <- return int\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nreturns the width of the original image. Does not provide alterations when the \nimage is rotated, but it does support alterations in scaling.\n \nget_height(self) <- return int\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nfunctions the same as get_width(), only it returns the image's height instead \nof width\n \nget_rect(self) <- return rect.Rect\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nreturns a rect the size of the image.\n\npygl2d.rect\n===========\n\nPyGL2D's rect module provides a class similar to pygame's rect. It supports\nfloating point numbers, but it misses alot of pygame's rect functions.\n\nclass rect.Rect(object)\n-----------------------\n\n__init__(self, x, y, w, h)\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n \ninit the Rect. x and y should be its topleft position, and w and h should be \nits width and height.\n \nmove(dx, dy) <- return Rect\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nCreate a new rect moved the amount of dx and dy.\n \nmove_ip(dx, dy)\n^^^^^^^^^^^^^^^\n\nMove the rect the amount of dx and dy.\n \ncolliderect(rect)\n^^^^^^^^^^^^^^^^^\n\nCheck for a collision between another rect.\n \ncollidepoint(point)\n^^^^^^^^^^^^^^^^^^^\n\nCheck for a collision between the rect and a point.\n\npygl2d.window\n=============\n\nPyGL2D's window module is for setting up the window for drawing.\n\nwindow.init(size, caption=\"\", flags=DOUBLEBUF)\n----------------------------------------------\n\nInitialise the SDL/PyGame window.\n\nwindow.begin_draw()\n-------------------\n\nCall this right before you begin drawing your objects.\n\nwindow.end_draw()\n-----------------\n\nAnd always call this after you're done drawing.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/RyanHope/PyGL2D", "keywords": null, "license": "GPL-3", "maintainer": null, "maintainer_email": null, "name": "PyGL2D", "package_url": "https://pypi.org/project/PyGL2D/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyGL2D/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/RyanHope/PyGL2D" }, "release_url": "https://pypi.org/project/PyGL2D/0.3.7/", "requires_dist": null, "requires_python": null, "summary": "A 2D Graphics Library for PyGame and PyOpenGL.", "version": "0.3.7" }, "last_serial": 785285, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "bd8eedc075aa4ee64c02959fbb2bf419", "sha256": "7ebf9e5e88e94b0df7dd9bb4e07c7dd270d7977c6e0bfe04a12fc6dd1baf9926" }, "downloads": -1, "filename": "PyGL2D-0.3.0.tar.gz", "has_sig": false, "md5_digest": "bd8eedc075aa4ee64c02959fbb2bf419", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9356, "upload_time": "2012-10-15T14:38:03", "url": "https://files.pythonhosted.org/packages/93/97/413d4e6182ee3e44cdc390109142de069481dab8da4e52be874b8062d9d2/PyGL2D-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "296319bae0db0d667813b0034c690852", "sha256": "ee4f5f85c48ae19f0f10a97b711db8158ae5e73eabc58a60b4f28689bee05759" }, "downloads": -1, "filename": "PyGL2D-0.3.1.tar.gz", "has_sig": false, "md5_digest": "296319bae0db0d667813b0034c690852", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9397, "upload_time": "2012-10-15T20:54:00", "url": "https://files.pythonhosted.org/packages/a0/25/0036d1c99b2def9ee4b1568478a30733d0b6f3718a80b98f40001a80960b/PyGL2D-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "2e318752fe2d282fb161ebae7f8c65bd", "sha256": "4cc5bb52d7d3090c9fa348e050d14dcbe17c5b8c6f3611c17e2f79663f8450ae" }, "downloads": -1, "filename": "PyGL2D-0.3.2.tar.gz", "has_sig": false, "md5_digest": "2e318752fe2d282fb161ebae7f8c65bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8196, "upload_time": "2012-10-17T01:28:14", "url": "https://files.pythonhosted.org/packages/c9/fd/7f8e507f201232670f3cab953781ed305d91b404a46c64e0cefcd535e682/PyGL2D-0.3.2.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "07213efc9cdd883ac79f4f8b4c09ccfa", "sha256": "649034091e83079503955170a6fe5cdb660a66034444bf66364c383987bee1a0" }, "downloads": -1, "filename": "PyGL2D-0.3.4.tar.gz", "has_sig": false, "md5_digest": "07213efc9cdd883ac79f4f8b4c09ccfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8249, "upload_time": "2012-10-17T14:08:36", "url": "https://files.pythonhosted.org/packages/7f/c9/4c613d3d6f8f08d0ffa4a14be6e3518220b966853304c047827851826809/PyGL2D-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "7ad9e2032413c6c1c5196354deca6100", "sha256": "b52d2dded64a06fdef5950c5c74509e0a3527e0ef542f4aa331ef8200c86e8d9" }, "downloads": -1, "filename": "PyGL2D-0.3.5.tar.gz", "has_sig": false, "md5_digest": "7ad9e2032413c6c1c5196354deca6100", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8347, "upload_time": "2012-10-17T19:32:41", "url": "https://files.pythonhosted.org/packages/53/59/67bd017d265dd44db3f867adae8be056fadc71b7464c47c7f0cd73751fd3/PyGL2D-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "fb20515c1f5f0e85ddb672fc36fb21a3", "sha256": "bea921d83c8139bd5674aa43bbebac91a463e18685afafdd55fccbb53a0227c5" }, "downloads": -1, "filename": "PyGL2D-0.3.6.tar.gz", "has_sig": false, "md5_digest": "fb20515c1f5f0e85ddb672fc36fb21a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8784, "upload_time": "2012-10-18T16:40:15", "url": "https://files.pythonhosted.org/packages/6e/9c/6086131b96ca85de99088443cdd5c1af3fe0858f16a4f3eed82aaf2ee7dc/PyGL2D-0.3.6.tar.gz" } ], "0.3.7": [ { "comment_text": "", "digests": { "md5": "42b4194a18f9db0961746b8975af7c50", "sha256": "c8fda4fe4137bb46fc2c3f1edd13f7970bff323ecddc4e9628c5a4e7e51c719d" }, "downloads": -1, "filename": "PyGL2D-0.3.7.tar.gz", "has_sig": false, "md5_digest": "42b4194a18f9db0961746b8975af7c50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8804, "upload_time": "2012-10-19T15:06:15", "url": "https://files.pythonhosted.org/packages/41/e1/10fc0d4eef22a07584c3a7d54f888f786c5d16f2c1141b6a1ea2c8cc6b14/PyGL2D-0.3.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42b4194a18f9db0961746b8975af7c50", "sha256": "c8fda4fe4137bb46fc2c3f1edd13f7970bff323ecddc4e9628c5a4e7e51c719d" }, "downloads": -1, "filename": "PyGL2D-0.3.7.tar.gz", "has_sig": false, "md5_digest": "42b4194a18f9db0961746b8975af7c50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8804, "upload_time": "2012-10-19T15:06:15", "url": "https://files.pythonhosted.org/packages/41/e1/10fc0d4eef22a07584c3a7d54f888f786c5d16f2c1141b6a1ea2c8cc6b14/PyGL2D-0.3.7.tar.gz" } ] }