diff options
author | Sven Göthel <[email protected]> | 2024-02-11 19:48:48 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-02-11 19:48:48 +0100 |
commit | 499d8474247053f47e1f217f5e78fc0f5397f2d9 (patch) | |
tree | d982f181ded0b964bce9f15a14aba59c57bce968 /src/jogl/classes/com/jogamp/graph/curve | |
parent | 1e6b604393509e631d46fe72053ca813aee33a74 (diff) |
Graph: Outline[Shape]: Add print()
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java | 15 |
1 files changed, 15 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); + } + } + } + } |