|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.softpro.signdocmobile.foundations.TabletTrace
public class TabletTrace
TabletTrace represents a single pen stroke
TabletTrace the class used to record the trajectory of a pen as the user writes. These recordings describe sequences of connected TabletPoints. A TabletTrace starts when after a pen down event, and when the user lifts from the surface the current TabletTrace ends.
Nested Class Summary | |
---|---|
static class |
TabletTrace.WritingInstrument
|
Constructor Summary | |
---|---|
TabletTrace()
TabletTrace constructs an empty TabletTrace |
|
TabletTrace(TabletTrace aSrc)
TabletTrace copy constructor |
Method Summary | |
---|---|
void |
addPoint(float x,
float y,
float p,
long time)
Add an point to the current trace |
void |
addPoint(TabletPoint p)
Add an TabletPoint to the current trace |
void |
copy(TabletTrace src)
Copy an existing TabletTrace |
void |
endTrace(long time)
Mark the current trace finished, during a pen up event. |
TabletPoint |
getPoint(int index)
Get a TabletPoint contained in the trace by index |
java.util.List<TabletPoint> |
getPoints()
Get a list of the points in the trace |
int |
getSize()
The number of points in the trace |
TabletTrace.WritingInstrument |
getWritingInstrument()
Get the writing instrument |
boolean |
isEqual(TabletTrace b)
Check if two traces are equal |
void |
setWritingInstrument(TabletTrace.WritingInstrument aWritingInstrument)
Set the writing instrument |
java.lang.String |
toString()
|
java.lang.String |
toString(int numlines)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TabletTrace()
public TabletTrace(TabletTrace aSrc)
src
- TabletTrace to copyMethod Detail |
---|
public void copy(TabletTrace src)
src
- TabletTrace to copypublic void addPoint(TabletPoint p)
p
- TabletPoint to add to tracepublic void addPoint(float x, float y, float p, long time)
x
- X -coordinatey
- Y -coordinatep
- pressuretime
- timepublic java.util.List<TabletPoint> getPoints()
public TabletPoint getPoint(int index)
getSize()
public int getSize()
public void endTrace(long time)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int numlines)
public void setWritingInstrument(TabletTrace.WritingInstrument aWritingInstrument)
aWritingInstrument
- the writing instrument to setpublic TabletTrace.WritingInstrument getWritingInstrument()
public boolean isEqual(TabletTrace b)
b
- trace to compare to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |