Skip to content

Commit a38a9fd

Browse files
fixes #117
1 parent e247d91 commit a38a9fd

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

ti_python_module/ti_draw.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,20 +222,33 @@ def draw_arc(x_start:float, y_start:float, width:float, height:float, start_angl
222222
def fill_arc(x_start:float, y_start:float, width:float, height:float, start_angle:float, arc_angle:float):
223223
"""
224224
Draws an arc starting at the specified x,y coordinate with the specified width, height and angles filled with the specified color (using set_color or black if not defined).
225-
226-
227-
Category: TI Draw / Shape
228-
229-
230-
Returns an array / list: [x_start, y_start, width, height, start_angle, arc_angle]
225+
226+
Args:
227+
x_start (float): The starting x coordinate.
228+
y_start (float): The starting y coordinate.
229+
width (float): The width of the arc.
230+
height (float): The height of the arc.
231+
start_angle (float): The starting angle of the arc.
232+
arc_angle (float): The arc angle.
233+
234+
Returns:
235+
list: a list containing the following data: [x_start, y_start, width, height, start_angle, arc_angle]
231236
"""
237+
if cerr.type_error(float, x_start) == False: log("Argument 'x_start' has to be type float!", "ERROR", "TI Draw", "Filled Arc")
238+
if cerr.type_error(float, y_start) == False: log("Argument 'y_start' has to be type float!", "ERROR", "TI Draw", "Filled Arc")
239+
if cerr.type_error(float, width) == False: log("Argument 'width' has to be type float!", "ERROR", "TI Draw", "Filled Arc")
240+
if cerr.type_error(float, height) == False: log("Argument 'height' has to be type float!", "ERROR", "TI Draw", "Filled Arc")
241+
if cerr.type_error(float, start_angle) == False: log("Argument 'start_angle' has to be type float!", "ERROR", "TI Draw", "Filled Arc")
242+
if cerr.type_error(float, arc_angle) == False: log("Argument 'arc_angle' has to be type float!", "ERROR", "TI Draw", "Filled Arc")
243+
232244
err.type_error(float, "float", x_start)
233245
err.type_error(float, "float", y_start)
234246
err.type_error(float, "float", width)
235247
err.type_error(float, "float", height)
236248
err.type_error(float, "float", start_angle)
237249
err.type_error(float, "float", arc_angle)
238-
250+
251+
log("Drawing a filled arc from starting point: ( " + str(x_start) + " | " + str(y_start) + " ) with start-angle '" + str(start_angle) + " degrees' and arc-angle '" + str(arc_angle) + " degrees' with a height of '" + str(height) + "' and a width of '" + str(width) + "'", "INFO", "TI Draw", "Filled Arc")
239252
print("Drawing filled arc from starting point: ( " + str(x_start) + " | " + str(y_start) + " ) with start-angle '" + str(start_angle) + " degrees' and arc-angle '" + str(arc_angle) + " degrees' with a height of '" + str(height) + "' and a width of '" + str(width) + "'")
240253
return [x_start, y_start, width, height, start_angle, arc_angle]
241254

0 commit comments

Comments
 (0)