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
Sets the specified thickness and style of the border when drawing shapes (not applicable when using fill commands).
415
415
416
-
417
-
Category: TI Draw / Control
418
-
419
-
420
-
Returns an array / list: [thickness, stil]
416
+
Args:
417
+
thickness (str): The thickness of the pen. Possible Options: 'thin', 'medium', 'thick'.
418
+
stile (str): The stile of the pen. Possible Options: 'solid', 'dotted', 'dashed'.
419
+
420
+
Returns:
421
+
list: a list containing the following data: [thickness, stile]
421
422
"""
423
+
ifcerr.type_error(str, thickness) ==False: log("Argument 'thickness' has to be type string!", "ERROR", "TI Draw", "Set Pen")
424
+
ifcerr.type_error(str, stile) ==False: log("Argument 'stile' has to be type string!", "ERROR", "TI Draw", "Set Pen")
425
+
426
+
ifcerr.argument_error(thickness, "thin", "medium", "thick") ==False: log("Argument 'thickness' can only be one of these: 'thin', 'medium', 'thick'!", "ERROR", "TI Draw", "Set Pen")
427
+
ifcerr.argument_error(stile, "solid", "dotted", "dashed") ==False: log("Argument 'stile' can only be one of these: 'solid', 'dotted', 'dashed'!", "ERROR", "TI Draw", "Set Pen")
Sets the size of the window in which any shapes will be drawn. This function is useful to resize the window to match the data or to change the origin (0,0) of the drawing canvas.
436
-
437
-
438
-
Category: TI Draw / Control
439
-
440
-
441
-
Returns an array / list: [x_min, x_max, y_min, y_max]
444
+
445
+
Args:
446
+
x_min (int): The minimum x coordinate.
447
+
x_max (int): The minimum y coordinate.
448
+
y_min (int): The maximum x coordinate.
449
+
y_max (int): The maximum y corrdinate.
450
+
451
+
Raises:
452
+
ValueError: If x_min is greater or equal to x_max.
453
+
ValueError: If y_min is greater or equal to y_max.
454
+
455
+
Returns:
456
+
list: a list containing the following data: [x_min, x_max, y_min, y_max]
442
457
"""
458
+
ifcerr.type_error(int, x_min) ==False: log("Argument 'x_min' has to be type integer!", "ERROR", "TI Draw", "Set Window")
459
+
ifcerr.type_error(int, x_max) ==False: log("Argument 'x_max' has to be type integer!", "ERROR", "TI Draw", "Set Window")
460
+
ifcerr.type_error(int, y_min) ==False: log("Argument 'y_min' has to be type integer!", "ERROR", "TI Draw", "Set Window")
461
+
ifcerr.type_error(int, y_max) ==False: log("Argument 'y_max' has to be type integer!", "ERROR", "TI Draw", "Set Window")
462
+
463
+
ifcerr.relation.larger_equal_error(x_min, x_max) ==False: log("Argument 'x_min' has to be smaller then argument 'x_max'!", "ERROR", "TI Draw", "Set Window")
464
+
ifcerr.relation.larger_equal_error(y_min, y_max) ==False: log("Argument 'y_min' has to be smaller then argument 'y_max'!", "ERROR", "TI Draw", "Set Window")
465
+
466
+
443
467
err.type_error(int, "int", x_min)
444
468
err.type_error(int, "int", x_max)
445
469
err.type_error(int, "int", y_min)
446
470
err.type_error(int, "int", y_max)
447
471
448
-
if(x_min>=x_max):
449
-
raiseValueError("ERROR: minimum value has to be smaller then maximum value")
450
-
if(x_min>=x_max):
451
-
raiseValueError("ERROR: minimum value has to be smaller then maximum value")
0 commit comments