working with text()

edited May 2016 in How To...

I was wondering, is there a way to work with text() and have your sentences written in multiple lines

"like

this

example"

instead of

"like this example"

I read that it's possible to make a box using two more var. in text() but my text is all oriented by the center, and apparently, this method only allow me to orient it by the top left edge.(tried imageMode(CENTER); and textAlign(CENTER) none of them seem to affect the text using a box to wrap inside it.

SO, is there another way to do that OR there is a way I can use the box AND still orient it by the center? Thank you for your time :)

Answers

  • Answer ✓

    You can say \n

    for line break

  • oh my... I knew it was something like that but I thought I was inventing stuff.. just out of curiosity now, is there a way to use the box thing with text() that I described and have it take the center of the whole text instead of just the left-top edge?

    thanks a lot Chrisir, you're awesome

  • I don't know, sorry

  • Answer ✓

    it of course depends from the length of each word, but this is centered, so it works.

    size (800, 600); 
    
    imageMode(CENTER); 
    
    textAlign(CENTER);
    
    
    text ("likeVVV this example", 120, 20, 52, 300 );
    
  • thanks again, got it working now ;)

Sign In or Register to comment.