summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-02-28 15:36:24 +0100
committerSven Gothel <[email protected]>2014-02-28 15:36:24 +0100
commit9aba47241419a7115ebb638e4deb04322ff26d8b (patch)
treea731cd8773fa05bef7225987fa33bc334fcb6381
parent4701edd64be6a7c4e57d176344fb29ee71699744 (diff)
Bug 801: Drop TypecastRenderer's CUBIC mode if p3 is 'looped'
-rw-r--r--src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
index ef5c70401..b3a10700b 100644
--- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
+++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java
@@ -115,7 +115,7 @@ public class TypecastRenderer {
final Point p0 = glyph.getPoint(startIndex + offset%count);
final Point p1 = glyph.getPoint(startIndex + (offset+1)%count);
final Point p2 = glyph.getPoint(startIndex + (offset+2)%count);
- final Point p3 = glyph.getPoint(startIndex + (offset+3)%count);
+ final Point p3 = offset+3 < count ? glyph.getPoint(startIndex + offset+3) : null;
if( DEBUG ) {
System.err.println("GlyphShape<"+symbol+">: offset "+offset+" of "+count+"/"+totalPoints+" points");
final int pMIdx= (offset==0) ? startIndex+count-1 : startIndex+(offset-1)%count;
@@ -159,7 +159,7 @@ public class TypecastRenderer {
addShapeQuadTo(shape, vertexFactory, p1, p2);
offset+=2;
} else {
- if (p3.onCurve) {
+ if (null != p3 && p3.onCurve) {
// Branch-3: point.onCurve && !p1.onCurve && !p2.onCurve && p3.onCurve
if( DEBUG ) { System.err.println("B3 .. cubic-to p0-p1-p2-p3 **** CUBIC"); }
addShapeCubicTo(shape, vertexFactory, p1, p2, p3);