replaced BufferedImage with Image
parent
945dfc9110
commit
cd49405445
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue