summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve/text
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-09 14:25:59 +0200
committerSven Gothel <[email protected]>2011-05-09 14:25:59 +0200
commit1303328b476570d94e56c9d2fc061e3b09cf538a (patch)
tree4781aab739a4c321fefc92e872d3817b44b787b9 /src/jogl/classes/jogamp/graph/curve/text
parent4ccf5ed0cc14743a3a97d7b0dcc61e839d263a1a (diff)
Loop: Fix invert; GlyphString/createRegion: Remove unnecessary on-the-fly object creation
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/text')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/text/GlyphString.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java b/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java
index 53a3ec5e0..cd6cd56aa 100644
--- a/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java
+++ b/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java
@@ -152,20 +152,19 @@ public class GlyphString {
// region.setFlipped(true);
int numVertices = region.getNumVertices();
- ArrayList<Triangle> tris = new ArrayList<Triangle>();
for(int i=0; i< glyphs.size(); i++) {
final GlyphShape glyph = glyphs.get(i);
ArrayList<Triangle> gtris = glyph.triangulate();
- tris.addAll(gtris);
+ region.addTriangles(gtris);
- ArrayList<Vertex> gVertices = glyph.getVertices();
+ final ArrayList<Vertex> gVertices = glyph.getVertices();
for(int j=0; j<gVertices.size(); j++) {
- gVertices.get(j).setId(numVertices++);
+ final Vertex gVert = gVertices.get(j);
+ gVert.setId(numVertices++);
+ region.addVertex(gVert);
}
- region.addVertices(gVertices);
}
- region.addTriangles(tris);
return region;
}