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/geom/Outline.java | |
parent | 1e6b604393509e631d46fe72053ca813aee33a74 (diff) |
Graph: Outline[Shape]: Add print()
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/geom/Outline.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/geom/Outline.java | 11 |
1 files changed, 11 insertions, 0 deletions
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); + } + } + } |