private int current;
private int current = 0;
	public PathIterator getPathIterator(final AffineTransform at) {		return new PathIterator() {			/** Current coordinate. */			private int current;			public int getWindingRule() {				return WIND_NON_ZERO;			}			public boolean isDone() {				return current >= 2;			}			public void next() {				current++;			}			public int currentSegment(float[] coords) {				int result;				switch (current) {					case 0 :						coords[0] = (float) getX1();						coords[1] = (float) getY1();						result = SEG_MOVETO;						break;					case 1 :						coords[0] = (float) getX2();						coords[1] = (float) getY2();						result = SEG_LINETO;						break;					default :						throw new NoSuchElementException("line iterator out of bounds");				}				if (at != null)					at.transform(coords, 0, coords, 0, 1);				return result;			}			public int currentSegment(double[] coords) {				int result;				switch (current) {					case 0 :						coords[0] = getX1();						coords[1] = getY1();						result = SEG_MOVETO;						break;					case 1 :						coords[0] = getX2();						coords[1] = getY2();						result = SEG_LINETO;						break;					default :						throw new NoSuchElementException("line iterator out of bounds");				}				if (at != null)					at.transform(coords, 0, coords, 0, 1);				return result;			}		};	}