bool IAnylineOCRModuleDelegate.TextOutlineDetected(AnylineOCRModuleView anylineOCRModuleView, ALSquare outline) { return(false); }
public void HasResult(ALDocumentScanPlugin anylineDocumentScanPlugin, UIImage transformedImage, UIImage fullFrame, ALSquare corners) { // the DocumentScanPlugin is slightly different to the other plugins, it doesn't return a document result, but instead several parameters. // we put together these parameters and pass them to the ResultViewController Dictionary <string, object> results = new Dictionary <string, object>(); results.Add("transformedImage", transformedImage); results.Add("fullFrame", fullFrame); results.Add("corners", corners); HandleResult(results); }
/* * Called if a full result is found. A full result is considered to be a successful preview, folloewd by a successful full scan. */ void IAnylineDocumentModuleDelegate.HasResult(AnylineDocumentModuleView anylineDocumentModuleView, UIImage transformedImage, UIImage fullFrame, ALSquare corners) { if (_disposing) { return; } if (_scanView == null) { return; } //we'll go to a temporary new view controller, so we keep this one alive _keepScanViewControllerAlive = true; _resultImage = transformedImage; using (var vc = new UIViewController()) { var iv = new UIImageView(_scanView.Frame) { Image = _resultImage, ContentMode = UIViewContentMode.ScaleAspectFit }; vc.View.AddSubview(iv); NavigationController?.PushViewController(vc, true); } fullFrame?.Dispose(); transformedImage?.Dispose(); }
/* * Will be called when AnylineDocumentModuleView.TriggerPictureCornerDetectionAndReturnError is invoked. */ void IAnylineDocumentModuleDelegate.DetectedPictureCorners(AnylineDocumentModuleView anylineDocumentModuleView, ALSquare corners, UIImage image) { }
bool IAnylineDocumentModuleDelegate.AnglesValid(AnylineDocumentModuleView anylineDocumentModuleView, ALSquare outline, bool anglesValid) { return(false); }