Kofax Mobile SDK API Reference
Classes | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ImgReviewEditCntrl Class Reference
Inheritance diagram for ImgReviewEditCntrl:

Classes

enum  Line_Style_Solid
 An enum which lists the drawing style options the edge of the tetragon. More...
 

Public Member Functions

void setImage (Image i) throws KmcException
 
Image getImage ()
 Image that is to be reviewed and/or edited. More...
 
void showCropRectangle (boolean isVisible)
 Displays cropping rectangle with draggable corner indicators. More...
 
int getCropLineColor ()
 The ARGB line color of the bounding rect/tetragon. More...
 
void setCropLineColor (int lColor)
 The ARGB line color of the bounding rect/tetragon. More...
 
int getCropCornerColor ()
 The ARGB corner color of the bounding rect/tetragon. More...
 
void setCropCornerColor (int cColor)
 The ARGB corner color of the bounding rect/tetragon. More...
 
void setCropLineStyle (Line_Style_Solid myStyle)
 The line style of the bounding rect/tetragon sides. More...
 
void setCropTetragon (BoundingTetragon bt)
 Contains coordinates of all four tetragon corners. May or may not be a rectangle. More...
 
void showHighlights (BoundingRect[] rectArr)
 
void clearHighlights ()
 
void setHighlightColor (int color)
 Returns the coordinates of all four tetragon corners. May or may not be a rectangle. More...
 
BoundingTetragon getCropTetragon ()
 
void setRetainImage (boolean retainImage)
 
boolean getRetainImage ()
 
void setImageCacheType (ImageCacheType imageCacheType)
 
 ImgReviewEditCntrl (Context context)
 
 ImgReviewEditCntrl (Context context, AttributeSet attrs)
 
 ImgReviewEditCntrl (Context context, AttributeSet attrs, int defStyle)
 
boolean onTouch (View v, MotionEvent event)
 
Parcelable onSaveInstanceState ()
 
void onRestoreInstanceState (Parcelable state)
 
void clearImage ()
 

Public Attributes

ScaleGestureDetector scaleGestureDetector
 

Protected Member Functions

void onDraw (Canvas canvas)
 
void onSizeChanged (int w, int h, int oldw, int oldh)
 

Detailed Description

This is the view which is presented to the user when either a picture is taken or chosen photo from the photo gallery. When the image processor is done processing either via quick analysis or direct processing the output image can be viewed in the control.

Constructor & Destructor Documentation

ImgReviewEditCntrl ( Context  context)
ImgReviewEditCntrl ( Context  context,
AttributeSet  attrs 
)
ImgReviewEditCntrl ( Context  context,
AttributeSet  attrs,
int  defStyle 
)

Member Function Documentation

void clearHighlights ( )

Function to clear highlights from the widget.

void clearImage ( )

Removes the bitmap from the control.

int getCropCornerColor ( )

The ARGB corner color of the bounding rect/tetragon.

The ARGB corner color of the bounding rect/tetragon. Range = 0x00000000 0xFFFFFFFF

Returns
- tetragon corner color
int getCropLineColor ( )

The ARGB line color of the bounding rect/tetragon.

The ARGB line color of the bounding rect/tetragon. Range = 0x00000000 0xFFFFFFFF

Returns
color of the edge of the tetragon
BoundingTetragon getCropTetragon ( )

Returns a BoundingTetragon object which has four points, each point corresponds to a corner of the tetragon. The tetragon consists of the integer coordinates of its top-left, top-right, bottom-left, and bottom-right edges.

Returns
- tetragon that defines the corners of the cropped image or image
Image getImage ( )

Image that is to be reviewed and/or edited.

The image scale and size is the same as the original image The image internally is downsized for viewing purposes only

Returns
image object
boolean getRetainImage ( )
Returns
Whether or not the image shown is retained across re-creation. False by default.
void onDraw ( Canvas  canvas)
protected
void onRestoreInstanceState ( Parcelable  state)
Parcelable onSaveInstanceState ( )
void onSizeChanged ( int  w,
int  h,
int  oldw,
int  oldh 
)
protected
boolean onTouch ( View  v,
MotionEvent  event 
)
void setCropCornerColor ( int  cColor)

The ARGB corner color of the bounding rect/tetragon.

The ARGB corner color of the bounding rect/tetragon. Range = 0x00000000 0xFFFFFFFF

Parameters
cColor- color for the corner of the rectangle, default is blue
void setCropLineColor ( int  lColor)

The ARGB line color of the bounding rect/tetragon.

The ARGB line color of the bounding rect/tetragon. Range = 0x00000000 0xFFFFFFFF

void setCropLineStyle ( Line_Style_Solid  myStyle)

The line style of the bounding rect/tetragon sides.

The line style of the bounding rect/tetragon sides.

Parameters
myStyle- This crop rectangle lines should be solid or dashed
void setCropTetragon ( BoundingTetragon  bt)

Contains coordinates of all four tetragon corners. May or may not be a rectangle.

Contains coordinates of all four tetragon corners. May or may not be a rectangle. The tetragon consists of the integer coordinates of its top-left, top-right, bottom-left, and bottom-right edges.

Parameters
bt- bounding tetragon
void setHighlightColor ( int  color)

Returns the coordinates of all four tetragon corners. May or may not be a rectangle.

Sets user defined color for the highlights. Default color is Yellow.

Parameters
color
void setImage ( Image  i) throws KmcException

If the size of the image is rather large and there isn't enough memory then we throw an exception asking the user to reduce the scaling factor further. If the user does not set a scaling factor the sdk will automatically down scale the image by 0.5 for viewing purposes. The original scale of the image will be maintained in the image object.

Parameters
i- image object
Exceptions
KmcException
KmcRuntimeException(ErrorInfo.KMC_UT_LICENSE_IMAGE_CAPTURE)
Note
This is an application responsibility to clear Image instance.
void setImageCacheType ( ImageCacheType  imageCacheType)

Controls which type of cache will be used to store images that are retained across re-creation (such as from a configuration change). This will not affect any ImgReviewEditCntrl which has set retainImage to false.

Parameters
imageCacheType- ImageCacheType
See also
setRetainImage(boolean)

The default value is ImageCacheType::MEMORY

void setRetainImage ( boolean  retainImage)

Control whether the image shown is retained across re-creation (such as from a configuration change). If set, the image data will be cached during onSaveInstanceState(). The image is restored during onRestoreInstanceState(Parcelable).

The default value is true.

Parameters
retainImage- boolean
void showCropRectangle ( boolean  isVisible)

Displays cropping rectangle with draggable corner indicators.

Displays cropping rectangle with draggable corner indicators. Corners can be repositioned independently, creating a tetragon. Individual sides can be dragged to resize the rectangle and maintain the rectangular shape.

Parameters
isVisible- boolean
void showHighlights ( BoundingRect[]  rectArr)

Function to show highlights on the widget.

Parameters
rectArr- Array of BoundingRect containing screen coordinates of the highlight rectangles to be drawn.

Member Data Documentation

ScaleGestureDetector scaleGestureDetector

The documentation for this class was generated from the following file:
Untitled Document © 2018 Kofax, Inc. All rights reserved. Use is subject to license terms.