SVG Salamander (JitPack), fix #560

This commit is contained in:
Emux
2018-08-12 15:50:22 +03:00
parent c9e266408e
commit ed735aea64
6 changed files with 11 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ apply plugin: 'maven'
dependencies {
api project(':vtm-gdx')
api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
api 'com.metsci.ext.com.kitfox.svg:svg-salamander:0.1.19'
api 'com.github.blackears:svgSalamander:v1.1.1'
}
sourceSets {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2017 devemux86
* Copyright 2015-2018 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
@@ -65,8 +65,8 @@ public class AwtSvgBitmap extends AwtBitmap {
SVGIcon icon = new SVGIcon();
icon.setAntiAlias(true);
icon.setAutosize(SVGIcon.AUTOSIZE_STRETCH);
icon.setPreferredSize(new Dimension((int) bitmapWidth, (int) bitmapHeight));
icon.setScaleToFit(true);
icon.setSvgURI(uri);
BufferedImage bufferedImage = new BufferedImage(icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
icon.paintIcon(null, bufferedImage.createGraphics(), 0, 0);