Install AggDraw. From natevw's post on stack overflow.
Includes a patch I discovered was necessary for freetype, mentioned here.
Install AggDraw. From natevw's post on stack overflow.
Includes a patch I discovered was necessary for freetype, mentioned here.
| #!/bin/bash | |
| cd /tmp | |
| svn co http://svn.effbot.org/public/tags/aggdraw-1.2a3-20060212 | |
| cd aggdraw-1.2a3-20060212 | |
| patch -p0 <<EOF | |
| Index: agg2/include/agg_array.h | |
| =================================================================== | |
| --- agg2/include/agg_array.h (revision 532) | |
| +++ agg2/include/agg_array.h (working copy) | |
| @@ -520,7 +520,7 @@ | |
| int8u* ptr = m_buf_ptr; | |
| if(alignment > 1) | |
| { | |
| - unsigned align = (alignment - unsigned(ptr) % alignment) % alignment; | |
| + unsigned align = (alignment - (unsigned long)(ptr) % alignment) % alignment; | |
| size += align; | |
| ptr += align; | |
| if(size <= m_rest) | |
| EOF | |
| patch -p0 <<EOF | |
| Index: setup.py | |
| =================================================================== | |
| --- setup.py (revision 532) | |
| +++ setup.py (working copy) | |
| @@ -29,7 +29,7 @@ | |
| """ | |
| # pointer to freetype build directory (tweak as necessary) | |
| -FREETYPE_ROOT = "../../kits/freetype-2.1.10" | |
| +FREETYPE_ROOT = "/usr/local" | |
| if not os.path.isdir(FREETYPE_ROOT): | |
| print "===", "freetype not available (edit setup.py to enable)" | |
| EOF | |
| python setup.py build_ext -i | |
| python selftest.py | |
| sudo python setup.py install |