tab fixes and hack for text with a z coord

This commit is contained in:
benfry
2005-04-19 02:34:51 +00:00
parent 6f6368ee06
commit 1dd37803dc
6 changed files with 65 additions and 144 deletions

View File

@@ -1601,6 +1601,8 @@ public class PGraphics extends PImage implements PConstants {
public void text(char c, float x, float y) {
text(c, x, y, 0);
/*
if (textFont != null) {
if (textMode == SCREEN) loadPixels();
textFont.text(c, x, y, this);
@@ -1609,6 +1611,7 @@ public class PGraphics extends PImage implements PConstants {
} else {
throw new RuntimeException("use textFont() before text()");
}
*/
}
@@ -1637,6 +1640,9 @@ public class PGraphics extends PImage implements PConstants {
public void text(String s, float x, float y) {
text(s, x, y, 0);
/*
text(s, x, y, 0);
if (textFont != null) {
if (textMode == SCREEN) loadPixels();
textFont.text(s, x, y, this);
@@ -1644,6 +1650,7 @@ public class PGraphics extends PImage implements PConstants {
} else {
throw new RuntimeException("use textFont() before text()");
}
*/
}
@@ -1680,6 +1687,11 @@ public class PGraphics extends PImage implements PConstants {
* ignored.
*/
public void text(String s, float x1, float y1, float x2, float y2) {
text(s, x1, y1, x2, y2, 0);
}
public void text(String s, float x1, float y1, float x2, float y2, float z) {
if (textFont != null) {
float hradius, vradius;
switch (rectMode) {
@@ -1709,7 +1721,7 @@ public class PGraphics extends PImage implements PConstants {
float temp = y1; y1 = y2; y2 = temp;
}
if (textMode == SCREEN) loadPixels();
textFont.text(s, x1, y1, x2, y2, this);
textFont.text(s, x1, y1, x2, y2, z, this);
if (textMode == SCREEN) updatePixels();
} else {
@@ -1718,11 +1730,6 @@ public class PGraphics extends PImage implements PConstants {
}
public void text(String s, float x1, float y1, float x2, float y2, float z) {
depthErrorXYZ("text");
}
public void text(int num, float x, float y) {
text(String.valueOf(num), x, y);
}