@@ -3475,7 +3475,7 @@ public void text(char c, float x, float y) {
3475
3475
defaultFontOrDeath ("text" );
3476
3476
}
3477
3477
3478
- int sign = glCoordsEnabled ? + 1 : - 1 ;
3478
+ int sign = glCoordsEnabled ? - 1 : + 1 ;
3479
3479
3480
3480
if (textAlignY == CENTER ) {
3481
3481
y += sign * textAscent () / 2 ;
@@ -3498,7 +3498,7 @@ public void text(String str, float x, float y) {
3498
3498
defaultFontOrDeath ("text" );
3499
3499
}
3500
3500
3501
- int sign = glCoordsEnabled ? + 1 : - 1 ;
3501
+ int sign = glCoordsEnabled ? - 1 : + 1 ;
3502
3502
3503
3503
int length = str .length ();
3504
3504
if (length > textBuffer .length ) {
@@ -3550,7 +3550,7 @@ public void text(String str, float x1, float y1, float x2, float y2) {
3550
3550
defaultFontOrDeath ("text" );
3551
3551
}
3552
3552
3553
- int sign = glCoordsEnabled ? + 1 : - 1 ;
3553
+ int sign = glCoordsEnabled ? - 1 : + 1 ;
3554
3554
3555
3555
float hradius , vradius ;
3556
3556
switch (rectMode ) {
@@ -3627,21 +3627,23 @@ public void text(String str, float x1, float y1, float x2, float y2) {
3627
3627
3628
3628
if (textAlignY == CENTER ) {
3629
3629
float lineHigh = textAscent () + textLeading * (lineCount - 1 );
3630
- float y = glCoordsEnabled ? y1 + textAscent () + (boxHeight - lineHigh ) / 2 : y2 - textAscent () - (boxHeight - lineHigh ) / 2 ;
3630
+ float y = glCoordsEnabled ? y2 - textAscent () - (boxHeight - lineHigh ) / 2 :
3631
+ y1 + textAscent () + (boxHeight - lineHigh ) / 2 ;
3631
3632
for (int i = 0 ; i < lineCount ; i ++) {
3632
3633
textLineAlignImpl (textBuffer , textBreakStart [i ], textBreakStop [i ], lineX , y );
3633
3634
y += sign * textLeading ;
3634
3635
}
3635
3636
3636
3637
} else if (textAlignY == BOTTOM ) {
3637
- float y = glCoordsEnabled ? y2 - textDescent () - textLeading * (lineCount - 1 ) : y1 + textDescent () + textLeading * (lineCount - 1 );
3638
+ float y = glCoordsEnabled ? y1 + textDescent () + textLeading * (lineCount - 1 ) :
3639
+ y2 - textDescent () - textLeading * (lineCount - 1 );
3638
3640
for (int i = 0 ; i < lineCount ; i ++) {
3639
3641
textLineAlignImpl (textBuffer , textBreakStart [i ], textBreakStop [i ], lineX , y );
3640
3642
y += sign * textLeading ;
3641
3643
}
3642
3644
3643
3645
} else { // TOP or BASELINE just go to the default
3644
- float y = glCoordsEnabled ? y1 + textAscent () : y2 - textAscent ();
3646
+ float y = glCoordsEnabled ? y2 - textAscent () : y1 + textAscent ();
3645
3647
for (int i = 0 ; i < lineCount ; i ++) {
3646
3648
textLineAlignImpl (textBuffer , textBreakStart [i ], textBreakStop [i ], lineX , y );
3647
3649
y += sign * textLeading ;
0 commit comments