From b96b95e44e96dace30836c14704ca73ad3f22106 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 8 May 2011 05:37:07 +0200 Subject: TypecastRenderer: Avoid -y direction and later y-flipping / FIXME: math must be updated .. Rami ? --- .../graph/font/typecast/TypecastRenderer.java | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java index f3029b1e4..310b2b274 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java @@ -65,7 +65,7 @@ public class TypecastRenderer { t.setTransform(transform); char character = string.charAt(i); if (character == '\n') { - y -= advanceY; + y += advanceY; advanceTotal = 0; continue; } else if (character == ' ') { @@ -118,39 +118,39 @@ public class TypecastRenderer { Point point_plus2 = glyph.getPoint(startIndex + (offset+2)%count); if(offset == 0) { - gp.moveTo(point.x, -point.y); + gp.moveTo(point.x, point.y); } if (point.onCurve) { if (point_plus1.onCurve) { - // s = new Line2D.Float(point.x, -point.y, point_plus1.x, -point_plus1.y); - gp.lineTo( point_plus1.x, -point_plus1.y ); + // s = new Line2D.Float(point.x, point.y, point_plus1.x, point_plus1.y); + gp.lineTo( point_plus1.x, point_plus1.y ); offset++; } else { if (point_plus2.onCurve) { - // s = new QuadCurve2D.Float( point.x, -point.y, point_plus1.x, -point_plus1.y, point_plus2.x, -point_plus2.y); - gp.quadTo(point_plus1.x, -point_plus1.y, point_plus2.x, -point_plus2.y); + // s = new QuadCurve2D.Float( point.x, point.y, point_plus1.x, point_plus1.y, point_plus2.x, point_plus2.y); + gp.quadTo(point_plus1.x, point_plus1.y, point_plus2.x, point_plus2.y); offset+=2; } else { - // s = new QuadCurve2D.Float(point.x,-point.y,point_plus1.x,-point_plus1.y, - // midValue(point_plus1.x, point_plus2.x), -midValue(point_plus1.y, point_plus2.y)); - gp.quadTo(point_plus1.x, -point_plus1.y, midValue(point_plus1.x, point_plus2.x), -midValue(point_plus1.y, point_plus2.y)); + // s = new QuadCurve2D.Float(point.x,point.y,point_plus1.x,point_plus1.y, + // midValue(point_plus1.x, point_plus2.x), midValue(point_plus1.y, point_plus2.y)); + gp.quadTo(point_plus1.x, point_plus1.y, midValue(point_plus1.x, point_plus2.x), midValue(point_plus1.y, point_plus2.y)); offset+=2; } } } else { if (point_plus1.onCurve) { - // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), -midValue(point_minus1.y, point.y), - // point.x, -point.y, point_plus1.x, -point_plus1.y); - //gp.curve3(point_plus1.x, -point_plus1.y, point.x, -point.y); - gp.quadTo(point.x, -point.y, point_plus1.x, -point_plus1.y); + // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), midValue(point_minus1.y, point.y), + // point.x, point.y, point_plus1.x, point_plus1.y); + //gp.curve3(point_plus1.x, point_plus1.y, point.x, point.y); + gp.quadTo(point.x, point.y, point_plus1.x, point_plus1.y); offset++; } else { - // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), -midValue(point_minus1.y, point.y), point.x, -point.y, - // midValue(point.x, point_plus1.x), -midValue(point.y, point_plus1.y)); - //gp.curve3(midValue(point.x, point_plus1.x), -midValue(point.y, point_plus1.y), point.x, -point.y); - gp.quadTo(point.x, -point.y, midValue(point.x, point_plus1.x), -midValue(point.y, point_plus1.y)); + // s = new QuadCurve2D.Float(midValue(point_minus1.x, point.x), midValue(point_minus1.y, point.y), point.x, point.y, + // midValue(point.x, point_plus1.x), midValue(point.y, point_plus1.y)); + //gp.curve3(midValue(point.x, point_plus1.x), midValue(point.y, point_plus1.y), point.x, point.y); + gp.quadTo(point.x, point.y, midValue(point.x, point_plus1.x), midValue(point.y, point_plus1.y)); offset++; } } -- cgit v1.2.3