CIC iSign Version 1.2

InkTools
Class CicStroke

java.lang.Object
  |
  +--InkTools.CicStroke
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class CicStroke
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

This class defines the CIC stroke object. The line (data) between the pen down and the pen up constitudes a stroke. In InkTools the signatures are stored in CicDoodle objects which stores the data as an array of CicStrokes objects. A signatures contains several strokes or only one stroke.

Version:
1.0
Author:
CIC
See Also:
Serialized Form

Constructor Summary
CicStroke()
          Creates empty CicStroke object.
CicStroke(CicStroke newStroke)
          Creates a new CicStroke object and copies the stroke data from newStroke into it (clone).
 
Method Summary
 void addOffset(int xOffset, int yOffset)
          Adds the Offset to the Stroke.
 void addPoint(java.awt.Point point)
          Adds the point to the stroke.
 int getNumberOfPoints()
          Returns the number of points within this Stroke
 java.awt.Point getPoint(int index)
          Returns the Point object of index within this Stroke.
 void takePoint(java.awt.Point p)
          Adds the point to the stroke.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CicStroke

public CicStroke()
Creates empty CicStroke object.


CicStroke

public CicStroke(CicStroke newStroke)
Creates a new CicStroke object and copies the stroke data from newStroke into it (clone).

Parameters:
newStroke - the stroke from which the new stroke gets constructed
Method Detail

addOffset

public void addOffset(int xOffset,
                      int yOffset)
Adds the Offset to the Stroke. Used for scaling and displaying.

Parameters:
xOffset - the value added to the x coordinates
yOffset - the value added to the y coordinates

addPoint

public void addPoint(java.awt.Point point)
Adds the point to the stroke. Point was allocated by caller. This function adds a copy (clone) of the point to the stroke.

Parameters:
point - the point which gets added to this stroke

takePoint

public void takePoint(java.awt.Point p)
Adds the point to the stroke. Point was allocated by caller. Does not make a copy of the point.

Parameters:
p - the point which gets added to this stroke

getNumberOfPoints

public int getNumberOfPoints()
Returns the number of points within this Stroke

Returns:
number of points within this stroke

getPoint

public java.awt.Point getPoint(int index)
Returns the Point object of index within this Stroke.

Parameters:
index - the index number of the point to retrieve
Returns:
the point object requested

CIC iSign Version 1.2