Java 2D Graphics 3.2.2 java.awt.geom.PathIterator A Shape’s border
Java 2D Graphics 3.2.2 java.awt.geom.PathIterator A Shape’s border is represented by something called a path. A path is simply a series of instructions, like a set of directions for getting from one place to another. The instructions describe each segment, or piece, of the path. You could describe the outline of a square with a set of instructions like this: 1. Move to 0, 0. 2. Draw a line to 72, 0. 3. Draw a line to 72, 72. 4. Draw a line to 0, 72. 5. Draw a line back to 0, 0. In Java 2D, the segments of a path are encapsulated by the java.awt.geom.PathIteratorinterface. You can get an object that describes the outline of a Shape by calling the Shape’s getPathIterator() method. PathIterator allows you to walk through the segments of a path. A Path-Iterator is designed to work like a java.util.Enumeration. When you first obtain a PathIterator, it is positioned at the beginning of the path, and you can move through the different segments of the path until you reach the end of the path. Note that PathIterator is read-only: it describes a path but doesn’t let you change it. 3.2.2.1 Path segments The PathIterator interface defines constants representing the five possible segment types: public static final int SEG_MOVETO This segment type is used to update the location of the path without drawing anything. page 30
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Tomcat Web Hosting services