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

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -