User Manual
17-21
draw_string()
Description: Draws a character string of the specified color at the specified coordinates.
Syntax: draw_string(x, y, s[, color[, size]])
x• argument, y argument
Specifies the x- and y-coordinates of the first character of the character string
to be drawn. The figure below shows the result when
x=10, y=20 is specified
for drawing the character “A”.
(10, 20)
The range and type of value that can be specified are the same as the
x-argument and y-argument of set_pixel (page 17-19).
s argument•
Specifies, as a str type, the character string to be drawn.
color argument •
Specifies, as a 256-gradation RGB value (0, 0, 0 to 255, 255, 255), the
character string to be drawn. For details about this argument, see “Draw
Function color Argument” (page 17-22).
size argument•
Specifies one of the following as the character size of the character string to
be drawn: “large”, “medium”, “small”. “medium” is applied when this argument
is omitted.
Example: To draw large size “abc” in black at coordinates (0, 0) and display the drawing
screen
from casioplot import *
draw_string(0,0,”abc”,(0,0,0),”large”)
show_screen()
Note:
If both the •
x- and y-coordinate values are within the allowable range, the drawn character
string will be displayed within the drawing screen range, even if it partially runs off of the
drawing screen.
If either the
x- or y-coordinate value is outside of the allowable range, function execution will
be ignored (nothing drawn, no error).
Only ASCII characters (“py Files Created and Saved with This Calculator”, page 17-27) can •
be displayed on the drawing screen.










