java.lang.Object | |
↳ | com.sap.cloud.mobile.fiori.camera.CameraFrameCropController |
Helper class for calculating the rect to be cropped on the camera preview. FioriCamera
shows a CameraFrameView
on the screen.
CameraFrame acts as guiding tool for end user to place the image correctly within the crop bounded box. Rect of the crop bounded box is calculated based
on the size of the preview image. This class controls the size and position of the crop rect displayed on CameraFrameView
on camera preview.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | CameraFrameCropController.OnCropRectCalculated | Callback for crop rect calculations |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CameraFrameCropController() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Rect | calculateCropRect(int left, int top, int right, int bottom) | ||||||||||
void |
setCropFraction(float horizontalCropFraction, float verticalCropFraction)
Set what fraction of the width and height should be used as crop rect.
| ||||||||||
void |
setOnCropRectCalculated(CameraFrameCropController.OnCropRectCalculated onCropRectCalculated)
Set
CameraFrameCropController.OnCropRectCalculated listener to listen for rect calculations
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Set what fraction of the width and height should be used as crop rect.
horizontalCropFraction | width fraction to be used as crop rect |
---|---|
verticalCropFraction | height fraction to be used as crop rect |
Set CameraFrameCropController.OnCropRectCalculated
listener to listen for rect calculations