Barcode Xpress Mobile for iOS
BXDemoViewController Class Reference

ViewController for BXDemo. More...

#import <BXDemoViewController.h>

List of all members.

Public Member Functions

(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.
(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.
(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.
(IBAction) - onClickAccusoft:
 Action that is invoked when the Accusoft UITextView is touched.
(const char *) - reportVersion
 Query the Accusoft recognition library for its version information and return that.
(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.
(UIInterfaceOrientation) - getUIOrientationFromDevice
 Get a UIInterfaceOrientation value to match the current device orientation.
(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.
UIImageView * hashImage
 Semi-opaque viewfinder overlay.
UIImageView * laserImage
 Laser-like line across center of the viewfinder.
UIImageView * thumbnailImage
 Image inside of which a barcode was decoded.
UITextView * resultText
 The value decoded from the barcode.
UILabel * processLabel
 The "Processing.." text that moves once for each frame that is sent for decoding.
UIButton * backButton
 Button that restarts scanning and closes the results Views.
UIButton * bxIcon
 Accusoft icon.
UIScrollView * scrollView
 Scrollview that contains thumbnailImage and resultText.

Properties

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

Detailed Description

ViewController for BXDemo.


Member Function 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 [read, write, assign]

Button that restarts scanning and closes the results Views.

- (IBOutlet UIImageView*) cameraImage [read, write, assign]

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

- (UIView *) cameraPreview [read, write, assign]

Preview imagery from the camera.

- (IBOutlet UIImageView*) hashImage [read, write, assign]

Semi-opaque viewfinder overlay.

- (IBOutlet UIImageView*) laserImage [read, write, assign]

Laser-like line across center of the viewfinder.

Blurred image detection happens across this line.

- (AVCaptureVideoPreviewLayer *) previewLayer [read, write, assign]

Preview Layer, where all camera images are displayed.

- (IBOutlet UILabel*) processLabel [read, write, assign]

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

- (IBOutlet UITextView*) resultText [read, write, assign]

The value decoded from the barcode.

- (IBOutlet UIScrollView*) scrollView [read, write, assign]

Scrollview that contains thumbnailImage and resultText.

- (IBOutlet UIImageView*) thumbnailImage [read, write, assign]

Image inside of which a barcode was decoded.

Displayed with the barcode outlined.