Skip to content

Commit 655455a

Browse files
fixes #115
1 parent df150be commit 655455a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ti_python_module/ti_draw.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,16 @@ def draw_text(x_start:float, y_start:float, text:str):
167167
168168
Returns an array / list: [x_start, y_start, text]
169169
"""
170+
171+
if cerr.type_error(float, x_start) == False: log("Argument 'x_start' has to be type float!", "ERROR", "TI Draw", "Draw Text")
172+
if cerr.type_error(float, y_start) == False: log("Argument 'y_start' has to be type float!", "ERROR", "TI Draw", "Draw Text")
173+
if cerr.type_error(str, text) == False: log("Argument 'text' has to be type string!", "ERROR", "TI Draw", "Draw Text")
174+
170175
err.type_error(float, "float", x_start)
171176
err.type_error(float, "float", y_start)
172177
err.type_error(str, "str", text)
173178

179+
log("Drawing text '" + text + "' from starting point: ( " + str(x_start) + " | " + str(y_start) + " )", "INFO", "TI Draw", "Draw Text")
174180
print("Drawing text '" + text + "' from starting point: ( " + str(x_start) + " | " + str(y_start) + " )")
175181
return [x_start, y_start, text]
176182

0 commit comments

Comments
 (0)