|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.guir.lib.satin.stroke.StrokeLib
Utilities for manipulating strokes, including:
Polygon2D.simplify()
for how to simplify a polyline.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Aug 02 1999, JH Created class - SATIN-v1.0-1.0.0, Jul 22 2000, JH Moved the temporal and spatial distance methods from PhraseInterpreter to here. - SATIN-v2.1-1.0.0, Aug 11 2000, JH Touched for SATIN release - SATIN-v2.1-1.1.0, Oct 07 2000, JH Added computeApproxDirectionVector()
Inner classes inherited from class edu.berkeley.guir.lib.satin.SatinConstants |
SatinConstants.ObjectPoolAffineTransform, SatinConstants.ObjectPoolPoint2D, SatinConstants.ObjectPoolPolygon2D, SatinConstants.ObjectPoolRectangle2D, SatinConstants.ObjectPoolStringBuffer, SatinConstants.UniqueAffineTransform, SatinConstants.UniquePoint2D, SatinConstants.UniquePolygon2D, SatinConstants.UniqueRectangle2D |
Constructor Summary | |
StrokeLib()
|
Method Summary | |
static Point2D |
computeApproxDirection(int cdsys,
TimedStroke stk)
Given a stroke, approximate the direction that the last few endpoints are going in. |
static double |
computeDistance(double relImportanceSpace,
double relImportanceTime,
TimedStroke stk1,
TimedStroke stk2)
Compute the distance between two strokes in some "stroke-space". |
static double |
computeDistance(TimedStroke stk1,
TimedStroke stk2)
Compute the distance between two strokes in some "stroke-space". |
static double |
computeHandwritingDistance(TimedStroke stk1,
TimedStroke stk2)
Compute how far two strokes are in "handwriting space". |
static double |
computeSpatialDistance(double relImportanceX,
double relImportanceY,
TimedStroke stk1,
TimedStroke stk2)
Compute the spatial distance between two strokes. |
static double |
computeSpatialDistance(TimedStroke stk1,
TimedStroke stk2)
Calls the other computeSpatialDistance() method using unbiased distances (ie weights of 1). |
static double |
computeTemporalDistance(TimedStroke stk1,
TimedStroke stk2)
Compute the distance between two strokes in terms of time. |
static double |
computeTemporalDistance(TimedStroke stk1,
TimedStroke stk2,
double maxTimeDistance)
Compute the distance between two strokes in terms of time. |
static float[] |
getCumulativeLengths(Polygon2D poly)
Return an array that contains the cumulative length of the polygon. |
static float[] |
getCumulativeXValues(Polygon2D poly)
Return an array that contains the cumulative X values of the polygon. |
static float[] |
getCumulativeYValues(Polygon2D poly)
Return an array that contains the cumulative X values of the polygon. |
static TimedStroke |
linearize(TimedStroke stk)
Given a stroke, straighten it out. |
static TimedStroke |
mergeStrokes(TimedStroke stkAA,
TimedStroke stkBB)
Do our best to merge two strokes together into a new one. |
static List |
splitStroke(TimedStroke stk,
Rectangle2D rect)
Given a stroke and a box, return an iterator to a list of strokes that results from erasing the region in the box, possibly cutting the given stroke into several smaller strokes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StrokeLib()
Method Detail |
public static float[] getCumulativeLengths(Polygon2D poly)
public static float[] getCumulativeXValues(Polygon2D poly)
public static float[] getCumulativeYValues(Polygon2D poly)
public static Point2D computeApproxDirection(int cdsys, TimedStroke stk)
cdsys
- is the coordinate system to use.stk
- is the stroke whose approximate direction we want.public static double computeSpatialDistance(TimedStroke stk1, TimedStroke stk2)
public static double computeSpatialDistance(double relImportanceX, double relImportanceY, TimedStroke stk1, TimedStroke stk2)
Method uses a version of the algorithm proposed by Chiu and Wilcox in Chiu, P. and Wilcox, L. "A Dynamic Grouping Technique for Ink and Audio Notes," Proceedings of UIST 98, San Francisco, CA, November 1-4, 1998, pp. 195-202.
relImportanceX
- is the weight on the x-distance.relImportanceY
- is the weight on the y-distance.stk1
- is a stroke.stk2
- is a stroke.public static double computeTemporalDistance(TimedStroke stk1, TimedStroke stk2)
public static double computeTemporalDistance(TimedStroke stk1, TimedStroke stk2, double maxTimeDistance)
Method uses a version of the algorithm proposed by Chiu and Wilcox in Chiu, P. and Wilcox, L. "A Dynamic Grouping Technique for Ink and Audio Notes," Proceedings of UIST 98, San Francisco, CA, November 1-4, 1998, pp. 195-202.
public static double computeDistance(TimedStroke stk1, TimedStroke stk2)
public static double computeHandwritingDistance(TimedStroke stk1, TimedStroke stk2)
public static double computeDistance(double relImportanceSpace, double relImportanceTime, TimedStroke stk1, TimedStroke stk2)
Method uses a version of the algorithm proposed by Chiu and Wilcox in Chiu, P. and Wilcox, L. "A Dynamic Grouping Technique for Ink and Audio Notes," Proceedings of UIST 98, San Francisco, CA, November 1-4, 1998, pp. 195-202.
public static TimedStroke linearize(TimedStroke stk)
public static TimedStroke mergeStrokes(TimedStroke stkAA, TimedStroke stkBB)
public static List splitStroke(TimedStroke stk, Rectangle2D rect)
stk
- is the stroke to cut.rect
- is the Rectangle in absolute coordinates.
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |