public void concatenate(AffineTransform xform) { inverse = null; transform.concatenate(xform); fireStateChanged(); } public void preConcatenate(AffineTransform xform) {
/** * rotates the current transform at the supplied points * @param radians angle by which to rotate the supplied coordinates * @param x the x coordinate of the point to transform * @param y the y coordinate of the point to transform */ public void rotate(double radians, double x, double y) { inverse = null; transform.rotate(radians, x, y); fireStateChanged(); }
/** * Apply the passed values to the current Transform * @param offsetx the x-value * @param offsety the y-value */ public void translate(double offsetx, double offsety) { inverse = null; transform.translate(offsetx, offsety); fireStateChanged(); }
/** * Apply the passed values to the current Transform * * @param offsetx the x-value * @param offsety the y-value */ public void translate(double offsetx, double offsety) { inverse = null; transform.translate(offsetx, offsety); fireStateChanged(); }
/** * rotates the current transform at the supplied points * * @param radians angle by which to rotate the supplied coordinates * @param x the x coordinate of the point to transform * @param y the y coordinate of the point to transform */ public void rotate(double radians, double x, double y) { inverse = null; transform.rotate(radians, x, y); fireStateChanged(); }
public void concatenate(AffineTransform xform) { inverse = null; transform.concatenate(xform); fireStateChanged(); }
public void setToIdentity() { inverse = null; transform.setToIdentity(); fireStateChanged(); } }
public void preConcatenate(AffineTransform xform) { inverse = null; transform.preConcatenate(xform); fireStateChanged(); }
public void preConcatenate(AffineTransform xform) { inverse = null; transform.preConcatenate(xform); fireStateChanged(); }
public void setToIdentity() { inverse = null; transform.setToIdentity(); fireStateChanged(); } }
/** * setter for the scale * fires a PropertyChangeEvent with the AffineTransforms representing * the previous and new values for scale and offset * @param scalex the amount to scale in the x direction * @param scaley the amount to scale in the y direction * @param from the point to transform */ public void scale(double scalex, double scaley, Point2D from) { AffineTransform xf = AffineTransform.getTranslateInstance(from.getX(),from.getY()); xf.scale(scalex, scaley); xf.translate(-from.getX(), -from.getY()); inverse = null; transform.preConcatenate(xf); fireStateChanged(); }
/** * setter for the scale fires a PropertyChangeEvent with the AffineTransforms representing the * previous and new values for scale and offset * * @param scalex the amount to scale in the x direction * @param scaley the amount to scale in the y direction * @param from the point to transform */ public void scale(double scalex, double scaley, Point2D from) { AffineTransform xf = AffineTransform.getTranslateInstance(from.getX(), from.getY()); xf.scale(scalex, scaley); xf.translate(-from.getX(), -from.getY()); inverse = null; transform.preConcatenate(xf); fireStateChanged(); }
/** * shears the transform by passed parameters * * @param shx x value to shear * @param shy y value to shear * @param from the point to transform */ public void shear(double shx, double shy, Point2D from) { inverse = null; AffineTransform at = AffineTransform.getTranslateInstance(from.getX(), from.getY()); at.shear(shx, shy); at.translate(-from.getX(), -from.getY()); transform.preConcatenate(at); fireStateChanged(); }
/** * preconcatenates the rotation at the supplied point with the current transform * * @param theta the angle by which to rotate the point * @param from the point to transform */ public void rotate(double theta, Point2D from) { AffineTransform rotate = AffineTransform.getRotateInstance(theta, from.getX(), from.getY()); inverse = null; transform.preConcatenate(rotate); fireStateChanged(); }
/** * preconcatenates the rotation at the supplied point with the current transform * @param theta the angle by which to rotate the point * @param from the point to transform */ public void rotate(double theta, Point2D from) { AffineTransform rotate = AffineTransform.getRotateInstance(theta, from.getX(), from.getY()); inverse = null; transform.preConcatenate(rotate); fireStateChanged(); }
/** * shears the transform by passed parameters * @param shx x value to shear * @param shy y value to shear * @param from the point to transform */ public void shear(double shx, double shy, Point2D from) { inverse = null; AffineTransform at = AffineTransform.getTranslateInstance(from.getX(), from.getY()); at.shear(shx, shy); at.translate(-from.getX(), -from.getY()); transform.preConcatenate(at); fireStateChanged(); }
/** * Replace the Transform's translate x and y values with the passed values, leaving the scale * values unchanged. * * @param tx the x value of the translation * @param ty the y value of the translation */ public void setTranslate(double tx, double ty) { float scalex = (float) transform.getScaleX(); float scaley = (float) transform.getScaleY(); float shearx = (float) transform.getShearX(); float sheary = (float) transform.getShearY(); inverse = null; transform.setTransform(scalex, sheary, shearx, scaley, tx, ty); fireStateChanged(); }
/** * Replace the Transform's translate x and y values * with the passed values, leaving the scale values * unchanged. * @param tx the x value of the translation * @param ty the y value of the translation */ public void setTranslate(double tx, double ty) { float scalex = (float) transform.getScaleX(); float scaley = (float) transform.getScaleY(); float shearx = (float) transform.getShearX(); float sheary = (float) transform.getShearY(); inverse = null; transform.setTransform(scalex, sheary, shearx, scaley, tx, ty); fireStateChanged(); }