SignDoc SDK (C)  5.0.0
SIGNDOC_CleanParameters Class Reference

Actions and parameters for SIGNDOC_SignatureData_clean(). More...

#include <SignDocSDK-c.h>

Public Member Functions

struct SIGNDOC_CleanParametersSIGNDOC_CleanParameters_new (struct SIGNDOC_Exception **aEx)
 SIGNDOC_CleanParameters constructor. More...
 
void SIGNDOC_CleanParameters_delete (struct SIGNDOC_CleanParameters *aObj)
 SIGNDOC_CleanParameters destructor. More...
 
struct SIGNDOC_CleanParametersSIGNDOC_CleanParameters_clone (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CleanParameters *aSource)
 Clone a SIGNDOC_CleanParameters object. More...
 
void SIGNDOC_CleanParameters_assign (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CleanParameters *aObj, const struct SIGNDOC_CleanParameters *aSource)
 SIGNDOC_CleanParameters assignment operator. More...
 
void SIGNDOC_CleanParameters_clear (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CleanParameters *aObj)
 Remove all actions. More...
 
int SIGNDOC_CleanParameters_getType (struct SIGNDOC_Exception **aEx, const char *aName)
 Get the type of the parameter of an action. More...
 
int SIGNDOC_CleanParameters_add (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CleanParameters *aObj, const char *aName)
 Add an action without parameter. More...
 
int SIGNDOC_CleanParameters_addBoolean (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CleanParameters *aObj, const char *aName, SIGNDOC_Boolean aValue)
 Add an action with a boolean parameter. More...
 
int SIGNDOC_CleanParameters_addInteger (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CleanParameters *aObj, const char *aName, int aValue)
 Add an action with an integer parameter. More...
 
int SIGNDOC_CleanParameters_addNumber (struct SIGNDOC_Exception **aEx, struct SIGNDOC_CleanParameters *aObj, const char *aName, double aValue)
 Add an action with a floating-point number parameter. More...
 
int SIGNDOC_CleanParameters_getNumberOfActions (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CleanParameters *aObj)
 Get the number of actions. More...
 
int SIGNDOC_CleanParameters_getTypeAt (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CleanParameters *aObj, int aIndex)
 Get the type of the parameter of an action. More...
 
const char * SIGNDOC_CleanParameters_getNameAt (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CleanParameters *aObj, int aIndex)
 Get the name of an action. More...
 
const SIGNDOC_BooleanSIGNDOC_CleanParameters_getBooleanAt (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CleanParameters *aObj, int aIndex)
 Get the value of a boolean parameter. More...
 
const int * SIGNDOC_CleanParameters_getIntegerAt (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CleanParameters *aObj, int aIndex)
 Get the value of an integer parameter. More...
 
const double * SIGNDOC_CleanParameters_getNumberAt (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CleanParameters *aObj, int aIndex)
 Get the value of a floating-point number parameter. More...
 
const char * SIGNDOC_CleanParameters_getErrorMessage (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CleanParameters *aObj, int aEncoding)
 Get an error message for the last function call. More...
 
const wchar_t * SIGNDOC_CleanParameters_getErrorMessageW (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_CleanParameters *aObj)
 Get an error message for the last function call. More...
 

Detailed Description

Actions and parameters for SIGNDOC_SignatureData_clean().

Member Function Documentation

int SIGNDOC_CleanParameters_add ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CleanParameters aObj,
const char *  aName 
)

Add an action without parameter.

