{ "info": { "author": "Karim Bahgat", "author_email": "karim.bahgat.norway@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Science/Research", "License :: OSI Approved", "Programming Language :: Python", "Topic :: Multimedia :: Graphics", "Topic :: Scientific/Engineering :: GIS", "Topic :: Scientific/Engineering :: Visualization" ], "description": "PyAgg\n=====\n\nPyAgg is a precompiled Python library for lightweight, easy, and\nconvenient graphics rendering based on the aggdraw module.\n\nMotivation\n----------\n\nThere are several ways to create high quality 2D drawings and graphics\nin Python. The widely used Matplotlib library is a favorite for advanced\nscientific visualizations, but for simpler drawing uses, its size,\ndependencies, and steep learning curve can be a bit overkill. PyCairo is\nanother library, but unfortunately it suffers some from slow drawing and\na stateful API that leads to longer code. Finally, Aggdraw is simple and\nintuitive, but has slightly limited functionality, is no longer\nmaintained, and precompiled binaries are hard to come by.\n\nThe current library, PyAgg, aims to solve some of these problems. By\nbuilding on the lightweight aggdraw module and including the necessary\npre-compiled binaries for multiple Python and architecture versions in\nthe same package, PyAgg is ready to use out of the box, no installation\nor compiling required. It is very fast and produces high quality\nantialiased drawings. Most importantly, PyAgg wraps around and offers\nseveral convenience functions for easier no-brain drawing and data\nvisualization, including flexible handling of coordinate systems and\nlength units.\n\nHere is to at least another 5 years of beautiful and lightweight AGG\nimage drawing. Cheers! After that, Python 2x will no longer be\nmaintained, and while people can still continue to use it, it is likely\nthat most people will be using Python 3x. At that point someone will\nhave to update the C++ Aggdraw wrapper so it can be compiled for Python\n3x if Python users are to continue to enjoy the power of the Agg\ngraphics library.\n\nFeatures\n--------\n\nThe main features of PyAgg include:\n\n- A coordinate aware image. No need for the intricacies of affine\n matrix transformations, just define the coordinates that make up each\n corner of your image once, and watch it follow as you resize, crop,\n rotate, move, and paste the image. Zoom in and out of you coordinate\n system by bounding box, factor, or units, and lock the aspect ratio\n to avoid distortions.\n- Oneliners to easily draw and style high quality graphical elements\n including polygons with holes, lines with or without smooth curves,\n pie slices, and point symbols like circles, squares, and triangles\n with an optional flattening factor.\n- Style your drawing sizes and distances in several types of units,\n including pixels, percentagea, cm, mm, inches, and font points, by\n specifying the real world size of your image.\n- Smart support for text writing, including text anchoring, and\n automatic detection of available fonts.\n- Instantly view your image in a Tkinter pop up window, or prepare it\n for use in a Tkinter application.\n\nThere is also support for common domain specific data visualization:\n\n- Partial support for geographical plotting, including a lat-long\n coordinate system, and automatic drawing of GeoJSON features.\n- Easily plot statistical data on graphs witn a syntax and\n functionality that is aimed more for data analysts and laymen than\n computer scientists, including linegraph, scatterplot, histogram,\n etc, although these are still a work in progress.\n\nPlatforms\n---------\n\nPython 2.6 and 2.7\n\nPyAgg relies on the aggdraw Python C++ wrapper, and as a convenience\ncomes with aggdraw precompiled for the following platforms:\n\n- Python 2.6 (Windows: 32-bit only, Mac and Linux: No support)\n- Python 2.7 (Windows: 32 and 64-bit, Mac and Linux: 64-bit only)\n\nNote: Mac and Linux support has not been fully tested, and there are\nsome reports of problems on Linux.\n\nYou can get around these limitations by compiling aggdraw on your own,\nin which case PyAgg should work on any machine that you compile for.\n\nDependencies\n------------\n\nPIL/Pillow (used for image loading, saving, and manipulation. Also used\nfor text-rendering, which means if you compile PIL/Pillow on your own\nmake sure FreeType support is enabled)\n\nInstalling it\n-------------\n\nPyAgg is installed with pip from the commandline:\n\n::\n\n pip install pyagg\n\nIt also works to just place the \"pyagg\" package folder in an importable\nlocation like \"site-packages\".\n\nExample Usage\n-------------\n\nBegin by importing the pyagg module:\n\n::\n\n import pyagg\n\nTo begin drawing, create your canvas instance and define its coordinate\nsystem, in this case based on percentages to easily draw using relative\npositions. In our case we give our image the size of an A4 paper, and\nspecify that all further drawing in real world units should use 96\npixels per inch:\n\n::\n\n canvas = pyagg.Canvas(\"210mm\", \"297mm\", background=(222,222,222), ppi=96)\n canvas.percent_space()\n\nNext, draw some graphical elements:\n\n::\n\n canvas.draw_line([10,10, 50,90, 90,10],\n smooth=True,\n fillcolor=(222,0,0),\n fillsize=\"2cm\")\n\n canvas.draw_triangle((50,50),fillsize=\"30px\", fillcolor=(0,0,0, 111))\n\nAnd some text:\n\n::\n\n canvas.draw_text((50,50),\"PyAgg is for drawing!\",\n textanchor=\"center\",\n textfont=\"Segoe UI\",\n textsize=42)\n\nOnce you are done, view or save your image:\n\n::\n\n canvas.save(\"test.png\")\n canvas.view()\n\nMore Information:\n-----------------\n\nThe above was just a very small example of what you can do with PyAgg.\nBut until I get around to making the full tutorial just check out the\nAPI documentation below.\n\n- `Home Page `__\n- `API Documentation `__\n\nLicense:\n--------\n\nThis code is free to share, use, reuse, and modify according to the MIT\nlicense, see license.txt\n\nCredits:\n--------\n\nKarim Bahgat (2016)\n\nChanges\n-------\n\n0.2.0 (2016-06-22)\n~~~~~~~~~~~~~~~~~~\n\n- Plenty of (undocumented) feature additions, including some unfinished\n ones\n- Replaced heavy fontTools dependency with a more lightweight font\n locator\n- Fixed some bugs improving platform support for Mac and Linux (though\n not fully tested)\n\n0.1 (2016-03-28)\n~~~~~~~~~~~~~~~~\n\n- First basic release", "description_content_type": null, "docs_url": "https://pythonhosted.org/PyAgg/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/karimbahgat/PyAgg", "keywords": "graphics rendering drawing visualization imaging AGG aggdraw", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "PyAgg", "package_url": "https://pypi.org/project/PyAgg/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyAgg/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/karimbahgat/PyAgg" }, "release_url": "https://pypi.org/project/PyAgg/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "Simple user-oriented graphics drawing and image manipulation.", "version": "0.2.0" }, "last_serial": 2181920, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9b5880866a5a8ae86748153526c29d11", "sha256": "10d984eed592d2ebd94c74a3b71e897af7afe6313ea533af25728546cce07efa" }, "downloads": -1, "filename": "PyAgg-0.1.zip", "has_sig": false, "md5_digest": "9b5880866a5a8ae86748153526c29d11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 753885, "upload_time": "2015-06-09T19:53:22", "url": "https://files.pythonhosted.org/packages/57/f8/63fce26c19e0f8d53fe70e612dc81b478026f9f66580843ab5129cf925f5/PyAgg-0.1.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c5b6b8e1d25432e60d1aae341f905494", "sha256": "46e839b8c3836e1c3f9065ff92d6922f4f4fb28fb3a0b304a7d21532650428e3" }, "downloads": -1, "filename": "PyAgg-0.2.0.zip", "has_sig": false, "md5_digest": "c5b6b8e1d25432e60d1aae341f905494", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 525516, "upload_time": "2016-06-22T19:44:03", "url": "https://files.pythonhosted.org/packages/d6/7c/3ea05e73ccaaf95726285b1dc2bac52cda9927026d9b7d998f54a35db779/PyAgg-0.2.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c5b6b8e1d25432e60d1aae341f905494", "sha256": "46e839b8c3836e1c3f9065ff92d6922f4f4fb28fb3a0b304a7d21532650428e3" }, "downloads": -1, "filename": "PyAgg-0.2.0.zip", "has_sig": false, "md5_digest": "c5b6b8e1d25432e60d1aae341f905494", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 525516, "upload_time": "2016-06-22T19:44:03", "url": "https://files.pythonhosted.org/packages/d6/7c/3ea05e73ccaaf95726285b1dc2bac52cda9927026d9b7d998f54a35db779/PyAgg-0.2.0.zip" } ] }