-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtools.py
55 lines (41 loc) · 1.13 KB
/
tools.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
from PyQt5.QtGui import QColor
class BrushTool:
def __init__(self, color, size):
super(BrushTool, self).__init__()
self.color = color
self.size = size
def set_color(self, color):
self.color = color
def set_size(self, size):
self.size = size
def get_as_dict(self):
return {
'size': self.size,
'color': self.color
}
class EraserTool:
def __init__(self, size):
super(EraserTool, self).__init__()
self.size = size
self.color = QColor(255, 255, 255)
def set_size(self, size):
self.size = size
def get_as_dict(self):
return {
'size': self.size,
'color': self.color
}
class FigureTool:
def __init__(self, name, color, outline_color):
super(FigureTool, self).__init__()
self.color = color
self.outline_color = outline_color
self.name = name
def get_as_dict(self):
return {
'color': self.color,
'outline_color': self.outline_color,
}
class SelectionTool:
def __init__(self):
pass