The following actions without parameter are available:

  • cleanDate: Remove handwritten text from the signature image and crop, see SIGNDOC_Image_cleanDate(). (Equivalent SPCleanDateEnable parameter: SPCleanDateEnable.)
  • cleanLines: Remove horizontal and vertical lines, see SIGNDOC_Image_cleanLines(). (Equivalent SPCleanDateEnable parameter: SPCleanLineEnable.)
  • cleanSignature: Clean signature image and crop, see SIGNDOC_Image_cleanSignature(). (Equivalent SPCleanDateEnable parameter: SPCleanSignatureEnable.)
  • convertToBiLevel: Convert the image to bi-level black and white, see SIGNDOC_Image_convertToBiLevel(). (Equivalent SPCleanDateEnable parameter: SPBinarizeEnable.)
  • convertToGrayscale: Convert the image to 8-bit grayscale, see SIGNDOC_Image_convertToGrayscale().
  • convertToTrueColor: Convert the image to 24-bit RGB, see SIGNDOC_Image_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 SIGNDOC_Image_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 SIGNDOC_Image_mirrorX(). (Equivalent SPCleanDateEnable parameters: SPMirrorAxes, SPMirrorEnable.)
  • mirrorY: Mirror along the horizontal axis (flip vertically), see SIGNDOC_Image_mirrorY(). (Equivalent SPCleanDateEnable parameters: SPMirrorAxes, SPMirrorEnable.)
  • removeMargins: Remove white margins ignoring single black pixels, see SIGNDOC_Image_removeMargins(). (Equivalent SPCleanDateEnable parameter: SPCutSignatureRegionEnable.)
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aNameThe name of the action (case-sensitive).
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CleanParameters_addBoolean(), SIGNDOC_CleanParameters_addInteger(), SIGNDOC_CleanParameters_addNumber(), SIGNDOC_CleanParameters_getBooleanAt()
int SIGNDOC_CleanParameters_addBoolean ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CleanParameters aObj,
const char *  aName,
SIGNDOC_Boolean  aValue 
)

Add an action with a boolean parameter.

The following action with boolean parameter is available:

  • invert: invert the image, see SIGNDOC_Image_invert(). The value is SIGNDOC_FALSE to invert the image unconditionally, SIGNDOC_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.)
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aNameThe name of the action (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CleanParameters_add(), SIGNDOC_CleanParameters_addInteger(), SIGNDOC_CleanParameters_addNumber(), SIGNDOC_CleanParameters_getBooleanAt()
int SIGNDOC_CleanParameters_addInteger ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CleanParameters aObj,
const char *  aName,
int  aValue 
)

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 SIGNDOC_Image_rotate(). White (or the brightest color in the palette for indexed images) is used as background color. (Equivalent SignWare SPCleanParameter parameters: SPRotateAngle, SPRotateEnable.)
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aNameThe name of the action (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CleanParameters_add(), SIGNDOC_CleanParameters_addBoolean(), SIGNDOC_CleanParameters_addNumber(), SIGNDOC_CleanParameters_getIntegerAt()
int SIGNDOC_CleanParameters_addNumber ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CleanParameters aObj,
const char *  aName,
double  aValue 
)

Add an action with a floating-point number parameter.

The following action with a floating-point number parameter is available:

  • cleanFrames: removes all frames that have a weight smaller than aValue (0.0 through 1.0), see SIGNDOC_Image_cleanFrames(). (Equivalent SignWare SPCleanParameter parameters: SPCleanFrameEnable, SPCleanFrameTrust.)
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aNameThe name of the action (case-sensitive).
[in]aValueThe value of the parameter.
Returns
SIGNDOC_RETURNCODE_OK iff successful.
See also
SIGNDOC_CleanParameters_add(), SIGNDOC_CleanParameters_addBoolean(), SIGNDOC_CleanParameters_addInteger(), SIGNDOC_CleanParameters_getNumberAt()
void SIGNDOC_CleanParameters_assign ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CleanParameters aObj,
const struct SIGNDOC_CleanParameters aSource 
)

SIGNDOC_CleanParameters assignment operator.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aSourceThe source object.
void SIGNDOC_CleanParameters_clear ( struct SIGNDOC_Exception **  aEx,
struct SIGNDOC_CleanParameters aObj 
)

Remove all actions.

struct SIGNDOC_CleanParameters * SIGNDOC_CleanParameters_clone ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CleanParameters aSource 
)

Clone a SIGNDOC_CleanParameters object.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aSourceThe object to be copied.
Returns
A pointer to the new SIGNDOC_CleanParameters object.
See also
SIGNDOC_CleanParameters_delete()
void SIGNDOC_CleanParameters_delete ( struct SIGNDOC_CleanParameters aObj)

SIGNDOC_CleanParameters destructor.

Parameters
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
See also
SIGNDOC_CleanParameters_new()
const SIGNDOC_Boolean * SIGNDOC_CleanParameters_getBooleanAt ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CleanParameters aObj,
int  aIndex 
)

Get the value of a boolean parameter.

