You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Draws a rectangle starting at the specified x,y coordinate with the specified width and height and filled with the specified color (using set_color or black if not defined).
76
79
77
-
78
-
Category: TI Draw / Shape
79
-
80
-
81
-
Returns an array / list: [x_start, y_start, width, height]
80
+
Args:
81
+
x_start (float): The starting x coordinate.
82
+
y_start (float): The starting y coordinate.
83
+
width (float): The width of the rectangle.
84
+
height (float): The height of the rectangle.
85
+
86
+
Returns:
87
+
list: a list containing the following data: [x_start, y_start, width, height]
82
88
"""
89
+
ifcerr.type_error(float, x_start) ==False: log("Argument 'x_start' has to be type float!", "ERROR", "TI Draw", "Filled Rectangle")
90
+
ifcerr.type_error(float, y_start) ==False: log("Argument 'y_start' has to be type float!", "ERROR", "TI Draw", "Filled Rectangle")
91
+
ifcerr.type_error(float, width) ==False: log("Argument 'width' has to be type float!", "ERROR", "TI Draw", "Filled Rectangle")
92
+
ifcerr.type_error(float, height) ==False: log("Argument 'height' has to be type float!", "ERROR", "TI Draw", "Fill Rectangle")
93
+
94
+
83
95
err.type_error(float, "float", x_start)
84
96
err.type_error(float, "float", y_start)
85
97
err.type_error(float, "float", width)
86
98
err.type_error(float, "float", height)
87
99
100
+
log("Drawing a filled rectangle from starting point: ( "+str(x_start) +" | "+str(y_start) +" ) with a width of '"+str(width) +"' and a height of '"+str(height) +"'", "INFO", "TI Draw", "Filled Rectangle")
88
101
print("Drawing filled rectangle from starting point: ( "+str(x_start) +" | "+str(y_start) +" ) with a width of '"+str(width) +"' and a height of '"+str(height) +"'")
0 commit comments