enthought/enable — Issue #43: OSX: matplotlib + agg  = segfault
Author: jdmarch
Created: 2012-02-22 19:43:04+00:00
State: open

from matplotlib import pyplot
from enthought.kiva.agg import GraphicsContextArray, CompiledPath

c = CompiledPath()
c.begin_path()
c.move_to(20,20)
c.line_to(80,80)
c.line_to(80,20)
c.close_path()

gc = GraphicsContextArray((100,100))
gc.add_path(c)
gc.stroke_path()
gc.save('demo.png')