| 71 | """ |
| 72 | |
| 73 | def __init__(self, center_x=0, center_y=0, radius=100, start_angle=0, |
| 74 | stop_angle=360, fill_color='white', line_color='black', line_width=2, graph_elem=None): |
| 75 | |
| 76 | instance = Gauge.mapping(isinstance, [center_x, center_y, radius, start_angle, |
| 77 | stop_angle, line_width], (int, float)) + Gauge.mapping(isinstance, |
| 78 | [fill_color, line_color], str) |
| 79 | if False in instance: |
| 80 | raise ValueError |
| 81 | start_angle, stop_angle = Gauge.limit(start_angle), Gauge.limit(stop_angle) |
| 82 | self.all = [center_x, center_y, radius, start_angle, stop_angle, |
| 83 | fill_color, line_color, line_width] |
| 84 | self.figure = [] |
| 85 | self.graph_elem = graph_elem |
| 86 | self.new() |
| 87 | |
| 88 | def new(self): |
| 89 | """ |