Java Code Examples for java.awt.geom.Path2D#getPathIterator()

The following examples show how to use java.awt.geom.Path2D#getPathIterator() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Path2DCopyConstructor.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
static void testIterator(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at);
    final PathIterator itB = pathB.getPathIterator(at);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testIterator: " + n + " segments.");
}
 
Example 2
Source File: lineutility.java    From mil-sym-java with Apache License 2.0 5 votes vote down vote up
/**
 * same as createStrokedShape except it uses a Path2D
 *
 * @param shape
 * @return
 */
protected static Shape createStrokedShape2(Path2D shape) {
    GeneralPath newshape = new GeneralPath(); // Start with an empty shape
    try {
        // Iterate through the specified shape, perturb its coordinates, and
        // use them to build up the new shape.
        float[] coords = new float[6];
        for (PathIterator i = shape.getPathIterator(null); !i.isDone(); i.next()) {
            int type = i.currentSegment(coords);
            switch (type) {
                case PathIterator.SEG_MOVETO:
                    //perturb(coords, 2);
                    newshape.moveTo(coords[0], coords[1]);
                    break;
                case PathIterator.SEG_LINETO:
                    //perturb(coords, 2);
                    newshape.lineTo(coords[0], coords[1]);
                    break;
                case PathIterator.SEG_QUADTO:
                    //perturb(coords, 4);
                    newshape.quadTo(coords[0], coords[1], coords[2], coords[3]);
                    break;
                case PathIterator.SEG_CUBICTO:
                    //perturb(coords, 6);
                    newshape.curveTo(coords[0], coords[1], coords[2], coords[3],
                            coords[4], coords[5]);
                    break;
                case PathIterator.SEG_CLOSE:
                    newshape.closePath();
                    break;
            }

        }
    } catch (Exception exc) {
        ErrorLogger.LogException(_className, "createStrokedShape",
                new RendererException("Failed inside createStrokedShape", exc));
    }
    return newshape;
}
 
Example 3
Source File: Path2DCopyConstructor.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static void testEqual(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(null);
    final PathIterator itB = pathB.getPathIterator(null);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + " type are not equals [" + typeA + "|" + typeB + "] !");
        }
        if (!equalsArray(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testEqual: " + n + " segments.");
}
 
Example 4
Source File: Path2DCopyConstructor.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static void testFlattening(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at, FLATNESS);
    final PathIterator itB = pathB.getPathIterator(at, FLATNESS);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testFlattening: " + n + " segments.");
}
 
Example 5
Source File: Path2DCopyConstructor.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
static void testEqual(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(null);
    final PathIterator itB = pathB.getPathIterator(null);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + " type are not equals [" + typeA + "|" + typeB + "] !");
        }
        if (!equalsArray(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testEqual: " + n + " segments.");
}
 
Example 6
Source File: Path2DCopyConstructor.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static void testEqual(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(null);
    final PathIterator itB = pathB.getPathIterator(null);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + " type are not equals [" + typeA + "|" + typeB + "] !");
        }
        if (!equalsArray(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testEqual: " + n + " segments.");
}
 
Example 7
Source File: Path2DCopyConstructor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
static void testFlattening(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at, FLATNESS);
    final PathIterator itB = pathB.getPathIterator(at, FLATNESS);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testFlattening: " + n + " segments.");
}
 
Example 8
Source File: Path2DCopyConstructor.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
static void testIterator(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at);
    final PathIterator itB = pathB.getPathIterator(at);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testIterator: " + n + " segments.");
}
 
Example 9
Source File: AWT2Geometry.java    From gef with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Converts an AWT {@link Path2D} into a GEF {@link Path}.
 *
 * @param p
 *            the {@link Path2D} to convert
 * @return a new {@link Path}, which is constructed with the same winding
 *         rule and segments as the passed in {@link Path2D}.
 */
