-
Notifications
You must be signed in to change notification settings - Fork 0
/
enum_type.py
58 lines (41 loc) · 1.12 KB
/
enum_type.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
from enum import Enum
class Shape(Enum):
rectangle = "rectangle"
circle = "circle"
diamond = "diamond"
ellipse = "ellipse"
parallelogram = "parallelogram"
class Position(Enum):
left = "left"
right = "right"
above = "above"
below = "below"
class Arrow(object):
def __init__(self, direction, contour, center):
self.direction = direction
self.contour = contour
self.center = center
def get_direction(self):
return self.direction
def get_center(self):
return self.center
class Shape_and_the_contour(object):
def __init__(self, shape, contour, center):
self.shape = shape
self.contour = contour
self.center = center
self.anchor = False
def get_cnts(self):
return self.contour
def get_shape(self):
return self.shape.name
def get_center(self):
return self.center
def set_name(self, name):
self.name = name
def get_name(self):
return self.name
def set_anchor(self):
self.anchor = True
def get_anchor(self):
return self.anchor