anti-aliased 2D vector graphics

Terry Hancock hancock at anansispaceworks.com
Sat Aug 2 08:41:41 EDT 2003


<posted & mailed>

Andy C wrote:

> Where can I get a python package to draw such figures?  I googled and
> found
> PyX, I guess it outputs PostScript.  I guess I can get a PostScript to BMP
> converter or something.  Is there any other alternative?
> 
> I have looked at PIL, but it doesn't seem to support drawing anti-aliased
> figures.  Thanks for any suggestions.

In addition to the other suggestions made, you might want to consider 
Sketch. It's normally billed as an application, but it's also a pretty 
powerful drawing library for python.  I'm uncertain about installation
issues, it may be a little harder to build on Windows than on Linux, (but
I suspect this is less of a problem if you just want to use it as a 
library).  But it certainly can do everything that you've mentioned.

I'm pretty sure that Sketch has anti-aliased rendering, but you should also 
be aware that you can get pretty good results simply by oversampling -- I 
usually draw at 4X the intended scale and then scale down by 1/4 to get the 
final result. This is somewhat coarse, but it works pretty well visually.

See http://sketch.sourceforge.net/ and links therein.

Cheers,
Terry

-- 
Terry Hancock
Anansi Spaceworks http://www.AnansiSpaceworks.com/





More information about the Python-list mailing list