From fc5b810cb210f22572815642cdc810c7dc472319 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 8 May 2011 05:36:01 +0200 Subject: Graph/GLyph*: Add static factory method for non Renderer creation, separating text->OutlineShape and OutlineShape->Region step. --- src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java') diff --git a/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java b/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java index 749292297..b6f37a610 100644 --- a/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java +++ b/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java @@ -72,16 +72,14 @@ public class GlyphShape { public final Vertex.Factory vertexFactory() { return shape.vertexFactory(); } - private void addVertexToLastOutline(Vertex vertex){ + private void addVertexToLastOutline(Vertex vertex) { shape.addVertex(vertex); } private void addOutlineVerticesFromGlyphVector(float[] coords, int segmentType){ switch(segmentType) { case PathIterator.SEG_MOVETO: - if(!shape.getLastOutline().isEmpty()){ - shape.addEmptyOutline(); - } + shape.addEmptyOutline(); addVertexToLastOutline(vertexFactory().create(coords, 0, 2, true)); numVertices++; break; @@ -108,6 +106,10 @@ public class GlyphShape { } } + public OutlineShape getShape() { + return shape; + } + public int getNumVertices() { return numVertices; } -- cgit v1.2.3