MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / new

Method new

DemoPrograms/Demo_Desktop_Widget_RAM_Gauge.py:88–97  ·  view source on GitHub ↗

Draw Arc or circle

(self)

Source from the content-addressed store, hash-verified

86 self.new()
87
88 def new(self):
89 """
90 Draw Arc or circle
91 """
92 x, y, r, start, stop, fill, line, width = self.all
93 start, stop = (180 - start, 180 - stop) if stop < start else (180 - stop, 180 - start)
94 if start == stop % 360:
95 self.figure.append(self.graph_elem.DrawCircle((x, y), r, fill_color=fill, line_color=line, line_width=width))
96 else:
97 self.figure.append(self.graph_elem.DrawArc((x - r, y + r), (x + r, y - r), stop - start, start, style='arc', arc_color=fill))
98
99 def move(self, delta_x, delta_y):
100 """

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected