transalateHiegt function
double
transalateHiegt(
- double y,
- Size canvasSize,
- Size imageSize,
- InputImageRotation rotation,
- CameraLensDirection cameraLensDirection,
)
Implementation
double transalateHiegt(
double y,
Size canvasSize,
Size imageSize,
InputImageRotation rotation,
CameraLensDirection cameraLensDirection,
) {
switch (rotation) {
case InputImageRotation.rotation90deg:
case InputImageRotation.rotation270deg:
return y *
canvasSize.height /
(Platform.isIOS ? imageSize.height : imageSize.width);
case InputImageRotation.rotation0deg:
case InputImageRotation.rotation180deg:
return y * canvasSize.height / imageSize.height;
}
}