textAlign(CENTER, CENTER); bug
in
Core Library Questions
•
1 year ago
On screen the text is perfect int the center, in the pdf it is not.
Is there a way to solve this problem?
- import processing.pdf.*;
- PFont font;
- void setup() {
- size(600, 600);
- font = createFont("SansSerif", 15);
- smooth();
- noLoop();
- }
- void draw() {
- beginRecord(PDF, "output.pdf");
- textFont(font);
- textSize(15);
- textAlign(CENTER, CENTER);
- translate(width/2, height/2);
- ellipse(0, 0, 70, 70);
- fill(0);
- text("1140", 0, 0);
- endRecord();
- }
1