Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
rogue-savage-rats/src/mightypork/gamecore/render/Screenshot.java

33 lines
781 B

package mightypork.gamecore.render;
import java.io.File;
import java.io.IOException;
/**
* <p>
* Screenshot object, can be used to save image to file.
* </p>
* <p>
* Screenshot typically takes a byte buffer and converts it to image before
* saving to file. This image can be cached to speed up repeated saving.
* </p>
* <p>
* Once created (passing byte buffer in constructor), the Screenshot should be
* safe to process (call the save() method) in separate thread.
* </p>
*
* @author MightyPork
*/
public interface Screenshot {
/**
* Process byte buffer and write image to a file.<br>
* Image can be cached for future save.
*
* @param file target file
* @throws IOException on error writing to file
*/
void save(File file) throws IOException;
}