public static Path toPath(Path2D p) {
	PathIterator iterator = p.getPathIterator(null);
	Path path = new Path(p.getWindingRule() == Path2D.WIND_NON_ZERO
			? Path.WIND_NON_ZERO : Path.WIND_EVEN_ODD);
	while (!iterator.isDone()) {
		double[] segment = new double[6];
		int type = iterator.currentSegment(segment);
		switch (type) {
		case PathIterator.SEG_MOVETO:
			path.moveTo(segment[0], segment[1]);
			break;
		case PathIterator.SEG_LINETO:
			path.lineTo(segment[0], segment[1]);
			break;
		case PathIterator.SEG_QUADTO:
			path.quadTo(segment[0], segment[1], segment[2], segment[3]);
			break;
		case PathIterator.SEG_CUBICTO:
			path.cubicTo(segment[0], segment[1], segment[2], segment[3],
					segment[4], segment[5]);
			break;
		case PathIterator.SEG_CLOSE:
			path.close();
			break;
		}
		iterator.next();
	}
	return path;
}
 
Example 10
Source File: Path2DCopyConstructor.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static void testFlattening(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at, FLATNESS);
    final PathIterator itB = pathB.getPathIterator(at, FLATNESS);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testFlattening: " + n + " segments.");
}
 
Example 11
Source File: Path2DCopyConstructor.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
static void testIterator(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at);
    final PathIterator itB = pathB.getPathIterator(at);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testIterator: " + n + " segments.");
}
 
Example 12
Source File: Path2DCopyConstructor.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
static void testFlattening(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at, FLATNESS);
    final PathIterator itB = pathB.getPathIterator(at, FLATNESS);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testFlattening: " + n + " segments.");
}
 
Example 13
Source File: Path2DCopyConstructor.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
static void testFlattening(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at, FLATNESS);
    final PathIterator itB = pathB.getPathIterator(at, FLATNESS);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testFlattening: " + n + " segments.");
}
 
Example 14
Source File: Path2DCopyConstructor.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
static void testEqual(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(null);
    final PathIterator itB = pathB.getPathIterator(null);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + " type are not equals [" + typeA + "|" + typeB + "] !");
        }
        if (!equalsArray(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testEqual: " + n + " segments.");
}
 
Example 15
Source File: Path2DCopyConstructor.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
static void testFlattening(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at, FLATNESS);
    final PathIterator itB = pathB.getPathIterator(at, FLATNESS);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testFlattening: " + n + " segments.");
}
 
Example 16
Source File: Path2DCopyConstructor.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
static void testIterator(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at);
    final PathIterator itB = pathB.getPathIterator(at);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testIterator: " + n + " segments.");
}
 
Example 17
Source File: Path2DCopyConstructor.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
static void testEqual(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(null);
    final PathIterator itB = pathB.getPathIterator(null);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + " type are not equals [" + typeA + "|" + typeB + "] !");
        }
        if (!equalsArray(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testEqual: " + n + " segments.");
}
 
Example 18
Source File: Path2DCopyConstructor.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
static void testEqual(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(null);
    final PathIterator itB = pathB.getPathIterator(null);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + " type are not equals [" + typeA + "|" + typeB + "] !");
        }
        if (!equalsArray(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testEqual: " + n + " segments.");
}
 
Example 19
Source File: Path2DCopyConstructor.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
static void testIterator(Path2D pathA, Path2D pathB) {
    final PathIterator itA = pathA.getPathIterator(at);
    final PathIterator itB = pathB.getPathIterator(at);

    float[] coordsA = new float[6];
    float[] coordsB = new float[6];

    int n = 0;
    for (; !itA.isDone() && !itB.isDone(); itA.next(), itB.next(), n++) {
        int typeA = itA.currentSegment(coordsA);
        int typeB = itB.currentSegment(coordsB);

        if (typeA != typeB) {
            throw new IllegalStateException("Path-segment[" + n + "] "
                + "type are not equals [" + typeA + "|" + typeB + "] !");
        }
        // Take care of floating-point precision:
        if (!equalsArrayEps(coordsA, coordsB, getLength(typeA))) {
            throw new IllegalStateException("Path-segment[" + n + "] coords"
                + " are not equals [" + Arrays.toString(coordsA) + "|"
                + Arrays.toString(coordsB) + "] !");
        }
    }
    if (!itA.isDone() || !itB.isDone()) {
        throw new IllegalStateException("Paths do not have same lengths !");
    }
    log("testIterator: " + n + " segments.");
}
 
Example 20
Source File: StarPolygon.java    From pumpernickel with MIT License 4 votes vote down vote up
@Override
public PathIterator getPathIterator(AffineTransform at) {
	Path2D path = createPath2D();
	return path.getPathIterator(at);
}