|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.sketch.toolbox.StrokeFilter
diva.sketch.toolbox.InterpolateStrokeFilter
public class InterpolateStrokeFilter
For every 2 consecutive points in a stroke, fill in with evenly spaced points until the distance in between any 2 consecutive points no longer exceeds the threshold distance.
Field Summary | |
---|---|
static double |
DEFAULT_SPACING
|
Fields inherited from class diva.sketch.toolbox.StrokeFilter |
---|
PROPERTY_KEY |
Constructor Summary | |
---|---|
InterpolateStrokeFilter()
Create a InterpolateStrokeFilter with the default parameters. |
Method Summary | |
---|---|
TimedStroke |
apply(TimedStroke s)
Interpolate the given stroke such that no 2 consecutive points in the stroke has a distance greater than the specified spacing. |
double |
getSpacing()
Return the spacing parameter. |
static TimedStroke |
interpolate(TimedStroke s)
Interpolate the points in the given stroke using the default spacing value (20.0). |
static TimedStroke |
interpolate(TimedStroke s,
double spacing)
Interpolate the points in the given stroke using the specified spacing value. |
void |
setSpacing(double val)
Set the spacing value for adding interpolated points. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_SPACING
Constructor Detail |
---|
public InterpolateStrokeFilter()
Method Detail |
---|
public TimedStroke apply(TimedStroke s)
apply
in class StrokeFilter
public static TimedStroke interpolate(TimedStroke s)
public static TimedStroke interpolate(TimedStroke s, double spacing)
public double getSpacing()
public void setSpacing(double val)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |