I want to create a pie chart in tkinter and fill the arcs with part of an image. It doesn't really matter what part of the image that is shown since the pictures will be uniform with a geometric patterns. I'm using the code below to create the pie chart, so i want to set the "fill"-variables to an image (for example, fill="image1"
). Is this possible or can i do this some other way? I'm not an experienced programmer btw.
import Tkinter
def frac(n): return 360.0 * n / 500
c = Tkinter.Canvas(width=700, height=700, bg='black');
c.pack()
c.create_arc((100,100,500,500), fill="red", start=frac(0), extent = frac(100))
c.create_arc((100,100,500,500), fill="blue", start=frac(100), extent = frac(400))
c.create_arc((100,100,500,500), fill="green", start=frac(400), extent = frac(100))
c.mainloop()