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

Controls and Displays the view presented to the user for BXDemo. More...

#import <BXDemoViewController.h>

Inheritance diagram for BXDemoViewController:

Instance Methods

(void) - animateLaser
 Moves the laser animation in the viewfinder. More...
 
(void) - createBorder
 Draws 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
 Loads and initializes the structures used for drawing the animated laser in the viewfinder overlay. More...
 
(UIImage *) - drawBarcodeBorder::
 Copies a UIImage and draws a red border around the barcode region that was identified by the recognition library. More...
 
(IBAction) - onClickBackButton:
 Sets the Running state when the Back button is pressed. More...
 
(IBAction) - onClickAccusoft:
 Receives the message that the Accusoft UITextView is touched and performs an action. More...
 
(const char *) - reportVersion
 Queries the Accusoft recognition library for its version information and return that. More...
 
(void) - setBarcodeTypesUsingSettings
 Sets 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. More...
 
(void) - setCameraPreviewTransform:
 Sets the transform for the preview imagery. More...
 
(UIImageOrientation) - getImageOrientationFromUIOrientation:
 Gets the rotation necessary to rotate a video camera image to appear right-side-up in the current UI orientation. More...
 

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
 Gets and sets the AppDelegate.
 
AVCaptureVideoPreviewLayer * previewLayer
 Preview Layer, where all camera images are displayed. More...
 
IBOutlet UIImageView * cameraImage
 Contains an UIImageView from the camera. More...
 
UIView * cameraPreview
 Preview imagery from the camera. More...
 
IBOutlet UIImageView * hashImage
 Creates a semi-opaque viewfinder overlay. More...
 
IBOutlet UIImageView * laserImage
 Displays a laser-like line across center of the viewfinder. More...
 
IBOutlet UIImageView * thumbnailImage
 Displays a preview image where barcode was decoded. More...
 
IBOutlet UITextView * resultText
 Displays the text value decoded from the barcode. More...
 
IBOutlet UILabel * processLabel
 Displays the "Processing.." text that moves once for each frame that is sent for decoding. More...
 
IBOutlet UIButton * backButton
 Contains a button that restarts scanning and closes the results Views. More...
 
IBOutlet UIButton * bxIcon
 Holds and displays the Accusoft icon.
 
IBOutlet UIScrollView * scrollView
 Displays the results in a scrollview that contains thumbnailImage and resultText. More...
 
BXInterfacebarcodeXpress
 A reference to the Recognition Library. More...
 

Detailed Description

Controls and Displays the view presented to the user for BXDemo.

Method Documentation

- (void) animateLaser

Moves the laser animation in the viewfinder.

Utility routine that moves the laser animation in the viewfinder.

- (void) createBorder

Draws 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.

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.

- (void) createLaser

Loads and initializes the structures used for drawing the animated laser in the viewfinder overlay.

Load and initialize the structures used for drawing the animated laser in the viewfinder overlay.

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

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

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.
- (UIImageOrientation) getImageOrientationFromUIOrientation: (UIInterfaceOrientation)  orientation

Gets the rotation necessary to rotate a video camera image to appear right-side-up in the current UI orientation.

Get the rotation necessary to rotate a video camera image to appear right-side-up in the current UI orientation.

- (IBAction) onClickAccusoft: (id)  sender

Receives the message that the Accusoft UITextView is touched and performs an action.

Action that is invoked when the Accusoft UITextView is touched.

The browser is invoked to display Accusoft's website.

Parameters
senderID of the sending object. Unused.

The browswer is invoked to display Accusoft's website.

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

Sets the Running state when the Back button is pressed.

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

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.

The Back button is only visible while displaying recognition results.

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

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

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

Returns
a UTF8 character string containing the library version number.
- (void) setBarcodeTypesUsingSettings

Sets 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.

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: (UIInterfaceOrientation)  toInterfaceOrientation

Sets 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

Contains a button that restarts scanning and closes the results Views.

- (BXInterface *) barcodeXpress
readwritenonatomicassign

A reference to the Recognition Library.

Performs Recognition with the native BarcodeXpress Library.

- (IBOutlet UIImageView*) cameraImage
readwritenonatomicstrong

Contains an UIImageView from the camera.

Optionally displays images before they are sent for decoding.

- (UIView *) cameraPreview
readwritenonatomicstrong

Preview imagery from the camera.

Holds an image from the camera in a UIView.

Used to preview imagery from the camera.

- (IBOutlet UIImageView*) hashImage
readwritenonatomicstrong

Creates a semi-opaque viewfinder overlay.

- (IBOutlet UIImageView*) laserImage
readwritenonatomicstrong

Displays a 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.

Displays camera images in a AVCaptureVideoPreviewLayer.

- (IBOutlet UILabel*) processLabel
readwritenonatomicstrong

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

- (IBOutlet UITextView*) resultText
readwritenonatomicstrong

Displays the text value decoded from the barcode.

- (IBOutlet UIScrollView*) scrollView
readwritenonatomicstrong

Displays the results in a scrollview that contains thumbnailImage and resultText.

- (IBOutlet UIImageView*) thumbnailImage
readwritenonatomicstrong

Displays a preview image where barcode was decoded.

Displayed with the barcode outlined.