Processing Java: Align text and ellipse -


i trying align string of text , ellipse vertically in processing. although both textalign , ellipsemode set center, there still slight offset between text , 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); } 

instead of textalign(center), specifies horizontal alignment, used textalign(center, center), guarantees text aligned both horizontally, , vertically.


Comments

Popular posts from this blog

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -