Public Member Functions | |
PatternPackage (File location) | |
PatternDots | getMinPatternX () |
PatternDots | getMinPatternY () |
String | getName () |
double | getNumDotsHorizontalBetweenPages () |
double | getNumDotsVerticalBetweenPages () |
int | getNumPatternColsPerFile () |
int | getNumPatternRowsPerFile () |
StreamedPatternCoordinates | getPatternCoordinateOfOriginOfFile (int patternFileNumber) |
Given a starting pattern file, we can determine the origin (top left corner) based on our knowledge of the origin of the first file, and the distance between each file. | |
String[] | readPatternFromFile (int numPatternFile, Units originX, Units originY, Units width, Units height) |
We verify that numDotsX and numDotsY do not exceed the amount of dots in one file. | |
String | toString () |
Static Public Member Functions | |
static Map< String, PatternPackage > | getAvailablePatternPackages (File patternLocation) |
All interaction with the specific pattern files should go in this class. This class also contains the mapping between Streamed Pattern Coordinates and Batched Coordinates (from docking the pen). This mapping is read from the XML file, and determined experimentally, by the Calibration classes.
This software is distributed under the BSD License.
Definition at line 43 of file PatternPackage.java.
PatternPackage | ( | File | location | ) |
location | this directory contains .pattern files (text files that contain the pattern as described by Anoto) and a config.xml file, which describes the physical coordinates, among other things. |
Definition at line 164 of file PatternPackage.java.
Referenced by PatternPackage.getAvailablePatternPackages().
static Map<String, PatternPackage> getAvailablePatternPackages | ( | File | patternLocation | ) | [static] |
Definition at line 50 of file PatternPackage.java.
References PatternPackage.getName(), and PatternPackage.PatternPackage().
PatternDots getMinPatternX | ( | ) |
Definition at line 240 of file PatternPackage.java.
PatternDots getMinPatternY | ( | ) |
Definition at line 247 of file PatternPackage.java.
String getName | ( | ) |
Definition at line 254 of file PatternPackage.java.
Referenced by PatternPackage.getAvailablePatternPackages().
double getNumDotsHorizontalBetweenPages | ( | ) |
Definition at line 261 of file PatternPackage.java.
Referenced by TiledPattern.getNumHorizDotsBetweenTiles().
double getNumDotsVerticalBetweenPages | ( | ) |
Definition at line 268 of file PatternPackage.java.
Referenced by TiledPattern.getNumVertDotsBetweenTiles().
int getNumPatternColsPerFile | ( | ) |
Definition at line 275 of file PatternPackage.java.
Referenced by TiledPatternGenerator.displayTilingInformation(), TiledPatternGenerator.getPattern(), and TiledPattern.TiledPattern().
int getNumPatternRowsPerFile | ( | ) |
Definition at line 282 of file PatternPackage.java.
Referenced by TiledPatternGenerator.displayTilingInformation(), TiledPatternGenerator.getPattern(), and TiledPattern.TiledPattern().
StreamedPatternCoordinates getPatternCoordinateOfOriginOfFile | ( | int | patternFileNumber | ) |
Given a starting pattern file, we can determine the origin (top left corner) based on our knowledge of the origin of the first file, and the distance between each file.
patternFileNumber |
Definition at line 293 of file PatternPackage.java.
References Units.getValue().
Referenced by TiledPattern.TiledPattern().
String [] readPatternFromFile | ( | int | numPatternFile, | |
Units | originX, | |||
Units | originY, | |||
Units | width, | |||
Units | height | |||
) |
We verify that numDotsX and numDotsY do not exceed the amount of dots in one file.
If so, the requested number of dots are modified to fit. Thus, the dimension of the String[] may be smaller than you requested. You may want to make sure numDotsX/Y are correct if you do not want to be surprised.
numPatternFile | The number of the pattern file (numPatternFile.pattern). | |
originX | Which column of pattern to start from (0 dots is the leftmost column) | |
originY | Which row of pattern to start reading from (0 dots is the topmost column) | |
width | How many dots across do we need? (in whatever Units is most convenient for you) | |
height | How many dots down do we need? |
Definition at line 324 of file PatternPackage.java.
References Units.getValueInPatternDots().
String toString | ( | ) |