Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > 480400831775432e21887c0bb26fd401 > files > 893

python-enthought-enable-3.4.0-1mdv2010.2.i586.rpm

from enthought.kiva import agg
   
gc = agg.GraphicsContextArray((500,500))
gc.rect(100,100,300,300)
gc.draw_path()
gc.save("rect.bmp")

# directly manipulate the underlying
# Numeric array.
gc.bmp_array[:100,:100] = 255 * .5
gc.save("rect2.bmp")