Control iSignUtil

This control contains various utility functions to render and create graphic files.

C# Syntax:

ISIGNUTILCONTROLLib.iSignUtilClass object = new ISIGNUTILCONTROLLib.iSignUtilClass( );
object.InkToJpeg(...);
object.CreateGraphicsFile(...);

 

VB.Net Syntax:

Dim object As ISIGNUTILCONTROLLib.iSignUtilClass = New ISIGNUTILCONTROLLib.iSignUtilClass
object.InkToJpeg(...)
object.CreateGraphicsFile(...)

Property Summary
_Displaymode

DisplayMode

Sets the display mode of the control for image output.

_EncrAlg

EncryptionAlgorithm

Sets the encryption algorithm.

int

EncryptionEnabled

Enables/disables the encryption of the ink.

string

EncryptionKey

Sets the encryption key.

_WritingGuideStyle

WritingGuide

Sets the writing guide of the control for image output.

 

Method Summary
void

CreateGraphicsFile(long nFormat, long nWidth, long nHeight, long nInkColor, String sSignature, String sFilename)

Create a graphic file taking format, width, height, ink color, signature, and file name as arguments.

long

GetLastError( )

This function returns the last known error code.

void

InkToJpeg(Long nWidth, Long nHeight, Long nInkColor, String sSignature, String sFile)

Converts a Signature string into a JPEG file.

void

SetRenderingOptions (long InkQaulity)

Sets the rendering option of the newly created graphic file.

 

 

Property Details

DisplayMode

public static ISIGNUTILCONTROLLib._DisplayMode DisplayMode

Sets the display mode of the control for image output

Options:

Custom
Normal
Proportional Fit
ScaleToControl
ShiftToControl

VB.Net Usage: object.DisplayMode = ISIGNUTILCONTROLLib._DisplayMode.ScaleToControl

C# Usage: object.DisplayMode = ISIGNUTILCONTROLLib._DisplayMode.ScaleToControl;


EncryptionAlgorithm

public static ISIGNUTILCONTROLLib._EncrAlg EncryptionAlgorithm

Sets the encryption algorithm.

Options:

-1
NONE
No encryption algorithm specified.
0
FAST CIC's FAST encryption algorithm
1
DES DES 56 bit encryption algorithm
2
DES_40 DES 40 bit encryption algorithm
3
TRIPLE_DES DES 128 bit encryption algorithm

VB.Net Usage: object.EncryptionAlgorithm = 3  ' Triple_DES used here

C# Usage: object.EncryptionAlgorithm = (ISIGNUTILCONTROLLib._EncrAlg) 3;  // Triple_DES used here


EncryptionEnabled

public static int EncryptionEnabled

Enables/disables the encryption of the ink.

Options:

0
Disabled
1
Enabled

VB.Net Usage: object.EncryptionEnabled = 1

C# Usage: object.EncryptionEnabled = 1;


EncryptionKey

public static string EncryptionKey

Sets the encryption key.

VB.Net Usage: object.Encryptionkey = "12345678"

C# Usage: object.Encryptionkey = "12345678";


WritingGuide

public static ISIGNUTILCONTROLLib._WritingGuideStyle WritingGuide

Sets the writing guide of the control for image output.

Options:

wgNONE
No writing guide
wgUnderline Specify the underline guide
wgSignatureLine Specify the signature line guide

VB.Net Usage: object.WritingGuide = ISIGNUTILCONTROLLib._WritingGuideStyle.wgSignatureLine

C# Usage: object.WritingGuide = ISIGNUTILCONTROLLib._WritingGuideStyle.wgSignatureLine;

 

 

Method Details

CreateGraphicsFile(long nFormat, long nWidth, long nHeight, long nInkColor, String sSignature, String sFilename)

public void CreateGraphicsFile (long nFormat, long nWidth, long nHeight, long nInkColor, String sSignature, String sFilename)

Create a graphic file taking format, width, height, ink color, signature, and file name as arguments.

nWidth - width in pixels

nHeight - height in pixels

nInkColor - ink color

sSignature - signature data

sFilename - output file name

nFormat: requesting graphics file format: GIF_FILE  = 1, JPEG_FILE = 2, TIFF_FILE = 3, PNG_FILE = 4,  BMP_FILE = 5

VB.Net Usage:

Dim object As ISIGNUTILCONTROLLib.iSignUtilClass = new ISIGNUTILCONTROLLib.iSignUtilClass

object.CreateGraphicsFile(...)

 

C# Usage:

ISIGNUTILCONTROLLib.iSignUtilClass object = new ISIGNUTILCONTROLLib.iSignUtilClass( );

object.CreateGraphicsFile(...);


GetLastError( )

public long GetLastError( )

This function returns the last known error code.

Returns:

0
eOK
1 eNoInk
2 eCreateBmpFailed
6 eCreateJpegFailed
10 eStreamInFailed

VB.Net Usage:

Dim object As ISIGNUTILCONTROLLib.iSignUtilClass = new ISIGNUTILCONTROLLib.iSignUtilClass

object.GetLastError

 

C# Usage:

ISIGNUTILCONTROLLib.iSignUtilClass object = new ISIGNUTILCONTROLLib.iSignUtilClass( );

object.GetLastError( );


InkToJpeg(Long nWidth, Long nHeight, Long nInkColor, String sSignature, String sFile)

public void InkToJpeg(Long nWidth, Long nHeight, Long nInkColor, String sSignature, String sFile)

Converts a Signature string into a JPEG file.

nWidth - width of jpeg in pixels

nHeight - height of jpeg in pixels

nInkColor - ink color

sSignature - signature data

sFile - output file name

VB.Net Usage:

Dim object As ISIGNUTILCONTROLLib.iSignUtilClass = new ISIGNUTILCONTROLLib.iSignUtilClass

object.InkToJpeg(...)

 

C# Usage:

ISIGNUTILCONTROLLib.iSignUtilClass object = new ISIGNUTILCONTROLLib.iSignUtilClass( );

object.InkToJpeg(...);


SetRenderingOptions(long InkQuality)

public void SetRenderingOptions(long InkQuality)

Sets the rendering option of the newly created graphic file.

Options:

0
OPT_DEFAULT no special treatment
1 OPT_ANTIALISING The signature will be anti-alized (GDIPlus)
2 OPT_SMOOTHING Points are connected through curved lines

VB.Net Usage: object.SetRenderingOptions(1)

C# Usage: object.SetRenderingOptions(1); // Anti-aliasing