GSDP:GAM100/CProcessing/textSize()

From Inside
< GSDP:GAM100‎ | CProcessing
Revision as of 10:10, 8 July 2019 by >Zachary.logsdon
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

textSize()

Description

The textSize() function scales up the size of the input font.

Parameters

textSize(float size)

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

Example

{
    // Draw a white background
    background(color(255, 255, 255, 255));

    //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
    text("TESTING", 0.0f, 30.0f);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>