replaced BufferedImage with Image

master
melvin 2011-07-25 12:04:50 +08:00
parent 945dfc9110
commit cd49405445
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package magic.ui.viewer;
import java.awt.BorderLayout;
import java.awt.image.BufferedImage;
import java.awt.Image;
import javax.swing.JPanel;
@ -56,13 +57,13 @@ public class CardViewer extends JPanel implements DelayedViewer {
if (cardDefinition!=currentCardDefinition||index!=currentIndex) {
currentCardDefinition=cardDefinition;
currentIndex=index;
final BufferedImage cardImage;
final Image cardImage;
float opacity=1.0f;
if (image&&GeneralConfig.getInstance().isHighQuality()) {
if (!opaque) {
opacity=((float)ThemeFactory.getInstance().getCurrentTheme().getValue(Theme.VALUE_POPUP_OPACITY))/100.0f;
}
final BufferedImage sourceImage =
final Image sourceImage =
HighQualityCardImagesProvider.getInstance().getImage(cardDefinition,index,true);
final int imageWidth=sourceImage.getWidth(this);
final int imageHeight=sourceImage.getHeight(this);