diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 4aff4c03..092e6a74 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1329,13 +1329,14 @@ class Graph(Element): return None return self._TKCanvas2.create_rectangle(converted_top_left[0], converted_top_left[1], converted_bottom_right[0], converted_bottom_right[1], fill=fill_color, outline=line_color) - def DrawText(self, text, location, color='black', font=None): + def DrawText(self, text, location, color='black', font=None, angle=0): converted_point = self._convert_xy_to_canvas_xy(location[0], location[1]) if self._TKCanvas2 is None: print('*** WARNING - The Graph element has not been finalized and cannot be drawn upon ***') print('Call Window.Finalize() prior to this operation') return None - return self._TKCanvas2.create_text(converted_point[0], converted_point[1], text=text, font=font, fill=color) + text_id = self._TKCanvas2.create_text(converted_point[0], converted_point[1], text=text, font=font, fill=color, angle=angle) + return text_id def Erase(self):