diff --git a/core/PConstants.java b/core/PConstants.java index adfabdc11..a84c3e198 100644 --- a/core/PConstants.java +++ b/core/PConstants.java @@ -201,12 +201,13 @@ public interface PConstants { // text placement modes - //static final int SCREEN = 1 << 7; // exists elsewhere /** * textMode(MODEL) is the default, meaning that characters - * will be drawn in model space. + * will be affected by transformations like any other shapes. + *
+ * Changed value in 0093 to not interfere with LEFT, CENTER, and RIGHT. */ - static final int MODEL = 3; + static final int MODEL = 4; /** * textMode(SHAPE) draws text using the the glyph outlines of @@ -216,9 +217,9 @@ public interface PConstants { * after calling textFont(). * * Currently, textMode(SHAPE) is only supported by OPENGL mode. - * It also requires Java 1.3 or higher. + * It also requires Java 1.2 or higher. */ - static final int SHAPE = 4; + static final int SHAPE = 5; // text alignment modes diff --git a/core/PGraphics.java b/core/PGraphics.java index 0993d824e..3efdbbff6 100644 --- a/core/PGraphics.java +++ b/core/PGraphics.java @@ -583,8 +583,10 @@ public class PGraphics extends PImage implements PConstants { strokeWeight(ONE); //strokeCap(SQUARE); - strokeCap(ROUND); - strokeJoin(MITER); + try { + strokeCap(ROUND); + strokeJoin(MITER); + } catch (RuntimeException e) { } // P3D will complain background(204); @@ -1726,8 +1728,10 @@ public class PGraphics extends PImage implements PConstants { * textMode(SCREEN), because it uses the pixels directly from the font. */ public void textMode(int mode) { - if ((mode == LEFT) || (mode == CENTER) || (mode == RIGHT)) { - throw new RuntimeException("textMode() is now textAlign() in Processing beta"); + // CENTER and MODEL overlap (they're both 3) + if ((mode == LEFT) || (mode == RIGHT)) { + throw new RuntimeException("textMode() is now textAlign() " + + "in Processing beta"); } if ((mode != SCREEN) && (mode != MODEL)) { throw new RuntimeException("Only textMode(SCREEN) or textMode(MODEL) " +