Added svg support: generate HQ png files for HTML texts

This commit is contained in:
Oleg Agafonov 2017-11-26 18:21:58 +04:00
parent a5df082720
commit 37dc9bf73c
4 changed files with 45 additions and 13 deletions

View file

@ -83,11 +83,13 @@ public final class Constants {
public static final String RESOURCE_SYMBOL_FOLDER_MEDIUM = "medium";
public static final String RESOURCE_SYMBOL_FOLDER_LARGE = "large";
public static final String RESOURCE_SYMBOL_FOLDER_SVG = "svg";
public static final String RESOURCE_SYMBOL_FOLDER_PNG = "png";
public enum ResourceSymbolSize {
SMALL,
MEDIUM,
LARGE,
SVG
SVG,
PNG
}
// resources - sets

View file

@ -29,6 +29,7 @@ import mage.view.PermanentView;
import net.xeoh.plugins.base.PluginManager;
import net.xeoh.plugins.base.impl.PluginManagerFactory;
import org.apache.log4j.Logger;
import org.mage.card.arcane.ManaSymbols;
import org.mage.plugins.card.CardPluginImpl;
import org.mage.plugins.theme.ThemePluginImpl;
@ -131,8 +132,7 @@ public enum Plugins implements MagePlugins {
@Override
public void downloadSymbols() {
String useDefault = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_USE_DEFAULT, "true");
String path = useDefault.equals("true") ? null : PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_IMAGES_PATH, null);
String path = ManaSymbols.getImagesDir() + File.separator;
if (this.cardPlugin != null) {
this.cardPlugin.downloadSymbols(path);
}