//The region of the video image that will be scanned, in normalized image coordinates. Note that the video image is in landscape mode (default {
{0, 0}, {1, 1}})
- (CGRect)getLandscapeModeScanCropRect:(UIView*)readerView
scanView:(UIView*)scanView
{
CGRect scanCropRect = CGRectMake(0, 0, 1, 1); /*default full screen*/
CGFloat x,y,width,height;
x = scanView.frame.origin.x / readerView.bounds.size.width;
y = scanView.frame.origin.y / readerView.bounds.size.height;
width = scanView.frame.size.width / readerView.bounds.size.width;
height = scanView.frame.size.height / readerView.bounds.size.height;
scanCropRect = CGRectMake(x, y, width, height);
return scanCropRect;
}
//CGRect scanCrop
//The region of the video image that will be scanned, in normalized image coordinates. Note that assuming your coordinates refer to points in por
ZBar扫描区域设置
最新推荐文章于 2021-12-17 13:47:17 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)