We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am trying to align a string of text and an ellipse vertically in Processing. Although both textAlign and ellipseMode are all set to CENTER, there is still a slight offset between the text and the ellipse.
void setup()
{
size(200, 200);
background(255);
textAlign(CENTER);
ellipseMode(CENTER);
noStroke();
smooth();
fill(0);
text("Document 1.txt", 60, 20);
fill(255, 0, 0);
ellipse(120, 20, 10, 10);
}
Answers
https://processing.org/reference/textAlign_.html
For vertical align, you need two parameters.