private void buildSegments() {
		PathIterator iterator = path.getPathIterator( null, 1 );
		double[] coords = new double[6];
		List<Point2D> segments = new ArrayList<>();
		Point2D previous = null;

		while( !iterator.isDone() ) {
			int type = iterator.currentSegment( coords );
			if( type == PathIterator.SEG_MOVETO || type == PathIterator.SEG_LINETO ) {
				Point2D point = new Point2D.Double( coords[0], coords[1] );
				if( previous == null || !previous.equals( point ) ) {
					segments.add( point );
					previous = point;
				}
			}
			iterator.next();
		}

		if( segments.size() == 1 ) {
			segments.add( previous );
		}

		this.segments = segments.toArray( new Point2D[segments.size()] );
	}