Closed GoogleCodeExporter closed 9 years ago
Probably should also grab and set the alignment. If the user has the textAlign
set to CENTER, the label is going to be in the wrong place.
PFont loadedFont = theApplet.g.textFont;
float loadedSize = theApplet.g.textSize;
int loadedAlign = theApplet.g.textAlign;
theApplet.textAlign(theApplet.LEFT);
....
theApplet.textFont(loadedFont, loadedSize);
theApplet.textAlign(loadedAlign);
Don't know if mode would also be needed. Not sure that get's changed much.
Original comment by jeffgem...@gmail.com
on 23 Aug 2012 at 5:37
Found out you also have to check to make sure the PFont is not null. I did
this, which will force the "defaultFontOrDeath()" to run if it's null. Looks
like this (file attached):
PFont loadedFont = theApplet.g.textFont;
float loadedSize = theApplet.g.textSize;
if (loadedFont == null) {
theApplet.textSize(loadedSize); //forces default font
loadedFont = theApplet.g.textFont;
}
Original comment by jeffgem...@gmail.com
on 23 Aug 2012 at 7:41
Attachments:
implemented with 0.7.6
Original comment by soj...@gmail.com
on 26 Aug 2012 at 3:01
Original issue reported on code.google.com by
jeffgem...@gmail.com
on 23 Aug 2012 at 2:41