Barcode Xpress Mobile for iOS
 All Classes Functions Variables Properties Pages
BXDemoViewController Class Reference

ViewController for BXDemo. More...

#import <BXDemoViewController.h>

Inheritance diagram for BXDemoViewController:

Instance Methods

(void) - animateLaser
 Utility routine that moves the laser animation in the viewfinder.
 
(void) - createBorder
 Draw the viewfinder overlay using a semi-transparent set of rectangles around the perimeter of the display with a solid red "laser" line through the center. More...
 
(void) - createLaser
 Load and initialize the structures used for drawing the animated laser in the viewfinder overlay.
 
(UIImage *) - drawBarcodeBorder::
 Copy a UIImage and draw a red border around the barcode region that was identified by the recognition library. More...
 
(IBAction) - onClickBackButton:
 Called when the Back button is pressed, this will set the Running state to YES (processing images) if it is not already set. More...
 
(IBAction) - onClickAccusoft:
 Action that is invoked when the Accusoft UITextView is touched. More...
 
(const char *) - reportVersion
 Query the Accusoft recognition library for its version information and return that. More...
 
(void) - setBarcodeTypesUsingSettings
 Set the types of barcodes that will be recognized by the recognition library, using the booleans set earlier by querying our application settings from the system-wide Settings app.
 
(void) - setCameraPreviewTransform:
 Method to set the transform for the preview imagery. More...
 
(UIImageOrientation) - getImageOrientationFromUIOrientation:
 Get the rotation necessary to rotate a video camera image to appear right-side-up in the current UI orientation.
 

Protected Attributes

BXDemoAppDelegateappDel
 AppDelegate.
 
UIImageView * cameraImage
 Image from camera, optionally displays images before they are sent for decoding. More...
 
UIImageView * hashImage
 Semi-opaque viewfinder overlay. More...
 
UIImageView * laserImage
 Laser-like line across center of the viewfinder. More...
 
UIImageView * thumbnailImage
 Image inside of which a barcode was decoded. More...
 
UITextView * resultText
 The value decoded from the barcode. More...
 
UILabel * processLabel
 The "Processing.." text that moves once for each frame that is sent for decoding. More...
 
UIButton * backButton
 Button that restarts scanning and closes the results Views. More...
 
UIButton * bxIcon
 Accusoft icon.
 
UIScrollView * scrollView
 Scrollview that contains thumbnailImage and resultText. More...
 

Properties

IBOutlet BXDemoAppDelegateappDel
 AppDelegate.
 
AVCaptureVideoPreviewLayer * previewLayer
 Preview Layer, where all camera images are displayed. More...
 
IBOutlet UIImageView * cameraImage
 Image from camera, optionally displays images before they are sent for decoding. More...
 
UIView * cameraPreview
 Preview imagery from the camera. More...
 
IBOutlet UIImageView * hashImage
 Semi-opaque viewfinder overlay. More...
 
IBOutlet UIImageView * laserImage
 Laser-like line across center of the viewfinder. More...
 
IBOutlet UIImageView * thumbnailImage
 Image inside of which a barcode was decoded. More...
 
IBOutlet UITextView * resultText
 The value decoded from the barcode. More...
 
IBOutlet UILabel * processLabel
 The "Processing.." text that moves once for each frame that is sent for decoding. More...
 
IBOutlet UIButton * backButton
 Button that restarts scanning and closes the results Views. More...
 
IBOutlet UIButton * bxIcon
 Accusoft icon.
 
IBOutlet UIScrollView * scrollView
 Scrollview that contains thumbnailImage and resultText. More...
 
BXInterfacebarcodeXpress
 Recognition Library.
 

Detailed Description

ViewController for BXDemo.

Method Documentation

- (void) createBorder

Draw the viewfinder overlay using a semi-transparent set of rectangles around the perimeter of the display with a solid red "laser" line through the center.

The "laser" line is where detection of a possibly blurred image happens.

- (UIImage *) (UIImage *)  image
: (BXResult*)  result 

Copy a UIImage and draw a red border around the barcode region that was identified by the recognition library.

Parameters
imageUIImage that was sent to the recognition library for recognition.
resultBXResult returned by the recognition library as a result of processing the image. See BXResult.
Returns
A new UIImage with a red border draw between the points defined in the result.
- (IBAction) onClickAccusoft: (id)  sender

Action that is invoked when the Accusoft UITextView is touched.

The browswer is invoked to display Accusoft's website.

Parameters
senderID of the sending object. Unused.
- (IBAction) onClickBackButton: (id)  sender

Called when the Back button is pressed, this will set the Running state to YES (processing images) if it is not already set.

The Back button is only visible while displaying recognition results.

Parameters
senderID of the sending object. Unused.
- (const char *) reportVersion

Query the Accusoft recognition library for its version information and return that.

Returns
a UTF8 character string containing the library version number.
- (void) setCameraPreviewTransform: (UIInterfaceOrientation)  toInterfaceOrientation

Method to set the transform for the preview imagery.

Parameters
toInterfaceOrientationThe new orientation.

Member Data Documentation

- (UIButton*) backButton
protected

Button that restarts scanning and closes the results Views.

- (UIImageView*) cameraImage
protected

Image from camera, optionally displays images before they are sent for decoding.

- (UIImageView*) hashImage
protected

Semi-opaque viewfinder overlay.

- (UIImageView*) laserImage
protected

Laser-like line across center of the viewfinder.

Blurred image detection happens across this line.

- (UILabel*) processLabel
protected

The "Processing.." text that moves once for each frame that is sent for decoding.

- (UITextView*) resultText
protected

The value decoded from the barcode.

- (UIScrollView*) scrollView
protected

Scrollview that contains thumbnailImage and resultText.

- (UIImageView*) thumbnailImage
protected

Image inside of which a barcode was decoded.

Displayed with the barcode outlined.

Property Documentation

- (IBOutlet UIButton*) backButton
readwritenonatomicstrong

Button that restarts scanning and closes the results Views.

- (IBOutlet UIImageView*) cameraImage
readwritenonatomicstrong

Image from camera, optionally displays images before they are sent for decoding.

- (UIView *) cameraPreview
readwritenonatomicstrong

Preview imagery from the camera.

- (IBOutlet UIImageView*) hashImage
readwritenonatomicstrong

Semi-opaque viewfinder overlay.

- (IBOutlet UIImageView*) laserImage
readwritenonatomicstrong

Laser-like line across center of the viewfinder.

Blurred image detection happens across this line.

- (AVCaptureVideoPreviewLayer *) previewLayer
readwritenonatomicstrong

Preview Layer, where all camera images are displayed.

- (IBOutlet UILabel*) processLabel
readwritenonatomicstrong

The "Processing.." text that moves once for each frame that is sent for decoding.

- (IBOutlet UITextView*) resultText
readwritenonatomicstrong

The value decoded from the barcode.

- (IBOutlet UIScrollView*) scrollView
readwritenonatomicstrong

Scrollview that contains thumbnailImage and resultText.

- (IBOutlet UIImageView*) thumbnailImage
readwritenonatomicstrong

Image inside of which a barcode was decoded.

Displayed with the barcode outlined.