outputRectConverted(fromMetadataOutputRect:)
Converts a rectangle in the coordinate system used for metadata outputs to one in the capture output object’s coordinate system.
Declaration
func outputRectConverted(fromMetadataOutputRect rectInMetadataOutputCoordinates: CGRect) -> CGRectParameters
- rectInMetadataOutputCoordinates:
A rectangle in the Avcapturemetadataoutput coordinate system.
Return Value
A rectangle in the AVCaptureOutput object’s coordinate system.
Discussion
The rectangle of interest for an AVCaptureMetadataOutput object is in a coordinate system extending from {0,0} in the top-left to {1,1} in the bottom-right, relative to the device’s natural orientation. A capture output object uses a pixel coordinate space which you may zoom, rotate, or mirror.