@header@
matplotlib.backends.backend_agg | index /matplotlib/backends/backend_agg.py |
An agg http://antigrain.com/ backend
Features that are implemented
* capstyles and join styles
* dashes
* linewidth
* lines, rectangles, ellipses
* clipping to a rectangle
* output to RGBA and PNG
* alpha blending
* DPI scaling properly - everything scales properly (dashes, linewidths, etc)
* draw polygon
* freetype1
TODO:
* use ttf manager to get font - right now I just use Vera
* freetype2
INSTALLING
REQUIREMENTs
python2.2+
Numeric 22+
agg2 (see below)
freetype 1
libpng
libz
Install AGG2 (cut and paste below into xterm should work)
wget http://www.antigrain.com/agg2.tar.gz
tar xvfz agg2.tar.gz
cd agg2
make
(Optional) if you want to make the examples:
cd examples/X11
make
Installing backend_agg
Grab the latest CVS:
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/matplotlib login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/matplotlib co matplotlib
Edit setup.py: change aggsrc to point to the agg2 src tree and
replace if 0: with if 1: in the backend_agg section
Then just do the usual thing: python setup.py build
Please let me know if you encounter build problems, and tell me
platform, gcc version, etc... Currently the paths in setupext.py
assume as linux like filesystem (eg X11 include dir, location of
libttf, etcc) so you may need to tweak these
Using agg backend
python somefile.py -dAgg
or
import matplotlib
matplotlib.use('Agg')
TODO:
* implement ttf font manager
* allow save to file handle
* allow load from png
Errors: running python2.2 on bace.bsd
from _backend_agg import RendererAgg as _RendererAgg, Font
ImportError: /usr/lib/python2.2/site-packages/matplotlib/backends/_backend_agg.so: undefined symbol: __gxx_personality_v0
Modules | ||||||
|
Classes | ||||||||||||||||||
|
Functions | ||
|
Data | ||
False = False Float = 'd' PIXELS_PER_INCH = 96 True = True division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192) fontManager = <matplotlib.backends.ttf_font_manager.FontManager instance> |