forked from mohammed-nurulhoque/Shapes_Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShapesStudio.py
70 lines (48 loc) · 1.88 KB
/
ShapesStudio.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import Tkinter
from PIL import Image, ImageDraw, ImageTk
import layer
class Meta:
def __init__(i):
self.instance = i
self.im = Image.new('RGBA', (900, 590), 'white')
self.layers = []
self.layer_thumb = []
def add_layer(self, im):
layer = layer.Layer(im, self.instance.layers, self)
self.layers = im + self.layers
self.layer_thumb = layer + self.layer_thumb
self.instance.redraw()
class Main:
def __init__(self):
self.root = Tkinter.Tk()
self.root.geometry('1080x680')
self.meta = Meta(self)
self.cmd = Tkinter.Frame(self.root, width=1080, height=60, bg='#dddddd')
self.cmd.grid()
self.f2 = Tkinter.Frame(self.root, width=1080, height=620)
self.f2.grid(row=1,column=0)
self.cv = Tkinter.Canvas(self.f2, bd=0, highlightthickness=0,
width=900, height=590, bg='white')
self.cv.grid(row=0,column=0, padx=15, pady=15)
self.layers = Tkinter.Frame(self.f2, width=150, height=620)
self.layers.grid(row=0, column=1)
frieze = Tkinter.Button(self.cmd, text='Add Frieze', bg='#cccccc',
relief=Tkinter.FLAT, command=self.add_frieze)
frieze.pack(side=Tkinter.LEFT, padx=5, pady=10)
wall = Tkinter.Button(self.cmd, text='Add Wallpaper', bg='#cccccc',
relief=Tkinter.FLAT, command=self.add_wall)
wall.pack(side=Tkinter.LEFT, padx=5, pady=10)
frac = Tkinter.Button(self.cmd, text='Add L-fractal', bg='#cccccc',
relief=Tkinter.FLAT, command=self.add_frac)
frac.pack(side=Tkinter.LEFT, padx=5, pady=10)
self.root.mainloop()
def add_frieze(self):
pass
def add_wall(self):
pass
def add_frac(self):
pass
def redraw(self):
pass
if __name__ == '__main__':
application = Main()