|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.miso.tile.AutoFringer
public class AutoFringer
Automatically fringes a scene according to the rules in the supplied fringe configuration.
| Nested Class Summary | |
|---|---|
protected static class |
AutoFringer.FringerRec
A record for holding information about a particular fringe as we're computing what it will look like. |
static class |
AutoFringer.FringeTile
|
| Field Summary | |
|---|---|
protected FringeConfiguration |
_fringeconf
|
protected CheapIntMap |
_fringers
|
protected ImageManager |
_imgr
|
protected TileManager |
_tmgr
|
protected static int[] |
BITS_TO_INDEX
|
protected static int |
EAST
|
protected static int[][] |
FLAGMATRIX
|
protected static int[] |
FRINGETILES
The fringe tiles we use. |
protected static int |
NORTH
|
protected static int |
NORTHEAST
|
protected static int |
NORTHWEST
|
protected static int |
NUM_FRINGEBITS
|
protected static int |
SOUTH
|
protected static int |
SOUTHEAST
|
protected static int |
SOUTHWEST
|
protected static int |
WEST
|
| Constructor Summary | |
|---|---|
AutoFringer(FringeConfiguration fringeconf,
ImageManager imgr,
TileManager tmgr)
Constructs an instance that will fringe according to the rules in the supplied fringe configuration. |
|
| Method Summary | |
|---|---|
protected int |
adjustTileSetId(int tileSetId)
Allow subclasses to apply arbitrary modifications to tileset ids for whatever nefarious purposes they may have. |
protected AutoFringer.FringeTile |
composeFringeTile(AutoFringer.FringerRec[] fringers,
Map<AutoFringer.FringeTile,WeakReference<AutoFringer.FringeTile>> fringes,
int hashValue,
boolean passable,
Map<Long,BufferedImage> masks)
Compose a FringeTile out of the various fringe images needed. |
FringeConfiguration |
getFringeConf()
Returns the fringe configuration used by this fringer. |
protected int[] |
getFringeIndexes(int bits)
Get the fringe index specified by the fringebits. |
BaseTile |
getFringeTile(MisoSceneModel scene,
int col,
int row,
Map<AutoFringer.FringeTile,WeakReference<AutoFringer.FringeTile>> fringes,
Map<Long,BufferedImage> masks)
Compute and return the fringe tile to be inserted at the specified location. |
protected BufferedImage |
getTileImage(BufferedImage img,
FringeConfiguration.FringeTileSetRecord tsr,
int baseset,
int index,
int hashValue,
Map<Long,BufferedImage> masks)
Retrieve or compose an image for the specified fringe. |
protected BufferedImage |
stampTileImage(Object stamp,
BufferedImage ftimg,
int width,
int height)
Helper function for getTileImage(java.awt.image.BufferedImage, com.threerings.miso.tile.FringeConfiguration.FringeTileSetRecord, int, int, int, java.util.Map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int NORTH
protected static final int NORTHEAST
protected static final int EAST
protected static final int SOUTHEAST
protected static final int SOUTH
protected static final int SOUTHWEST
protected static final int WEST
protected static final int NORTHWEST
protected static final int NUM_FRINGEBITS
protected static final int[][] FLAGMATRIX
protected static final int[] FRINGETILES
protected static final int[] BITS_TO_INDEX
protected ImageManager _imgr
protected TileManager _tmgr
protected FringeConfiguration _fringeconf
protected CheapIntMap _fringers
| Constructor Detail |
|---|
public AutoFringer(FringeConfiguration fringeconf,
ImageManager imgr,
TileManager tmgr)
| Method Detail |
|---|
public FringeConfiguration getFringeConf()
public BaseTile getFringeTile(MisoSceneModel scene,
int col,
int row,
Map<AutoFringer.FringeTile,WeakReference<AutoFringer.FringeTile>> fringes,
Map<Long,BufferedImage> masks)
protected AutoFringer.FringeTile composeFringeTile(AutoFringer.FringerRec[] fringers,
Map<AutoFringer.FringeTile,WeakReference<AutoFringer.FringeTile>> fringes,
int hashValue,
boolean passable,
Map<Long,BufferedImage> masks)
protected BufferedImage getTileImage(BufferedImage img,
FringeConfiguration.FringeTileSetRecord tsr,
int baseset,
int index,
int hashValue,
Map<Long,BufferedImage> masks)
throws NoSuchTileSetException
NoSuchTileSetException
protected BufferedImage stampTileImage(Object stamp,
BufferedImage ftimg,
int width,
int height)
getTileImage(java.awt.image.BufferedImage, com.threerings.miso.tile.FringeConfiguration.FringeTileSetRecord, int, int, int, java.util.Map) .
protected int[] getFringeIndexes(int bits)
protected int adjustTileSetId(int tileSetId)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||