/** * Updates the value of this transformation * to that of a scale transformation composed * with the current value. * * @param xScale the value to scale by in the x direction * @param yScale the value to scale by in the y direction * @return this transformation, with an updated matrix */ public AffineTransformation scale(double xScale, double yScale) { compose(scaleInstance(xScale, yScale)); return this; }
/** * Updates the value of this transformation * to that of a shear transformation composed * with the current value. * * @param xShear the value to shear by in the x direction * @param yShear the value to shear by in the y direction * @return this transformation, with an updated matrix */ public AffineTransformation shear(double xShear, double yShear) { compose(shearInstance(xShear, yShear)); return this; }
/** * Updates the value of this transformation * to that of a reflection transformation composed * with the current value. * * @param x the x-ordinate of the line to reflect around * @param y the y-ordinate of the line to reflect around * @return this transformation, with an updated matrix */ public AffineTransformation reflect(double x, double y) { compose(reflectionInstance(x, y)); return this; }
/** * Updates the value of this transformation * to that of a translation transformation composed * with the current value. * * @param x the value to translate by in the x direction * @param y the value to translate by in the y direction * @return this transformation, with an updated matrix */ public AffineTransformation translate(double x, double y) { compose(translationInstance(x, y)); return this; }
/** * Updates the value of this transformation * to that of a reflection transformation composed * with the current value. * * @param x0 the x-ordinate of a point on the line to reflect around * @param y0 the y-ordinate of a point on the line to reflect around * @param x1 the x-ordinate of a point on the line to reflect around * @param y1 the y-ordinate of a point on the line to reflect around * @return this transformation, with an updated matrix */ public AffineTransformation reflect(double x0, double y0, double x1, double y1) { compose(reflectionInstance(x0, y0, x1, y1)); return this; }
/** * Updates the value of this transformation * to that of a rotation around the origin composed * with the current value, * with the sin and cos of the rotation angle specified directly. * * @param sinTheta the sine of the angle to rotate by * @param cosTheta the cosine of the angle to rotate by * @return this transformation, with an updated matrix */ public AffineTransformation rotate(double sinTheta, double cosTheta) { compose(rotationInstance(sinTheta, cosTheta)); return this; }
/** * Updates the value of this transformation * to that of a rotation transformation composed * with the current value. * Positive angles correspond to a rotation * in the counter-clockwise direction. * * @param theta the angle to rotate by, in radians * @return this transformation, with an updated matrix */ public AffineTransformation rotate(double theta) { compose(rotationInstance(theta)); return this; }
/** * Updates the value of this transformation * to that of a rotation around a given point composed * with the current value. * Positive angles correspond to a rotation * in the counter-clockwise direction. * * @param theta the angle to rotate by, in radians * @param x the x-ordinate of the rotation point * @param y the y-ordinate of the rotation point * @return this transformation, with an updated matrix */ public AffineTransformation rotate(double theta, double x, double y) { compose(rotationInstance(theta, x, y)); return this; }
/** * Updates the value of this transformation * to that of a rotation around a given point composed * with the current value, * with the sin and cos of the rotation angle specified directly. * * @param sinTheta the sine of the angle to rotate by * @param cosTheta the cosine of the angle to rotate by * @param x the x-ordinate of the rotation point * @param y the y-ordinate of the rotation point * @return this transformation, with an updated matrix */ public AffineTransformation rotate(double sinTheta, double cosTheta, double x, double y) { compose(rotationInstance(sinTheta, cosTheta, x, y)); return this; }