SignDoc SDK (Java)  5.0.0
SignDocCleanParameters Class Reference

Actions and parameters for SignDocImage.clean(). More...

Inheritance diagram for SignDocCleanParameters:

Public Member Functions

 SignDocCleanParameters () throws SignDocException
 Constructor. More...
 
synchronized SignDocCleanParameters clone () throws SignDocException
 Clone this object. More...
 
synchronized void clear () throws SignDocException
 Remove all actions. More...
 
synchronized void add (String aName) throws SignDocException
 Add an action without parameter. More...
 
synchronized void addBoolean (String aName, boolean aValue) throws SignDocException
 Add an action with a boolean parameter. More...
 
synchronized void addInteger (String aName, int aValue) throws SignDocException
 Add an action with an integer parameter. More...
 
synchronized void addNumber (String aName, double aValue) throws SignDocException
 Add an action with a floating-point number parameter. More...
 
synchronized int getNumberOfActions () throws SignDocException
 Get the numbers of actions. More...
 
synchronized String getNameAt (int aIndex) throws SignDocException
 Get the name of an action. More...
 
synchronized int getTypeAt (int aIndex) throws SignDocException
 Get the type of the parameter of an action. More...
 
synchronized Boolean getBooleanAt (int aIndex) throws SignDocException
 Get the value of a boolean parameter. More...
 
synchronized Integer getIntegerAt (int aIndex) throws SignDocException
 Get the value of an integer parameter. More...
 
synchronized Double getNumberAt (int aIndex) throws SignDocException
 Get the value of a floating-point number parameter. More...
 
synchronized String getErrorMessage () throws SignDocException
 Get an error message for the last function call. More...
 
synchronized void close ()
 Destroy the underlying native object (for java.lang.AutoCloseable). More...
 

Static Public Member Functions

static int getType (String aName) throws SignDocException
 Get the type of a parameter. More...
 

Static Public Attributes

static final int t_undefined = 0
 Return value of getType() and getTypeAt(): The specified action is not defined. More...
 
static final int t_boolean = 1
 Return value of getType() and getTypeAt(): Boolean. More...
 
static final int t_integer = 2
 Return value of getType() and getTypeAt(): Integer. More...
 
static final int t_number = 3
 Return value of getType() and getTypeAt(): Floating-point number. More...
 
static final int t_void = 7
 Return value of getType() and getTypeAt(): void (no value). More...
 

Protected Member Functions

void finalize () throws Throwable
 Finalize this object. More...
 

Detailed Description

Actions and parameters for SignDocImage.clean().

Constructor & Destructor Documentation

Constructor.

No actions will be set.

Member Function Documentation

synchronized void add ( String  aName) throws SignDocException

Add an action without parameter.

The following actions without parameter are available:

  • cleanDate: Remove handwritten text from the signature image and crop, see SignDocImage.cleanDate(). (Equivalent SPCleanDateEnable parameter: SPCleanDateEnable.)
  • cleanLines: Remove horizontal and vertical lines, see SignDocImage.cleanLines(). (Equivalent SPCleanDateEnable parameter: SPCleanLineEnable.)
  • cleanSignature: Clean signature image and crop, see SignDocImage.cleanSignature(). (Equivalent SPCleanDateEnable parameter: SPCleanSignatureEnable.)
  • convertToBiLevel: Convert the image to bi-level black and white, see SignDocImage.convertToBiLevel(). (Equivalent SPCleanDateEnable parameter: SPBinarizeEnable.)
  • convertToGrayscale: Convert the image to 8-bit grayscale, see SignDocImage.convertToGrayscale().
  • convertToTrueColor: Convert the image to 24-bit RGB, see SignDocImage.convertToTrueColor().
  • crop: Crop the image to the rectangle specified by these actions with integer parameter: "cropLeft", "cropHeight", "cropTop", "cropWidth". Default values will be used for missing parameters. After performing this action, those four parameters will be unset. See SignDocImage.crop(). Example: to remove the top 100 rows of pixels, call addInteger("cropTop",100) followed by add("crop"). (Equivalent SignWare SPCleanParameter parameter: SPCutRegionEnable.)
  • mirrorX: Mirror along the vertical axis (flip horizontally), see SignDocImage.mirrorX(). (Equivalent SPCleanDateEnable parameters: SPMirrorAxes, SPMirrorEnable.)
  • mirrorY: Mirror along the horizontal axis (flip vertically), see SignDocImage.mirrorY(). (Equivalent SPCleanDateEnable parameters: SPMirrorAxes, SPMirrorEnable.)
  • removeMargins: Remove white margins ignoring single black pixels, see SignDocImage.removeMargins(). (Equivalent SPCleanDateEnable parameter: SPCutSignatureRegionEnable.)

This function throws SignDocUnknownParameterException if aName is not the name of an action without parameter.

Parameters
[in]aNameThe name of the action (case-sensitive).
See also
addBoolean(), addInteger(), addNumber()
synchronized void addBoolean ( String  aName,
boolean  aValue 
) throws SignDocException

Add an action with a boolean parameter.

The following action with boolean parameter is available:

  • invert: invert the image, see SignDocImage.invert(). The value is false to invert the image unconditionally, true to invert the image only if more than half the pixels have brightness (0 through 255) less than 128. (Equivalent SPCleanDateEnable parameters: SPInvertEnable, SPInvertFlags.)

This function throws SignDocUnknownParameterException if aName is not the name of an action with boolean parameter.

Parameters
[in]aNameThe name of the action (case-sensitive).
[in]aValueThe value of the parameter.
See also
add(), addInteger(), addNumber(), getBooleanAt()
synchronized void addInteger ( String  aName,
int  aValue 
) throws SignDocException

