TI Draw Menu

This submenu is located under More Modules.

Note: When creating a new program that uses this module, it is recommended to use the Geometry Graphics program type. This will ensure that all the relevant modules are imported.

Item

Description

from ti_draw import *

Imports all methods from the ti_draw module.

 

Shape

Item

Description

draw_line()

Draws a line starting from the specified x1,y1 coordinate to x2,y2.

draw_rect()

Draws a rectangle starting at the specified x,y coordinate with the specified width and height.

fill_rect()

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).

draw_circle()

Draws a circle starting at the specified x,y center coordinate with the specified radius.

fill_circle()

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).

draw_text()

Draws a text string starting at the specified x,y coordinate.

draw_arc()

Draws an arc starting at the specified x,y coordinate with the specified width, height and angles.

fill_arc()

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).

draw_poly()

Draws a polygon using the specified x-list,y-list values.

fill_poly()

Draws a polygon using the specified x-list,y-list values filled with the specified color (using set_color or black if not defined).

plot_xy()

Draws a shape using the specified x,y coordinate and specified number from 1-13 representing different shapes and symbols (see below).

 

Control

Item

Description

clear()

Clears the entire screen. Can be used with x,y,width,height parameters to clear an existing rectangle.

clear_rect()

Clears the rectangle at the specified x,y coordinate with the specified width and height.

set_color()

Sets the color of the shape(s) that follow in the program until another color is set.

set_pen()

Sets the specified thickness and style of the border when drawing shapes (not applicable when using fill commands).

set_window()

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.

get_screen_dim()

Returns the xmax and ymax of the screen dimensions.

use_buffer()

Enables an off-screen buffer to speed up drawing.

paint_buffer()

Displays the buffered drawing output.

The use_buffer() and paint_buffer() functions are useful in cases where displaying multiple objects on the screen could cause delays.

 

Notes

The default configuration has (0,0) in the top left corner of the screen. The positive x-axis points to the right and the positive y-axis points to the bottom This can be modified by using the set_window() function.
The functions in ti_draw module are only available on the handheld and in handheld view on desktop.