[Pythonmac-SIG] CoreGraphics module for python 2.4.1

Robert Kern rkern at ucsd.edu
Mon Sep 12 23:53:36 CEST 2005


Robert Kern wrote:

> http://starship.python.net/crew/kernr/source/ABCGI-0.0.0.tar.gz
> http://starship.python.net/crew/kernr/source/ABCGI-0.0.0-py2.4-macosx-10.4-ppc.egg

And I forgot to mention that you will need Pyrex and setuptools to build
from source. You will also need Numeric to run it and also PIL if you
want to save bitmap images to a file.

Here is a small example of its use:

In [1]: import ABCGI

In [2]: gc = ABCGI.CGBitmapContext(256,256)

In [3]: gc.move_to(0,0)

In [4]: gc.line_to(128,128)

In [5]: gc.stroke_path()

In [6]: gc.save('foo.png')

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter


More information about the Pythonmac-SIG mailing list