Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 789a4dca4953f037223e830336ef4af3 > files > 1068

python-enthought-enable-3.2.0-2mdv2010.0.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")