putText()putText() places a string at a given location on the sketch. It starts from the given location and writes the string to the right. It does not do any text wrapping, it just places a line of text.
putText(text, x, y, mode, safetyOverride)
text: The text to be displayed
x: The X coordinate of the leftmost character.
y: the Y coordinate of the leftmost character.
mode: optional - eitherSCREENorCHAR. Controls which coordinate mode to use.
safetyOverride: optional - Either true or false. By default set to false. IfsafetyOverrideis false, any character intextthat is also innotAllowedCharacterswill not be drawn. It may be less readable, but it won’t break anything.
Nothing
putText('a b c (d)', 3, 3, CHAR, false)
output:
######################
######################
######################
###a#b#c##d###########
######################
######################
putText('a b c (d)', 3, 3, CHAR, true)
output:
######################
######################
######################
###a b c (d)##########
######################
######################