Add an action with an integer parameter.

The following actions with integer parameter are available:

  • cropHeight: set the height of the rectangle that will be preserved by the next "crop" action. The default value is the image height minus the value set by the "cropTop" action (or 0 if not set). (Equivalent SignWare SPCleanParameter parameters: SPCutRegionBottom, SPCutRegionTop.)
  • cropLeft: set the X coordinate of the upper left corner of the rectangle that will be preserved by the next "crop" action. The default value is 0. See Coordinate Systems. (Equivalent SignWare SPCleanParameter parameter: SPCutRegionLeft.)
  • cropTop: set the Y coordinate of the upper left corner of the rectangle that will be preserved by the next "crop" action. The default value is 0. See Coordinate Systems. (Equivalent SignWare SPCleanParameter parameter: SPCutRegionTop.)
  • cropWidth: Set the width of the rectangle that will be preserved by the next "crop" action. The default value is the image width minus the value set by the "cropLeft" action (or 0 if not set). (Equivalent SignWare SPCleanParameter parameters: SPCutRegionLeft, SPCutRegionRight.)
  • rotate: Rotate the image; the value of this action specifies the rotation angle in degreees, positive for counter-clockwise negative for clockwise rotation, see SignDocImage.rotate(). White (or the brightest color in the palette for indexed images) is used as background color. (Equivalent SignWare SPCleanParameter parameters: SPRotateAngle, SPRotateEnable.)

This function throws SignDocUnknownParameterException if aName is not the name of an action with integer parameter, SignDocInvalidValueException if aValue is invalid.

Parameters
[in]aNameThe name of the action (case-sensitive).
[in]aValueThe value of the parameter.
See also
add(), addBoolean(), addNumber(), getIntegerAt()
synchronized void addNumber ( String  aName,
double  aValue 
) throws SignDocException

Add an action with a floating-point number parameter.

The following actions with a floating-point number parameter are available:

  • cleanFrames: removes all frames that have a weight smaller than aValue (0.0 through 1.0), see SignDocImage.cleanFrames(). (Equivalent SignWare SPCleanParameter parameters: SPCleanFrameEnable, SPCleanFrameTrust.)

This function throws SignDocUnknownParameterException if aName is not the name of an action with floating-point number parameter, SignDocInvalidValueException if aValue is invalid.

Parameters
[in]aNameThe name of the action (case-sensitive).
[in]aValueThe value of the parameter.
See also
add(), addBoolean(), addInteger(), getNumberAt()
synchronized void clear ( ) throws SignDocException

Remove all actions.

synchronized SignDocCleanParameters clone ( ) throws SignDocException

Clone this object.

Returns
A clone of this object.
synchronized void close ( )

Destroy the underlying native object (for java.lang.AutoCloseable).

After calling this method, all methods but close() will throw SignDocUnexpectedErrorException.

void finalize ( ) throws Throwable
protected

Finalize this object.

Do not call this method unless you know what you are doing.

synchronized Boolean getBooleanAt ( int  aIndex) throws SignDocException

Get the value of a boolean parameter.

Parameters
[in]aIndexThe zero-based index of the action.
Returns
The value of the parameter or null if the index is invalid or if the action does not have a boolean parameter.
See also
addBoolean()
synchronized String getErrorMessage ( ) throws SignDocException

Get an error message for the last function call.

Returns
A string describing the reason for the failure of the last function call. The string is empty if the last call succeeded.
synchronized Integer getIntegerAt ( int  aIndex) throws SignDocException

Get the value of an integer parameter.

Parameters
[in]aIndexThe zero-based index of the action.
Returns
The value of the parameter or null if the index is invalid or if the action does not have an integer parameter.
See also
addInteger()
synchronized String getNameAt ( int  aIndex) throws SignDocException

Get the name of an action.

Parameters
[in]aIndexThe zero-based index of the action.
Returns
The name of the action or null if the index is out of range.
See also
getNumberOfActions(), getTypeAt()
synchronized Double getNumberAt ( int  aIndex) throws SignDocException

Get the value of a floating-point number parameter.

Parameters
[in]aIndexThe zero-based index of the action.
Returns
The value of the parameter or null if the index is invalid or if the action does not have a floating-point number parameter.
See also
addNumber()
synchronized int getNumberOfActions ( ) throws SignDocException

Get the numbers of actions.

Returns
The number of actions that have been successfully added.
See also
getBooleanAt(), getIntegerAt(), getNameAt(), getNumberAt(), getTypeAt()
static int getType ( String  aName) throws SignDocException
static

Get the type of a parameter.

Parameters
[in]aNameThe name of the action (case-sensitive).
Returns
The type of the parameter: t_undefined, t_boolean, t_integer, t_number, or t_void.
See also
getTypeAt()
synchronized int getTypeAt ( int  aIndex) throws SignDocException

Get the type of the parameter of an action.

Parameters
[in]aIndexThe zero-based index of the action.
Returns
The type of the parameter: t_undefined, t_boolean, t_integer, t_number, or t_void.
See also
getNameAt(), getNumberOfActions(), getType()

Member Data Documentation

final int t_boolean = 1
static

Return value of getType() and getTypeAt(): Boolean.

See also
addBoolean()
final int t_integer = 2
static

Return value of getType() and getTypeAt(): Integer.

See also
addInteger()
final int t_number = 3
static

Return value of getType() and getTypeAt(): Floating-point number.

See also
addNumber()
final int t_undefined = 0
static

Return value of getType() and getTypeAt(): The specified action is not defined.

final int t_void = 7
static

Return value of getType() and getTypeAt(): void (no value).

See also
add()

The documentation for this class was generated from the following file: