|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunlekker.util.TileSaver
public class TileSaver
Class for rendering high-resolution images by splitting them into tiles using the OpenGL viewport. See the original entry on Code & Form for details.
Builds heavily on an original solution by Processing forum user "surelyyoujest". Modifications by Dave Bollinger allows larger images by flushing rows to Targa file upon completion. Thanks, Dave!
Field Summary | |
---|---|
boolean |
done
|
boolean |
doSavePreview
|
boolean |
isTiling
|
Constructor Summary | |
---|---|
TileSaver(processing.core.PApplet _p)
|
Method Summary | |
---|---|
boolean |
checkStatus()
Returns true if tiling is in progress. |
int |
getMaxTiles(int width)
Checks free memory and gives a suggestion for maximum tile resolution. |
void |
init(java.lang.String _filename)
If init() is called without specifying number of tiles, getMaxTiles() will be called to estimate number of tiles according to free memory. |
void |
init(java.lang.String _filename,
int _num)
Initialize using a filename to output to and number of tiles to use. |
void |
post()
post() handles tile update and image saving. |
void |
pre()
pre() handles initialization of each frame. |
void |
restoreCamera()
Used to restore camera once tiling is done. |
void |
setSaveType(java.lang.String extension)
set filetype, default is TGA. pass a valid image extension as parameter. |
void |
setupCamera()
Used to set up camera correctly for the current tile. |
void |
tileFinish()
tileFinish() handles the saving of the tiled image. |
void |
tileInc()
Increment tile coordinates. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean isTiling
public boolean done
public boolean doSavePreview
Constructor Detail |
---|
public TileSaver(processing.core.PApplet _p)
Method Detail |
---|
public void init(java.lang.String _filename)
public void init(java.lang.String _filename, int _num)
public void setSaveType(java.lang.String extension)
public void pre()
public void post()
public boolean checkStatus()
public void tileFinish()
public void tileInc()
public void setupCamera()
public void restoreCamera()
public int getMaxTiles(int width)
width
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |