The vast and the sweeping. Modified the tile framework such that tiles no

longer provide access to their underlying image (they actually still do,
but not in the normal course of affairs). This will allow us to use
"trimmed" tiles which are trimmed to the smallest rectangle that contains
the non-transparent pixels in a tile image, which will shrink up our
components and other tiles a great deal.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1339 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-05-06 18:08:32 +00:00
parent 1c182d6e36
commit 99c4330646
24 changed files with 517 additions and 306 deletions
@@ -1,9 +1,10 @@
//
// $Id: ObjectTile.java,v 1.6 2002/01/31 02:08:52 mdb Exp $
// $Id: ObjectTile.java,v 1.7 2002/05/06 18:08:32 mdb Exp $
package com.threerings.media.tile;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import com.threerings.media.Log;
@@ -19,18 +20,19 @@ public class ObjectTile extends Tile
* Constructs a new object tile with the specified image. The base
* width and height should be set before using this tile.
*/
public ObjectTile (Image image)
public ObjectTile (Image image, Rectangle bounds)
{
super(image);
super(image, bounds);
}
/**
* Constructs a new object tile with the specified base width and
* height.
*/
public ObjectTile (Image image, int baseWidth, int baseHeight)
public ObjectTile (Image image, Rectangle bounds,
int baseWidth, int baseHeight)
{
super(image);
super(image, bounds);
_baseWidth = baseWidth;
_baseHeight = baseHeight;
}