diff options
author | wizard23 <wizard23@cb376a5e-1013-0410-a455-b6b1f9ac8223> | 2008-06-25 02:09:20 +0000 |
---|---|---|
committer | wizard23 <wizard23@cb376a5e-1013-0410-a455-b6b1f9ac8223> | 2008-06-25 02:09:20 +0000 |
commit | a9cc6827b39df3c1794eaa4f2689e5188d6a189e (patch) | |
tree | 3ade6bd7a6476bd19e78a0b4d93390692bee9d2d | |
parent | 72c7b7baf551fd77fb8bb2b8604fc3a131cd769c (diff) | |
download | reprap-backup-a9cc6827b39df3c1794eaa4f2689e5188d6a189e.tar.gz reprap-backup-a9cc6827b39df3c1794eaa4f2689e5188d6a189e.zip |
load the font only once in setup() instead of each time in draw()
git-svn-id: https://reprap.svn.sourceforge.net/svnroot/reprap@1662 cb376a5e-1013-0410-a455-b6b1f9ac8223
-rw-r--r-- | trunk/users/hoeken/arduino/GCode_Host/GCode_Host.pde | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/trunk/users/hoeken/arduino/GCode_Host/GCode_Host.pde b/trunk/users/hoeken/arduino/GCode_Host/GCode_Host.pde index ba4d2bc7..5464b0e1 100644 --- a/trunk/users/hoeken/arduino/GCode_Host/GCode_Host.pde +++ b/trunk/users/hoeken/arduino/GCode_Host/GCode_Host.pde @@ -16,6 +16,8 @@ String gcode[] = { }; int gcodeIndex = 0; +PFont font; + void setup() { //init stuff @@ -30,6 +32,8 @@ void setup() //load our gcode lines gcode = loadStrings("job.gcode"); //println(gcode); + + font = loadFont("ArialMT-48.vlw"); } void draw() @@ -95,8 +99,7 @@ void draw() finished = false; } - PFont font; - font = loadFont("ArialMT-48.vlw"); + textFont(font, 16); String temp = "Temperature: " + temperature + "C"; text(temp, 10, 20); |