GSDP:GAM100/CProcessing/textBox()

From Inside
Jump to: navigation, search

textBox()

Description

Similar to the text() function but the last parameter defines a row width that the text cannot go beyond. Makes the text wrap to rows underneath the first.

Parameters

textBox( const char* text, float x, float y)

  • text - (const char *) The string to draw on the screen in font
  • x - (float) The x position to draw at. Left side of the first row.
  • y - (float) The y position to draw at. Bottom of first row.
  • row_width - (float) Defines the row width of the text box.

Example

{
    //Set a size for the text
    textSize(30.0f);

    // Set it to be red text
    fill(color(255, 0, 0, 255));

    // Draw the word TESTING in the upper left corner that will wrap a few lines
    textBox("TESTING", 0.0f, 30.0f, 50.0f);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>