ShapeTransformUtil { public static BezierCurve transformBezierCurve(BezierCurve bezierCurve, Matrix ctm) { return (BezierCurve) transformSegment(bezierCurve, ctm); }  static BezierCurve transformBezierCurve(BezierCurve bezierCurve, Matrix ctm); static Line transformLine(Line line, Matrix ctm); static Path transformPath(Path path, Matrix ctm);  }
@Test public void transformBezierCurveTest() { BezierCurve inBezierCurve = new BezierCurve(Arrays.asList(new Point(0, 0), new Point(0, 5), new Point(5, 5), new Point(5, 0))); Matrix ctm = new Matrix(1, 0, 0, 1, 5, 5); BezierCurve outBezierCurve = ShapeTransformUtil.transformBezierCurve(inBezierCurve, ctm); BezierCurve cmpBezierCurve = new BezierCurve(Arrays.asList(new Point(-5, -5), new Point(-5, 0), new Point(0, 0), new Point(0, -5))); Assert.assertArrayEquals(cmpBezierCurve.getBasePoints().toArray(), outBezierCurve.getBasePoints().toArray()); }