/** * Set the transform from a flat matrix. * * @param matrix The flat matrix. */ public void setTransform(final double[] matrix) { setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); }
/** Construct a transformed shape */ public TransformedShape(Shape shape, AffineTransform at) { this.shape = shape; setTransform(at); }
/** * Set the transform from a flat matrix. * * @param matrix The flat matrix. * @param offset The index of the first element to use in <code>matrix</code>. */ public void setTransform(final float[] matrix, int offset) { setTransform( matrix[offset], matrix[++offset], matrix[++offset], matrix[++offset], matrix[++offset], matrix[++offset]); }
TransformedShape tss = new TransformedShape(); tss.shape = original; tss.setTransform( AffineTransform.getScaleInstance( width / bounds.getWidth(), height / bounds.getHeight()));
/** * Set the transform from a flat matrix. * * @param matrix * The flat matrix. * @param offset * The index of the first element to use in <code>matrix</code>. */ public void setTransform(final float[] matrix, int offset) { setTransform(matrix[offset], matrix[++offset], matrix[++offset], matrix[++offset], matrix[++offset], matrix[++offset]); }
/** * Set the transform from a flat matrix. * * @param matrix * The flat matrix. * @param offset * The index of the first element to use in <code>matrix</code>. */ public void setTransform(final float[] matrix, int offset) { setTransform(matrix[offset], matrix[++offset], matrix[++offset], matrix[++offset], matrix[++offset], matrix[++offset]); }
/** * Set the transform from a flat matrix. * * @param matrix * The flat matrix. * */ public void setTransform(final double[] matrix) { setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); }
/** * Construct a transformed shape */ public TransformedShape(Shape shape, AffineTransform at) { this.shape = shape; setTransform(at); }
/** * Set the transform from a flat matrix. * * @param matrix * The flat matrix. * */ public void setTransform(final double[] matrix) { setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); }
TransformedShape tss = new TransformedShape(); tss.shape = original; tss.setTransform(AffineTransform.getScaleInstance(width / bounds.getWidth(), height / bounds.getHeight())); resized.setShape(tss); resized.setSize((int) height);