Bug fix for the map's "outside" property that wasn't handled properly.

Added support for the new "colorfilter" map property. Due to Java2D
having no correct color filter support, only the "blackXX" values can be
previwed. "bw" and "invert" cannot, the performance cost was simply way
too high.
This commit is contained in:
Zukero
2016-08-08 16:31:38 +02:00
parent 57b8209b26
commit 1458fb0aaa
13 changed files with 312 additions and 32 deletions

View File

@@ -29,6 +29,7 @@
package tiled.core;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.Properties;
/**
@@ -36,7 +37,7 @@ import java.util.Properties;
*/
public class Tile
{
private Image image;
private BufferedImage image;
private int id = -1;
private Properties properties;
private TileSet tileset;
@@ -76,7 +77,7 @@ public class Tile
*
* @param i the new image of the tile
*/
public void setImage(Image i) {
public void setImage(BufferedImage i) {
image = i;
}
@@ -133,7 +134,7 @@ public class Tile
*
* @return Image
*/
public Image getImage() {
public BufferedImage getImage() {
if (tileset != null && tileset.sheet != null) return tileset.sheet.getImage(getId());
return image;
}