createFromControlVectors static method

AffineTransformation createFromControlVectors(
  1. Coordinate? src0,
  2. Coordinate? dest0
)
  • Creates an AffineTransformation defined by a single control vector. A
    • control vector consists of a source point and a destination point, which is
      • the image of the source point under the desired transformation. This
      • produces a translation.
      • @param src0
      •      the start point of the control vector
        
      • @param dest0
      •      the end point of the control vector
        
      • @return the computed transformation

Implementation

static AffineTransformation createFromControlVectors(
    Coordinate? src0, Coordinate? dest0) {
  double dx = dest0!.x - src0!.x;
  double dy = dest0.y - src0.y;
  return AffineTransformation.translationInstance(dx, dy);
}