replaced Image with BufferedImage

master
melvin 2011-07-29 10:37:14 +08:00
parent ca0901d030
commit 82e281f34c
1 changed files with 2 additions and 3 deletions

View File

@ -2,7 +2,6 @@ package magic.ui.viewer;
import java.awt.BorderLayout;
import java.awt.image.BufferedImage;
import java.awt.Image;
import javax.swing.JPanel;
@ -57,13 +56,13 @@ public class CardViewer extends JPanel implements DelayedViewer {
if (cardDefinition!=currentCardDefinition||index!=currentIndex) {
currentCardDefinition=cardDefinition;
currentIndex=index;
final Image cardImage;
final BufferedImage 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 Image sourceImage =
final BufferedImage sourceImage =
HighQualityCardImagesProvider.getInstance().getImage(cardDefinition,index,true);
final int imageWidth=sourceImage.getWidth(this);
final int imageHeight=sourceImage.getHeight(this);