mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 18:35:37 +01:00
fix text(char, x, y) with textAlignY
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user