diva.sketch.toolbox
Class NormalizeLengthStrokeFilter

java.lang.Object
  extended by diva.sketch.toolbox.StrokeFilter
      extended by diva.sketch.toolbox.NormalizeLengthStrokeFilter

public class NormalizeLengthStrokeFilter
extends StrokeFilter

Interpolate a timed stroke so that it contains a specified number of points.

Version:
$Revision: 1.3 $
Author:
Heloise Hse (hwawen@eecs.berkeley.edu)

Field Summary
 
Fields inherited from class diva.sketch.toolbox.StrokeFilter
PROPERTY_KEY
 
Constructor Summary
NormalizeLengthStrokeFilter(int numPoints)
          Interpolate to the given number of points.
 
Method Summary
 TimedStroke apply(TimedStroke s)
          Interpolate a timed stroke so that it contains a certain number of points (specified through the constructor).
 int getPointCount()
          Return the number of points that the filter interpolates to.
static TimedStroke interpolate(TimedStroke s, int numPoints)
          Interpolate the given stroke to make it the given number of points.
 void setPointCount(int numPoints)
          Set the number of points that the filter interpolates to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NormalizeLengthStrokeFilter

public NormalizeLengthStrokeFilter(int numPoints)
Interpolate to the given number of points.

Method Detail

getPointCount

public int getPointCount()
Return the number of points that the filter interpolates to.


setPointCount

public void setPointCount(int numPoints)
Set the number of points that the filter interpolates to.


apply

public TimedStroke apply(TimedStroke s)
Interpolate a timed stroke so that it contains a certain number of points (specified through the constructor).

Specified by:
apply in class StrokeFilter

interpolate

public static TimedStroke interpolate(TimedStroke s,
                                      int numPoints)
Interpolate the given stroke to make it the given number of points.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.