question: public static void describeShapeDetail ( Shape shape , double flattening ) { PathIterator pi2 = shape . getPathIterator ( null ) ; FlatteningPathIterator pi = new FlatteningPathIterator ( pi2 , flattening ) ; double [ ] coords = new double [ 6 ] ; int pointCount = 0 ; Debug . output ( " -- start describeShapeDetail with flattening[" + flattening + "]" ) ; while ( ! pi . isDone ( ) ) { int type = pi . currentSegment ( coords ) ; Debug . output ( " Shape point [" + type + "] (" + ( pointCount ++ ) + ") " + coords [ 0 ] + ", " + coords [ 1 ] ) ; pi . next ( ) ; } Debug . output ( " -- end (" + pointCount + ")" ) ; }
target:  Utility method that iterates over a Shape object and prints out the points. The flattening is used for a FlatteningPathIterator, controlling the scope of the path traversal.