transformX method

double transformX(
  1. double x,
  2. Size size
)

Implementation

double transformX(double x, Size size) {
  switch (rotation) {
    case InputImageRotation.ROTATION_90:
      return x * size.width / imageSize.height;
    case InputImageRotation.ROTATION_270:
      return size.width - x * size.width / imageSize.height;
    default:
      return x * size.width / imageSize.width;
  }
}