Added ImageUtil.createImage() to create blank images that are compatible
with the destination screen device. Updated existing code that previously created buffered images directly to reference ImageUtil. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@870 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
//
|
||||
// $Id: TileUtil.java,v 1.6 2001/12/17 03:33:41 mdb Exp $
|
||||
// $Id: TileUtil.java,v 1.7 2002/01/18 17:48:11 shaper Exp $
|
||||
|
||||
package com.threerings.cast.util;
|
||||
|
||||
import java.awt.Image;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import com.threerings.media.ImageUtil;
|
||||
import com.threerings.media.sprite.MultiFrameImage;
|
||||
import com.threerings.media.sprite.Sprite;
|
||||
// import com.threerings.media.tile.*;
|
||||
|
||||
import com.threerings.cast.Log;
|
||||
// import com.threerings.cast.*;
|
||||
|
||||
/**
|
||||
* Miscellaneous tile-related utility functions.
|
||||
@@ -73,9 +71,8 @@ public class TileUtil
|
||||
_images = new Image[frameCount];
|
||||
for (int i = 0; i < frameCount; i++) {
|
||||
Image img = template.getFrame(i);
|
||||
_images[i] = new BufferedImage(img.getWidth(null),
|
||||
img.getHeight(null),
|
||||
BufferedImage.TYPE_INT_ARGB);
|
||||
_images[i] = ImageUtil.createImage(
|
||||
img.getWidth(null), img.getHeight(null));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user