This function does not set an error message.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aIndexThe zero-based index of the action.
Returns
A pointer to the value of the specified parameter or NULL if aIndex is out of range or if the action does not have a boolean parameter.
See also
SIGNDOC_CleanParameters_addBoolean(), SIGNDOC_CleanParameters_getNumberOfActions()
const char * SIGNDOC_CleanParameters_getErrorMessage ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CleanParameters aObj,
int  aEncoding 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aEncodingThe encoding to be used for the error message (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1).
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_CleanParameters_getErrorMessageW()
const wchar_t * SIGNDOC_CleanParameters_getErrorMessageW ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CleanParameters aObj 
)

Get an error message for the last function call.

Note
Do not call SIGNDOC_free() on the return value.
Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until aObj is destroyed or a member function of aObj is called.
See also
SIGNDOC_CleanParameters_getErrorMessage()
const int * SIGNDOC_CleanParameters_getIntegerAt ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CleanParameters aObj,
int  aIndex 
)

Get the value of an integer parameter.

This function does not set an error message.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aIndexThe zero-based index of the action.
Returns
A pointer to the value of the specified parameter or NULL if aIndex is out of range or if the action does not have an integer parameter.
See also
SIGNDOC_CleanParameters_addInteger(), SIGNDOC_CleanParameters_getNumberOfActions()
const char * SIGNDOC_CleanParameters_getNameAt ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CleanParameters aObj,
int  aIndex 
)

Get the name of an action.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aIndexThe zero-based index of the action.
Returns
The name of the action or NULL if aIndex is out of range.
See also
SIGNDOC_CleanParameters_getNumberOfActions(), SIGNDOC_CleanParameters_getTypeAt()
const double * SIGNDOC_CleanParameters_getNumberAt ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CleanParameters aObj,
int  aIndex 
)

Get the value of a floating-point number parameter.

This function does not set an error message.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aIndexThe zero-based index of the action.
Returns
A pointer to the value of the specified parameter or NULL if aIndex is out of range or if the action does not have a floating-point number parameter.
See also
SIGNDOC_CleanParameters_addNumber(), SIGNDOC_CleanParameters_getNumberOfActions()
int SIGNDOC_CleanParameters_getNumberOfActions ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CleanParameters aObj 
)

Get the number of actions.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
Returns
The number of actions successfully added.
See also
SIGNDOC_CleanParameters_getNameAt(), SIGNDOC_CleanParameters_getTypeAt()
int SIGNDOC_CleanParameters_getType ( struct SIGNDOC_Exception **  aEx,
const char *  aName 
)

Get the type of the parameter of an action.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aNameThe name of the action (case-sensitive).
Returns
The type of the parameter: SIGNDOC_CLEANPARAMETERS_TYPE_UNDEFINED, SIGNDOC_CLEANPARAMETERS_TYPE_BOOLEAN, SIGNDOC_CLEANPARAMETERS_TYPE_INTEGER, SIGNDOC_CLEANPARAMETERS_TYPE_NUMBER, or SIGNDOC_CLEANPARAMETERS_TYPE_VOID.
See also
SIGNDOC_CleanParameters_getTypeAt()
int SIGNDOC_CleanParameters_getTypeAt ( struct SIGNDOC_Exception **  aEx,
const struct SIGNDOC_CleanParameters aObj,
int  aIndex 
)

Get the type of the parameter of an action.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
[in]aObjA pointer to the SIGNDOC_CleanParameters object.
[in]aIndexThe zero-based index of the action.
Returns
The type of the parameter: SIGNDOC_CLEANPARAMETERS_TYPE_UNDEFINED, SIGNDOC_CLEANPARAMETERS_TYPE_BOOLEAN, SIGNDOC_CLEANPARAMETERS_TYPE_INTEGER, SIGNDOC_CLEANPARAMETERS_TYPE_NUMBER, or SIGNDOC_CLEANPARAMETERS_TYPE_VOID.
See also
SIGNDOC_CleanParameters_getNameAt(), SIGNDOC_CleanParameters_getNumberOfActions(), SIGNDOC_CleanParameters_getType()
struct SIGNDOC_CleanParameters * SIGNDOC_CleanParameters_new ( struct SIGNDOC_Exception **  aEx)

SIGNDOC_CleanParameters constructor.

No actions will be set.

Parameters
[out]aExAny exception will be returned in the object pointed to by this parameter.
Returns
A pointer to the new SIGNDOC_CleanParameters object.
See also
SIGNDOC_CleanParameters_clone(), SIGNDOC_CleanParameters_delete()

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