public class LargeMapImageUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected processing.core.PApplet |
p |
protected int |
totalHeight |
protected int |
totalWidth |
protected int |
xStep |
protected int |
yStep |
Constructor and Description |
---|
LargeMapImageUtils(processing.core.PApplet p,
UnfoldingMap map)
Creates a new LargeMapImageUtils which stores a large image double the size of the canvas.
|
LargeMapImageUtils(processing.core.PApplet p,
UnfoldingMap map,
int stitchNumber) |
LargeMapImageUtils(processing.core.PApplet p,
UnfoldingMap map,
int xStep,
int yStep,
int totalWidth,
int totalHeight) |
LargeMapImageUtils(processing.core.PApplet p,
UnfoldingMap map,
Location location,
int zoomLevel) |
LargeMapImageUtils(processing.core.PApplet p,
UnfoldingMap map,
Location location,
int zoomLevel,
int stitchNumber) |
LargeMapImageUtils(processing.core.PApplet p,
UnfoldingMap map,
Location location,
int zoomLevel,
int xStep,
int yStep,
int totalWidth,
int totalHeight) |
Modifier and Type | Method and Description |
---|---|
void |
init()
Initializes a new large map image around the current map center.
|
void |
init(Location location,
int zoomLevel)
Initializes a new large map image around the location.
|
processing.core.PImage |
makeSnapshot() |
protected void |
renderAndMakeSnapshot(int shotX,
int shotY)
Internal method to get the current map canvas (incl markers) and stores it in an buffer image.
|
void |
run()
Runs the recording process.
|
protected void |
saveLargeImage()
Internal method to save the actual large stitched-together image in one file.
|
void |
setImageFileName(java.lang.String imageFileName)
The full name of the final large image.
|
void |
setImageFilePrefix(java.lang.String imageFilePrefix)
Sets the prefix of the final large image file.
|
void |
setImageFileSuffix(java.lang.String imageFileSuffix)
Sets the suffix of the final large image file.
|
protected processing.core.PApplet p
protected int xStep
protected int yStep
protected int totalWidth
protected int totalHeight
public LargeMapImageUtils(processing.core.PApplet p, UnfoldingMap map)
p
- The PAppletmap
- The map to take screenshots from.public LargeMapImageUtils(processing.core.PApplet p, UnfoldingMap map, int stitchNumber)
public LargeMapImageUtils(processing.core.PApplet p, UnfoldingMap map, Location location, int zoomLevel)
public LargeMapImageUtils(processing.core.PApplet p, UnfoldingMap map, Location location, int zoomLevel, int stitchNumber)
public LargeMapImageUtils(processing.core.PApplet p, UnfoldingMap map, Location location, int zoomLevel, int xStep, int yStep, int totalWidth, int totalHeight)
public LargeMapImageUtils(processing.core.PApplet p, UnfoldingMap map, int xStep, int yStep, int totalWidth, int totalHeight)
public void init()
public void init(Location location, int zoomLevel)
location
- The location to center around.zoomLevel
- The zoom level to use.public void run()
protected void saveLargeImage()
protected void renderAndMakeSnapshot(int shotX, int shotY)
shotX
- Current x position of the large image to store the current screenshot to.shotY
- Current y position of the large image to store the current screenshot to.public processing.core.PImage makeSnapshot()
public void setImageFilePrefix(java.lang.String imageFilePrefix)
imageFilePrefix
- A image file prefix (supported by Processing, i.e. '.tif', '.png', '.jpg').public void setImageFileSuffix(java.lang.String imageFileSuffix)
imageFileSuffix
- A image file suffix, e.g. 'largeImage-'.public void setImageFileName(java.lang.String imageFileName)
imageFileName
- A file name.