aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java15
-rw-r--r--src/jogl/classes/com/jogamp/graph/geom/Outline.java11
2 files changed, 26 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java
index eb6548838..805db522b 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java
@@ -27,6 +27,7 @@
*/
package com.jogamp.graph.curve;
+import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -1135,4 +1136,18 @@ public final class OutlineShape implements Comparable<OutlineShape> {
// Avoid calling this.hashCode() !
return getClass().getName() + "@" + Integer.toHexString(super.hashCode());
}
+
+ public void print(final PrintStream out) {
+ final int oc = getOutlineCount();
+ for (int oi = 0; oi < oc; oi++) {
+ final Outline outline = getOutline(oi);
+ final int vc = outline.getVertexCount();
+ out.printf("- OL[%d]: %s%n", vc, outline.getWinding());
+ for(int vi=0; vi < vc; vi++) {
+ final Vertex v = outline.getVertex(vi);
+ out.printf("-- OS[%d][%d]: %s%n", oi, vi, v);
+ }
+ }
+ }
+
}
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Outline.java b/src/jogl/classes/com/jogamp/graph/geom/Outline.java
index b593c20be..522919cc6 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/Outline.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/Outline.java
@@ -27,6 +27,7 @@
*/
package com.jogamp.graph.geom;
+import java.io.PrintStream;
import java.util.ArrayList;
import com.jogamp.math.FloatUtil;
@@ -362,4 +363,14 @@ public class Outline implements Comparable<Outline> {
// Avoid calling this.hashCode() !
return getClass().getName() + "@" + Integer.toHexString(super.hashCode());
}
+
+ public void print(final PrintStream out) {
+ final int vc = getVertexCount();
+ out.printf("Outline: %d, %s%n", vc, getWinding());
+ for(int vi=0; vi < vc; vi++) {
+ final Vertex v = getVertex(vi);
+ out.printf("- OL[%d]: %s%n", vi, v);
+ }
+ }
+
}