List of usage examples for java.awt.geom AffineTransform AffineTransform
public AffineTransform(double[] flatmatrix)
From source file:DefaultGraphics2D.java
/** * Sets the <code>Transform</code> in the <code>Graphics2D</code> context. * /*from w w w.ja v a2 s . c o m*/ * @param Tx * the <code>AffineTransform</code> object to be used in the * rendering process * @see #transform * @see AffineTransform */ public void setTransform(AffineTransform Tx) { transform = new AffineTransform(Tx); invalidateTransformStack(); if (!Tx.isIdentity()) transformStack.add(TransformStackElement.createGeneralTransformElement(Tx)); }
From source file:DefaultGraphics2D.java
/** * Returns a copy of the current <code>Transform</code> in the * <code>Graphics2D</code> context. * /*from ww w . ja v a 2s .co m*/ * @return the current <code>AffineTransform</code> in the * <code>Graphics2D</code> context. * @see #transform * @see #setTransform */ public AffineTransform getTransform() { return new AffineTransform(transform); }
From source file:DefaultGraphics2D.java
/** * Multiplies two 2x3 matrices of double precision values *//*from w ww . j av a 2 s. c o m*/ private double[] matrixMultiply(double[] matrix1, double[] matrix2) { double[] product = new double[6]; AffineTransform transform1 = new AffineTransform(matrix1); transform1.concatenate(new AffineTransform(matrix2)); transform1.getMatrix(product); return product; }