Processing Java: Align text and ellipse

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

Sign In or Register to comment.