Public Types | |
BATCHED | |
enum | InkSource { BATCHED, STREAMED, UNKNOWN } |
Public Member Functions | |
Ink () | |
New ink object w/ an empty array of strokes. | |
Ink (File xmlFile) | |
Create an ink object from a serialized XML file. | |
Ink (List< InkStroke > theStrokes) | |
void | addStroke (InkStroke s) |
String | getAsXML () |
String | getAsXML (boolean useSeparatorLines) |
Represents this Ink object as an XML string. | |
Color | getColor () |
String | getInnerXML () |
String | getInnerXML (boolean useSeparatorLines) |
double | getMaxX () |
double | getMaxY () |
double | getMinX () |
double | getMinY () |
String | getName () |
int | getNumStrokes () |
InkRenderer | getRenderer () |
PageAddress | getSourcePageAddress () |
InkSource | getSourceType () |
List< InkStroke > | getStrokes () |
void | loadFromXMLFile (File xmlFileSource) |
Load strokes and other information from an xml file. | |
void | removeStroke (InkStroke s) |
File | renderToJPEGFile () |
void | resetColor () |
Start over. | |
void | saveToXMLFile (File xmlFileDest) |
Save this object out as an XML file. | |
void | setColor (Color c) |
void | setName (String theName) |
Use this for anything you like. | |
void | setSourcePageAddress (PageAddress address) |
Set the Anoto page address that we got this Ink object from. | |
void | setSourcePageAddress (String pageAddrString) |
void | setSourceType (InkSource src) |
List<InkStroke>
... However, this class will provide nice functions for clustering strokes, selecting strokes, etc. This software is distributed under the BSD License.
Definition at line 28 of file Ink.java.
enum InkSource |
Ink | ( | File | xmlFile | ) |
Create an ink object from a serialized XML file.
xmlFile |
Definition at line 104 of file Ink.java.
References Ink.loadFromXMLFile().
void addStroke | ( | InkStroke | s | ) |
s | the stroke to be added to the internal list. |
Definition at line 124 of file Ink.java.
Referenced by BatchedEventHandler.batchedDataArrived(), GestureDatabase.createBestImage(), GestureDatabase.display(), GestureDatabase.generateGesture(), and PenSimulator.mousePressed().
String getAsXML | ( | boolean | useSeparatorLines | ) |
Represents this Ink object as an XML string.
useSeparatorLines |
Definition at line 142 of file Ink.java.
References Ink.getInnerXML().
String getAsXML | ( | ) |
Definition at line 132 of file Ink.java.
Referenced by HandwritingRecognizer.recognizeHandwriting(), and Ink.saveToXMLFile().
Color getColor | ( | ) |
Definition at line 155 of file Ink.java.
Referenced by InkPCanvas.addInk(), and InkRenderer.renderToG2D().
String getInnerXML | ( | boolean | useSeparatorLines | ) |
String getName | ( | ) |
int getNumStrokes | ( | ) |
Definition at line 211 of file Ink.java.
Referenced by CalibrationEngine.alignInkStrokes().
InkRenderer getRenderer | ( | ) |
PageAddress getSourcePageAddress | ( | ) |
Definition at line 236 of file Ink.java.
Referenced by CalibrationEngine.alignInkStrokes().
List<InkStroke> getStrokes | ( | ) |
Definition at line 250 of file Ink.java.
Referenced by InkPCanvas.addInk(), CalibrationEngine.alignInkStrokes(), InkUtils.getStrokeWithMostSamples(), and InkRenderer.renderToG2D().
void loadFromXMLFile | ( | File | xmlFileSource | ) |
File renderToJPEGFile | ( | ) |
void resetColor | ( | ) |
void saveToXMLFile | ( | File | xmlFileDest | ) |
Save this object out as an XML file.
xmlFileDest |
Definition at line 296 of file Ink.java.
References Ink.getAsXML().
void setColor | ( | Color | c | ) |
void setName | ( | String | theName | ) |
Use this for anything you like.
It may help in debugging, or uniquely identifying ink clusters.
theName |
Definition at line 313 of file Ink.java.
Referenced by BatchedEventHandler.batchedDataArrived().
void setSourcePageAddress | ( | String | pageAddrString | ) |
pageAddrString |
Definition at line 331 of file Ink.java.
References Ink.setSourcePageAddress().
void setSourcePageAddress | ( | PageAddress | address | ) |
Set the Anoto page address that we got this Ink object from.
When we do this, it is implied that our sourceType is BATCHED.
address |
Definition at line 323 of file Ink.java.
References Ink.setSourceType().
Referenced by BatchedEventHandler.batchedDataArrived(), and Ink.setSourcePageAddress().
void setSourceType | ( | InkSource | src | ) |