@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
* freetype2 w/ ft2font
* using ttf_manager to get font
TODO:
* allow save to file handle
* allow load from png
* integrate screen dpi w/ ppi and text
INSTALLING
REQUIREMENTs
python2.2+
Numeric 22+
agg2 (see below)
freetype 2
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
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')
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> |