setToShear method

AffineTransformation setToShear(
  1. double xShear,
  2. double yShear
)

Sets this transformation to be a shear. The transformation matrix for a shear has the value:

  
|  1      xShear  0 |
|  yShear      1  0 |
|  0           0  1 |
Note that a shear of (1, 1) is not equal to shear(1, 0) composed with shear(0, 1). Instead, shear(1, 1) corresponds to a mapping onto the line x = y.

@param xShear the x component to shear by @param yShear the y component to shear by @return this transformation, with an updated matrix

Implementation

AffineTransformation setToShear(double xShear, double yShear) {
  m00 = 1.0;
  m01 = xShear;
  m02 = 0.0;
  m10 = yShear;
  m11 = 1.0;
  m12 = 0.0;
  return this;
}