Public Member Functions | |
InkSimplification () | |
boolean | processNewSample (PenSample sample) |
void | reset () |
void | simplifyStroke (InkStroke currentStroke) |
The stroke simplification algorithm this smooths out little bumps
If the stroke is in the same general direction (within the 90 degree cone of the most recent velocity vectors), then we only add new points if they are far enough away...
If the stroke is turning in a different direction, then the threshold is much smaller...
This software is distributed under the BSD License.
Definition at line 32 of file InkSimplification.java.
boolean processNewSample | ( | PenSample | sample | ) |
sample |
Definition at line 47 of file InkSimplification.java.
References PenSample.timestamp, PenSample.x, and PenSample.y.
Referenced by InkSimplification.simplifyStroke().
void simplifyStroke | ( | InkStroke | currentStroke | ) |
currentStroke |
Definition at line 135 of file InkSimplification.java.
References InkStroke.getSamples(), InkSimplification.processNewSample(), InkSimplification.reset(), and InkStroke.setSamples().
Referenced by PenSimulator.mouseReleased().