Skip to content

Commit df150be

Browse files
fixes #114
1 parent ead22d0 commit df150be

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

ti_python_module/ti_draw.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,24 @@ def fill_circle(x_start:float, y_start:float, radius:float):
134134
"""
135135
Draws a circle starting at the specified x,y center coordinate with the specified radius and filled with the specified color (using set_color or black if not defined).
136136
137-
138-
Category: TI Draw / Shape
139-
140-
141-
Returns an array / list: [x_start, y_start, radius]
137+
Args:
138+
x_start (float): The starting x coordinate.
139+
y_start (float): The starting y coordinate.
140+
radius (float): The radius of the circle.
141+
142+
Returns:
143+
list: a list containing the following data: [x_start, y_start, radius]
142144
"""
145+
146+
if cerr.type_error(float, x_start) == False: log("Argument 'x_start' has to be type float!", "ERROR", "TI Draw", "Filled Circle")
147+
if cerr.type_error(float, y_start) == False: log("Argument 'y_start' has to be type float!", "ERROR", "TI Draw", "Filled Circle")
148+
if cerr.type_error(float, radius) == False: log("Argument 'radius' has to be type float!", "ERROR", "TI Draw", "Filled Circle")
149+
143150
err.type_error(float, "float", x_start)
144151
err.type_error(float, "float", y_start)
145152
err.type_error(float, "float", radius)
146153

154+
log("Drawing a filled circle from starting point: ( " + str(x_start) + " | " + str(y_start) + " ) with a radius of '" + str(radius) + "'", "INFO", "TI Draw", "Filled Circle")
147155
print("Drawing filled circle from starting point: ( " + str(x_start) + " | " + str(y_start) + " ) with a radius of '" + str(radius) + "'")
148156
return [x_start, y_start, radius]
149157

0 commit comments

Comments
 (0)