Public Member Functions | |
TiledPatternGenerator () | |
Default Pattern Path Location (PaperToolkit), automatically copied by eclipse to the export folder: PaperToolkit. | |
TiledPatternGenerator (File patternPathLocation) | |
Customize the location of pattern definition files. | |
void | displayTilingInformation (Units horizontal, Units vertical) |
Prints out some information on the tiling. | |
PatternPackage | getCurrentPatternPackage () |
TiledPattern | getPattern (Units width, Units height) |
Returned pattern that is tiled appropriately, and automatically selected from the pattern package. | |
PatternPackage | getPatternPackageByName (String name) |
List< String > | listAvailablePatternPackageNames () |
void | resetUniquePatternTracker () |
Resets the tracked history in this object. | |
void | setPatternFileNumber (int num) |
Explicitly manipulate the page number which will be the source of pattern for the next call to getPattern(. | |
Static Public Attributes | |
static final String | DEFAULT_PATTERN_PACKAGE_NAME = "default" |
The name of the default pattern package (stored in pattern/default/). |
This object keeps track of what pattern blocks you have used. It stores it in a map of each page (basically a Rectangle2D bounds). Once a request comes in that is not servicable by this SINGLE page, it will increment the patternFile Number, and allow you to get pattern from the next page.
This software is distributed under the BSD License.
Definition at line 28 of file TiledPatternGenerator.java.
Default Pattern Path Location (PaperToolkit), automatically copied by eclipse to the export folder: PaperToolkit.
This will have to change at some point, when we move to the .jar deployment.
Definition at line 84 of file TiledPatternGenerator.java.
Prints out some information on the tiling.
..
Definition at line 100 of file TiledPatternGenerator.java.
References PatternPackage.getNumPatternColsPerFile(), PatternPackage.getNumPatternRowsPerFile(), and Units.getValueInPatternDots().
PatternPackage getCurrentPatternPackage | ( | ) |
TiledPattern getPattern | ( | Units | width, | |
Units | height | |||
) |
Returned pattern that is tiled appropriately, and automatically selected from the pattern package.
By default, this pattern generator class will keep track of which pattern it has given you, and will give you unique pattern (if possible) every time you call this method.
width | the amount of pattern we need | |
height |
Definition at line 158 of file TiledPatternGenerator.java.
References TiledPattern.getLastPatternFileUsed(), PatternPackage.getNumPatternColsPerFile(), PatternPackage.getNumPatternRowsPerFile(), and Units.getValueInPatternDots().
PatternPackage getPatternPackageByName | ( | String | name | ) |
name |
Definition at line 237 of file TiledPatternGenerator.java.
List<String> listAvailablePatternPackageNames | ( | ) |
the set of name of available pattern packages.
Definition at line 245 of file TiledPatternGenerator.java.
void resetUniquePatternTracker | ( | ) |
Resets the tracked history in this object.
The next call to getPattern(...) will start over at the default state after calling this function.
Definition at line 253 of file TiledPatternGenerator.java.
Referenced by TiledPatternGenerator.setPatternFileNumber().
void setPatternFileNumber | ( | int | num | ) |
Explicitly manipulate the page number which will be the source of pattern for the next call to getPattern(.
..)
num |
Definition at line 281 of file TiledPatternGenerator.java.
References TiledPatternGenerator.resetUniquePatternTracker().