fix text(char, x, y) with textAlignY

This commit is contained in:
benfry
2008-11-19 17:50:43 +00:00
parent 96c853e12a
commit b89efa5b8d

View File

@@ -2738,6 +2738,16 @@ public class PGraphics extends PImage implements PConstants {
if (textMode == SCREEN) loadPixels();
if (textAlignY == CENTER) {
y += textAscent() / 2;
} else if (textAlignY == TOP) {
y += textAscent();
} else if (textAlignY == BOTTOM) {
y -= textDescent();
//} else if (textAlignY == BASELINE) {
// do nothing
}
textBuffer[0] = c;
textLineAlignImpl(textBuffer, 0, 1, x, y);