The aggdraw Module

Updated June 20, 2005 | Fredrik Lundh

 

Updated 2006-02-12: aggdraw 1.2a3 is now available. This version provides additional support for drawing on Windows. It also fixes a number of issues with earlier 1.2 alpha releases.

Updated 2005-10-15: aggdraw 1.1 final is now available. Changes include performance improvements, path objects, and a number of bug fixes.

The aggdraw module implements the basic WCK 2D Drawing Interface on top of the AGG library. This library provides high-quality drawing, with anti-aliasing and alpha compositing, while being fully compatible with the WCK renderer.

The aggdraw module can be used with PIL or the WCK library (under Tkinter or native Windows). It can also be used as a stand-alone library.

Downloads

The aggdraw module can be downloaded from the effbot.org downloads site.

Alternatively, you can get the latest development version via subversion:

$ svn co http://svn.effbot.org/public/aggdraw/

Documentation

Examples

Example: A slightly rotated Tiger vector image rendered on top of a PIL image.

Comment:

A question on the Freetype support. In setup.py, you are required to point to the freetype build directory. But I already have freetype installed and in a common path of /usr/lib/libfreetype.so. So, I guess my question is why do we need to point to the build directory and not the object? A little clarification on this would be great, perhaps in the docs? I just feel like requiring the user to edit the setup.py themselves should be avoided if possible. Thanks. :)

Posted by Colin Barnette (2007-04-13)

Comment:

re: Colin's comment above: I just had a similar problem (the directory of the built FreeType lib and the directory with its include files are expeted to share a common parent directory; this is _really_ easy to fix by just looking through setup.py and setting the directories manually), so now I can make a fairly good guess that should answer this question: aggdraw doesn't just need the ready-made library, it also needs the include files.

Posted by nex (2007-05-01)

Comment:

Hi, I've a problem: I use your aggdraw module ( very good think!! ) for draw text into images. I need true type font file path for create the object. Look at Garamond Font for example: in c:\windows\fonts I have normal, italic and bold ttf files. How can I write "Hello World" in Garamond Bold Italic with aggdraw?? I've found that Microsoft Word, if garabi.ttf doesn't exists, it's not a problem for it! Have you got a solution??? Thanks very much!

Posted by Mariano (2007-05-02)

A Django site. this page was rendered by a django application in 0.03s 2008-05-10 01:32:43.648998. hosted by webfaction.