這裏沒有顯示出來的是我編輯在Eclipse中我的處理程序:文本在處理
import processing.core.PApplet;
@SuppressWarnings("serial")
public class ProcessingDebugGUI extends PApplet {
public void setup() {
textFont(loadFont("Candara-48.vlw"));
fill(0, 102, 153);
text("Increasing", 10, 20, 70, 70);
text("Decreasing", 10, 40);
size(200, 200);
background(200);
}
public void draw() {
stroke(255);
if (mousePressed) {
line(mouseX, mouseY, pmouseX, pmouseY);
}
}
}
文字顯示不出來,但除了它工作正常。 (用戶可以用鼠標在小程序上繪製白色像素。)
我試圖從this工作。
我從Processing的「創建字體」命令創建了「Candara-48.vlw」文件,然後將它放在eclipse workspace\projectName\bin\data
中。
我在做什麼錯?
解決方案:將text()
調用移動到draw()
。