flip method

void flip()

Implementation

void flip() {
  if (screenCropRect == null) {
    return;
  }
  final Offset flipOrigin = screenCropRect!.center;
  if (isHalfPi) {
    _flipX = !_flipX;
    // _screenDestinationRect = Rect.fromLTRB(
    //     screenDestinationRect.left,
    //     2 * flipOrigin.dy - screenDestinationRect.bottom,
    //     screenDestinationRect.right,
    //     2 * flipOrigin.dy - screenDestinationRect.top);
  } else {
    _flipY = !_flipY;
  }
  _screenDestinationRect = Rect.fromLTRB(
      2 * flipOrigin.dx - screenDestinationRect!.right,
      screenDestinationRect!.top,
      2 * flipOrigin.dx - screenDestinationRect!.left,
      screenDestinationRect!.bottom);

  if (_flipX && _flipY && isPi) {
    _flipX = _flipY = false;
    _rotateRadian = 0.0;
  }
}