text() - coordinates-reference-point and textSize() confusion

edited June 2017 in Questions about Code

Hello everyone,

having started with Processing recently I have the following confusion I have been struggling to explain to myself:

Assuming, that the coordinate reference point of (x, y) in text("text", x, y) is the bottom left corner of the "textbox", I thought that if the textSize exceeds the y-coordinate the text would be cropped on top, for example:


text("Hello world", 50, 50);

For my understanding "Hello world" would have to be cropped on the top of the sketch-window as 50<55. But - it is not. For text("Hello world", 50, 40);it touches the top boundary of the sketch-window.

Would anyone possibly mind to correct my misconception about the use of text() and textSize()?

Thank you so much in advance.


Sign In or Register to comment.