2016-04-30 6 views
1

Gibt es eine Chance, kann ich "Bild" in GraphWin in Datei erstellt speichern? Es ist egal welcher Typ, ich muss ihn nur für spätere Vergleiche speichern.Python GraphWin in Datei exportieren

win = GraphWin("Test image", 500, 500) 
    c = Circle(Point(Items[i].x, Items[i].y), Items[i].z) 
    c.setFill(color) 
    c.draw(win) 

Vielen Dank für alle Ideen

Antwort

0

Ja, da GraphWin eine Unterklasse von Tkinter Canvas ist, können Sie tun:

from graphics import * 

win = GraphWin("Test image", 500, 500) 
c = Circle(Point(100, 100), 50) 
c.setFill("green") 
c.draw(win) 

win.postscript(file = "graphic.eps")