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

Method new

DemoPrograms/Demo_Desktop_Widget_CPU_Gauge.py:79–90  ·  view source on GitHub ↗

Draw Arc or circle

(self)

Source from the content-addressed store, hash-verified

77 self.new()
78
79 def new(self):
80 """
81 Draw Arc or circle
82 """
83 x, y, r, start, stop, fill, line, width = self.all
84 start, stop = (180 - start, 180 - stop) if stop < start else (180 - stop, 180 - start)
85 if start == stop % 360:
86 self.figure.append(self.graph_elem.DrawCircle((x, y), r, fill_color=fill,
87 line_color=line, line_width=width))
88 else:
89 self.figure.append(self.graph_elem.DrawArc((x - r, y + r), (x + r, y - r), stop - start,
90 start, style='arc', arc_color=fill))
91
92 def move(self, delta_x, delta_y):
93 """

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected