@Test public void transformFloatArrayTest() { AffineTransform affineTransform = new AffineTransform(1f, 2f, 3f, 4f, 5f, 6f); float[] expected = new float[]{0f, 13f, 18f, 13f, 18f, 0f}; float[] src = new float[]{2f, 2f, 2f, 2f, 2f, 2f}; float[] dest = new float[6]; affineTransform.transform(src, 1, dest, 1, 2); Assert.assertArrayEquals(expected, dest, 0); }
public Point transform(Point src, Point dst) { if (dst == null) { dst = new Point(); } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); return dst; }
AffineTransform implements Cloneable, Serializable { public Point transform(Point src, Point dst) { if (dst == null) { dst = new Point(); } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); return dst; } }
AffineTransform implements Cloneable, Serializable { public Point transform(Point src, Point dst) { if (dst == null) { dst = new Point(); } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); return dst; } AffineTransform();  AffineTransform(AffineTransform t);  AffineTransform(double m00, double m10, double m01, double m11, double m02, double m12);  AffineTransform(float[] matrix);  AffineTransform(double[] matrix); }
AffineTransform implements Cloneable, Serializable { public Point transform(Point src, Point dst) { if (dst == null) { dst = new Point(); } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); return dst; } AffineTransform();  AffineTransform(AffineTransform t);  AffineTransform(double m00, double m10, double m01, double m11, double m02, double m12);  AffineTransform(float[] matrix);  AffineTransform(double[] matrix); int getType(); double getScaleX(); double getScaleY(); double getShearX(); double getShearY(); double getTranslateX(); double getTranslateY(); boolean isIdentity(); void getMatrix(float[] matrix); void getMatrix(double[] matrix); double getDeterminant(); void setTransform(float m00, float m10, float m01, float m11, float m02, float m12); void setTransform(double m00, double m10, double m01, double m11, double m02, double m12); void setTransform(AffineTransform t); void setToIdentity(); void setToTranslation(double mx, double my); void setToScale(double scx, double scy); void setToShear(double shx, double shy); void setToRotation(double angle); void setToRotation(double angle, double px, double py); static AffineTransform getTranslateInstance(double mx, double my); static AffineTransform getScaleInstance(double scx, double scY); static AffineTransform getShearInstance(double shx, double shy); static AffineTransform getRotateInstance(double angle); static AffineTransform getRotateInstance(double angle, double x, double y); void translate(double mx, double my); void scale(double scx, double scy); void shear(double shx, double shy); void rotate(double angle); void rotate(double angle, double px, double py); void concatenate(AffineTransform t); void preConcatenate(AffineTransform t); AffineTransform createInverse(); Point transform(Point src, Point dst); void transform(Point[] src, int srcOff, Point[] dst, int dstOff, int length); void transform(double[] src, int srcOff, double[] dst, int dstOff, int length); void transform(float[] src, int srcOff, float[] dst, int dstOff, int length); void transform(float[] src, int srcOff, double[] dst, int dstOff, int length); void transform(double[] src, int srcOff, float[] dst, int dstOff, int length); Point deltaTransform(Point src, Point dst); void deltaTransform(double[] src, int srcOff, double[] dst, int dstOff, int length); Point inverseTransform(Point src, Point dst); void inverseTransform(double[] src, int srcOff, double[] dst, int dstOff, int length); void inverseTransform(float[] src, int srcOff, float[] dst, int dstOff, int length); @Override AffineTransform clone(); @Override boolean equals(Object o); @Override int hashCode(); }
AffineTransform implements Cloneable, Serializable { public Point transform(Point src, Point dst) { if (dst == null) { dst = new Point(); } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); return dst; } AffineTransform();  AffineTransform(AffineTransform t);  AffineTransform(double m00, double m10, double m01, double m11, double m02, double m12);  AffineTransform(float[] matrix);  AffineTransform(double[] matrix); int getType(); double getScaleX(); double getScaleY(); double getShearX(); double getShearY(); double getTranslateX(); double getTranslateY(); boolean isIdentity(); void getMatrix(float[] matrix); void getMatrix(double[] matrix); double getDeterminant(); void setTransform(float m00, float m10, float m01, float m11, float m02, float m12); void setTransform(double m00, double m10, double m01, double m11, double m02, double m12); void setTransform(AffineTransform t); void setToIdentity(); void setToTranslation(double mx, double my); void setToScale(double scx, double scy); void setToShear(double shx, double shy); void setToRotation(double angle); void setToRotation(double angle, double px, double py); static AffineTransform getTranslateInstance(double mx, double my); static AffineTransform getScaleInstance(double scx, double scY); static AffineTransform getShearInstance(double shx, double shy); static AffineTransform getRotateInstance(double angle); static AffineTransform getRotateInstance(double angle, double x, double y); void translate(double mx, double my); void scale(double scx, double scy); void shear(double shx, double shy); void rotate(double angle); void rotate(double angle, double px, double py); void concatenate(AffineTransform t); void preConcatenate(AffineTransform t); AffineTransform createInverse(); Point transform(Point src, Point dst); void transform(Point[] src, int srcOff, Point[] dst, int dstOff, int length); void transform(double[] src, int srcOff, double[] dst, int dstOff, int length); void transform(float[] src, int srcOff, float[] dst, int dstOff, int length); void transform(float[] src, int srcOff, double[] dst, int dstOff, int length); void transform(double[] src, int srcOff, float[] dst, int dstOff, int length); Point deltaTransform(Point src, Point dst); void deltaTransform(double[] src, int srcOff, double[] dst, int dstOff, int length); Point inverseTransform(Point src, Point dst); void inverseTransform(double[] src, int srcOff, double[] dst, int dstOff, int length); void inverseTransform(float[] src, int srcOff, float[] dst, int dstOff, int length); @Override AffineTransform clone(); @Override boolean equals(Object o); @Override int hashCode(); static final int TYPE_IDENTITY; static final int TYPE_TRANSLATION; static final int TYPE_UNIFORM_SCALE; static final int TYPE_GENERAL_SCALE; static final int TYPE_QUADRANT_ROTATION; static final int TYPE_GENERAL_ROTATION; static final int TYPE_GENERAL_TRANSFORM; static final int TYPE_FLIP; static final int TYPE_MASK_SCALE; static final int TYPE_MASK_ROTATION; }