Java examples for 2D Graphics:Path
returns the number path points of "path".
//package com.java2s; import java.awt.geom.PathIterator; import java.awt.geom.GeneralPath; public class Main { /** returns the number path points of "path". */ public static int getNumPathPoints(GeneralPath path) { int count = 0; for (PathIterator i = path.getPathIterator(null); !i.isDone(); i .next()) {//from w w w . j a va2s . c o m count++; } return count; } }