react-native-rectangle-doc-scanner 3.21.0 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -34,7 +34,9 @@ try {
|
|
|
34
34
|
// Files to copy
|
|
35
35
|
const filesToCopy = [
|
|
36
36
|
'ios/IPDFCameraViewController.m',
|
|
37
|
+
'ios/IPDFCameraViewController.h',
|
|
37
38
|
'ios/DocumentScannerView.m',
|
|
39
|
+
'ios/DocumentScannerView.h',
|
|
38
40
|
'ios/RNPdfScannerManager.m',
|
|
39
41
|
'ios/RNPdfScannerManager.h',
|
|
40
42
|
'ios.js'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#import "IPDFCameraViewController.h"
|
|
2
|
+
#import <React/RCTViewManager.h>
|
|
3
|
+
|
|
4
|
+
@interface DocumentScannerView : IPDFCameraViewController <IPDFCameraViewControllerDelegate>
|
|
5
|
+
|
|
6
|
+
@property (nonatomic, copy) RCTDirectEventBlock onPictureTaken;
|
|
7
|
+
@property (nonatomic, copy) RCTDirectEventBlock onRectangleDetect;
|
|
8
|
+
@property (nonatomic, assign) NSInteger detectionCountBeforeCapture;
|
|
9
|
+
@property (assign, nonatomic) NSInteger stableCounter;
|
|
10
|
+
@property (nonatomic, assign) float quality;
|
|
11
|
+
@property (nonatomic, assign) BOOL useBase64;
|
|
12
|
+
@property (nonatomic, assign) BOOL captureMultiple;
|
|
13
|
+
@property (nonatomic, assign) BOOL saveInAppDocument;
|
|
14
|
+
|
|
15
|
+
- (void) capture;
|
|
16
|
+
|
|
17
|
+
@end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//
|
|
2
|
+
// IPDFCameraViewController.h
|
|
3
|
+
// InstaPDF
|
|
4
|
+
//
|
|
5
|
+
// Created by Maximilian Mackh on 06/01/15.
|
|
6
|
+
// Copyright (c) 2015 mackh ag. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <UIKit/UIKit.h>
|
|
10
|
+
|
|
11
|
+
@class CIRectangleFeature;
|
|
12
|
+
|
|
13
|
+
typedef NS_ENUM(NSInteger, IPDFCameraViewType)
|
|
14
|
+
{
|
|
15
|
+
IPDFCameraViewTypeBlackAndWhite,
|
|
16
|
+
IPDFCameraViewTypeNormal
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
typedef NS_ENUM(NSInteger, IPDFRectangeType)
|
|
20
|
+
{
|
|
21
|
+
IPDFRectangeTypeGood,
|
|
22
|
+
IPDFRectangeTypeBadAngle,
|
|
23
|
+
IPDFRectangeTypeTooFar
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
@protocol IPDFCameraViewControllerDelegate <NSObject>
|
|
27
|
+
|
|
28
|
+
- (void)didDetectRectangle:(CIRectangleFeature *)rectangle withType:(IPDFRectangeType)type;
|
|
29
|
+
|
|
30
|
+
@optional
|
|
31
|
+
- (void)cameraViewController:(id)controller
|
|
32
|
+
didDetectRectangle:(CIRectangleFeature *)rectangle
|
|
33
|
+
withType:(IPDFRectangeType)type
|
|
34
|
+
viewCoordinates:(NSDictionary *)viewCoordinates
|
|
35
|
+
imageSize:(CGSize)imageSize;
|
|
36
|
+
|
|
37
|
+
@end
|
|
38
|
+
|
|
39
|
+
@interface IPDFCameraViewController : UIView
|
|
40
|
+
|
|
41
|
+
- (void)setupCameraView;
|
|
42
|
+
|
|
43
|
+
- (void)start;
|
|
44
|
+
- (void)stop;
|
|
45
|
+
|
|
46
|
+
@property (nonatomic, assign, getter=isBorderDetectionEnabled) BOOL enableBorderDetection;
|
|
47
|
+
@property (nonatomic, assign, getter=isTorchEnabled) BOOL enableTorch;
|
|
48
|
+
@property (nonatomic, assign, getter=isFrontCam) BOOL useFrontCam;
|
|
49
|
+
|
|
50
|
+
@property (weak, nonatomic) id<IPDFCameraViewControllerDelegate> delegate;
|
|
51
|
+
|
|
52
|
+
@property (nonatomic, assign) IPDFCameraViewType cameraViewType;
|
|
53
|
+
|
|
54
|
+
- (void)focusAtPoint:(CGPoint)point completionHandler:(void(^)(void))completionHandler;
|
|
55
|
+
|
|
56
|
+
- (void)captureImageWithCompletionHander:(void(^)(UIImage *data, UIImage *initialData, CIRectangleFeature *rectangleFeature))completionHandler;
|
|
57
|
+
|
|
58
|
+
@property (nonatomic, strong) UIColor *overlayColor;
|
|
59
|
+
@property (nonatomic, assign) float saturation;
|
|
60
|
+
@property (nonatomic, assign) float contrast;
|
|
61
|
+
@property (nonatomic, assign) float brightness;
|
|
62
|
+
@property (nonatomic, assign) NSInteger detectionRefreshRateInMS;
|
|
63
|
+
|
|
64
|
+
@end
|