|
CIC iSign Version 1.2 | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
java.lang.Object | +--InkTools.CicDoodle
CIC's general ink object. A signature is at its basic level a collection of x/y data (points) which are collected into strokes (defined as the points from 'pen down' to 'pen up')(see InkTools.CicStroke) which are then collected within a CicDoodle object. Therefore the CicDoodle object represents the ink data of a signature.
Within the InkTools SDK, the CicDoodle object is used to collect, store and manipulate the ink data of a signature. This structure is used as the input for many of the InkTools classes.
The ink data is collected and stored in its original (raw) form, this means the sampling resolution and sampling rate of the input device (digitizer) as well as the point range of the input device (digitizer extension) must be stored with the point data in order to correctly map the ink data onto the screen and to get the right result from the verification engine. Functions to set these values as well as function to rescale the ink data are provided.
In order to save the ink data on file or database, or to transmit ink data over network/internet, a streamOut function is provided. The streamOut function will convert the ink data into a byte stream, will compress and encrypt the ink data and transform the byte stream into an ASCI string if this is desired. Functions to set encryption and compression parameters are provided. With the streamIn function a previously streamed out signature can get relaoded into a doodle for redisplay or signature verification.
| Field Summary | |
static int |
BASE64
specifies stabdarde Base64 encoding |
static int |
CIC_PRINTABLE
specifies CIC's nonPrinting encoding |
static int |
DES
used in setEnryptionAlg: DES 56 bit encryption algorithm |
static int |
DES40
used in setEnryptionAlg: DES 40 bit encryption algorithm |
static int |
FAST
used in setEnryptionAlg: CIC's FAST encryption algorithm |
static int |
TRIPLEDES
used in setEnryptionAlg: DES 128 bit encryption algorithm |
| Constructor Summary | |
CicDoodle()
Contructs an empty ink object. |
|
CicDoodle(CicDoodle sourceD)
Constructs an ink object from another ink object by duplicating all data. |
|
| Method Summary | |
void |
add(CicStroke newStroke)
Clones the stroke and adds it to the doodle. |
void |
copyDoodle(CicDoodle targetD,
CicDoodle sourceD)
Copies the source doodle into the target doodle. |
void |
delete()
Deletes all the ink data from the doodle. |
void |
enableEncryption(boolean enable)
Enables the encryption for the streamOut function. |
CicDoodle |
getCopyOfDoodle()
Creates a new CicDoodle objects and dublicates all the values (clone). |
java.awt.Rectangle |
getInkBounds()
Returns the bounderies of the current Ink in screen coordinates. |
CicStroke |
getLastStroke()
Returns the last stroke added to this this object. |
int |
getNumberOfPoints()
Returns the total number of points within this ink object. |
int |
getNumberOfStrokes()
Returns the number of strokes within this ink object. |
int |
getSamplingRate()
Returns the sampling rate of the input device on which the current ink was collected. |
int |
getSpatResolution()
Returns the spatial resolution of the input device on which the current ink was collected. |
CicStroke |
getStroke(int index)
Returns the stroke referenced by index. |
int |
getXExtent()
Gets the x extent for this ink object. |
int |
getYExtent()
Gets the y extent for this ink object. |
boolean |
hasInk()
Checks if this ink object has any ink data in it. |
void |
newPoint(java.awt.Point newPoint)
Adds a new point to the current stroke. |
CicStroke |
newStroke()
Creates a new and empty CicStroke object and adds it to the doodle. |
void |
offsetDoodle(int xOff,
int yOff)
Adds the offset to all points of the doodle. |
void |
scale(double xScale,
double yScale)
Scales the current ink according to the passed in values. |
void |
setCompressionLevel(int level)
Sets the compression level for the ink data the streamOut function will use: |
void |
setEncryptionAlg(int alg)
Sets the encryption algorithm: |
void |
setEncryptionKey(java.lang.String key)
Sets the encryption key. |
void |
setSamplingRate(int newSamplingRate)
Sets the sampling rate of the device used for collecting the ink. |
void |
setSpatResolution(int newSpatResolution)
Sets the spatial resolution of the input device for the current ink. |
boolean |
setStringEncodingAlg(int encoderAlgorithm)
Sets the encoding algorithm if the streamOut function is called with removeNonPrinting set to true. |
void |
setXExtent(int newXExtent)
Sets the x extent for this ink object. |
void |
setYExtent(int newYExtent)
Sets the y extent for this ink object. |
boolean |
streamIn(byte[] byteInArray)
Stream ink in from a byte array. |
boolean |
streamIn(java.lang.String fileName)
Streams ink data in from a file. |
byte[] |
streamOut(boolean removeNonePrinting)
Streams the current ink out into a byte array. |
boolean |
streamOut(java.lang.String fileName,
boolean removeNonePrinting)
Streams the current ink out into a file. |
void |
takeStroke(CicStroke newStroke)
Adds this stroke to the doodle. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DES40
public static final int DES
public static final int TRIPLEDES
public static final int FAST
public static final int CIC_PRINTABLE
public static final int BASE64
| Constructor Detail |
public CicDoodle()
public CicDoodle(CicDoodle sourceD)
| Method Detail |
public CicStroke newStroke()
public void add(CicStroke newStroke)
newStroke - the stroke to be clonedpublic void takeStroke(CicStroke newStroke)
newStroke - stroke to be added.public void newPoint(java.awt.Point newPoint)
newPoint - the point to be addedpublic byte[] streamOut(boolean removeNonePrinting)
removeNonePrinting - true if the byte stream should consist only of
printable ASCII characters, false otherwise
public boolean streamOut(java.lang.String fileName,
boolean removeNonePrinting)
fileName - the file name for the ink dataremoveNonePrinting - true if the byte stream should consist only of
printable ASCII characters, false otherwise
public boolean streamIn(java.lang.String fileName)
fileName - the file containing the ink data
public boolean streamIn(byte[] byteInArray)
byteInArray - the byte array containing the ink
public void delete()
public int getNumberOfStrokes()
public boolean hasInk()
public int getNumberOfPoints()
public CicStroke getStroke(int index)
index - the index number of the stroke to be returned
public CicStroke getLastStroke()
public void setXExtent(int newXExtent)
newXExtent - the x extentpublic int getXExtent()
public void setYExtent(int newYExtent)
newYExtent - the y extentpublic int getYExtent()
public void setSamplingRate(int newSamplingRate)
newSamplingRate - the sampling ratepublic int getSamplingRate()
public void setSpatResolution(int newSpatResolution)
newSpatResolution - the new spatial resolutionpublic int getSpatResolution()
public java.awt.Rectangle getInkBounds()
public void scale(double xScale,
double yScale)
xScale - valueyScale - value
public void offsetDoodle(int xOff,
int yOff)
xOff - offset valueyOff - offset valuepublic void enableEncryption(boolean enable)
enable - true to enable -, false to disable encryptionpublic void setEncryptionAlg(int alg)
alg - the number for the encryption algorithmpublic void setEncryptionKey(java.lang.String key)
key - the encryption key stringpublic void setCompressionLevel(int level)
level - the compression levelpublic CicDoodle getCopyOfDoodle()
public void copyDoodle(CicDoodle targetD,
CicDoodle sourceD)
targetD - the target doodlesourceD - the source doodlepublic boolean setStringEncodingAlg(int encoderAlgorithm)
encoderAlgorithm - either CIC_PRINTABLE or BASE64
|
CIC iSign Version 1.2 | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||