diff --git a/build.gradle b/build.gradle index 954e6c21..df2d8516 100644 --- a/build.gradle +++ b/build.gradle @@ -45,6 +45,7 @@ subprojects { maven { url 'https://repo.boundlessgeo.com/main/' } jcenter() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } + maven { url 'https://jitpack.io' } } tasks.withType(JavaCompile) { diff --git a/docs/Changelog.md b/docs/Changelog.md index dcd6d962..a64b8197 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -32,6 +32,7 @@ - `ViewController.setMapScreenCenter` renamed to `setMapViewCenter` - Android 9 compatibility [#550](https://github.com/mapsforge/vtm/issues/550) - JTS (LocationTech) [#484](https://github.com/mapsforge/vtm/issues/484) +- SVG Salamander (JitPack) [#560](https://github.com/mapsforge/vtm/issues/560) - Many other minor improvements and bug fixes - [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.10.0) diff --git a/docs/Integration.md b/docs/Integration.md index 8335cf00..c1f9500b 100644 --- a/docs/Integration.md +++ b/docs/Integration.md @@ -60,6 +60,10 @@ Detailed iOS instructions can be found [here](ios.md). ### Desktop ```groovy +repositories { + maven { url 'https://jitpack.io' } +} + implementation 'org.mapsforge:vtm-gdx:[CURRENT-VERSION]' implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]' implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-linux' @@ -72,7 +76,7 @@ implementation 'org.lwjgl.lwjgl:lwjgl:2.9.3' implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-linux' implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-osx' implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-windows' -implementation 'com.metsci.ext.com.kitfox.svg:svg-salamander:0.1.19' +implementation 'com.github.blackears:svgSalamander:v1.1.1' ``` ### JTS geometries diff --git a/docs/Rendertheme.md b/docs/Rendertheme.md index 2cb15db5..62d6c533 100644 --- a/docs/Rendertheme.md +++ b/docs/Rendertheme.md @@ -261,7 +261,7 @@ _VTM priorities have the opposite meaning to the Mapsforge render-theme prioriti ## Symbols -Symbols can be either defined in the raster PNG format or as vector graphics in SVG format. VTM uses libraries for [Android](https://github.com/BigBadaboom/androidsvg) and [Java](https://svgsalamander.java.net) that support a large subset of the [Tiny SVG](http://www.w3.org/TR/SVGTiny12/index.html) specification. +Symbols can be either defined in the raster PNG format or as vector graphics in SVG format. VTM uses libraries for [Android](https://github.com/BigBadaboom/androidsvg) and [Java](https://github.com/blackears/svgSalamander) that support a large subset of the [Tiny SVG](http://www.w3.org/TR/SVGTiny12/index.html) specification. ### SVG Scaling diff --git a/vtm-desktop/build.gradle b/vtm-desktop/build.gradle index 73477333..35820c34 100644 --- a/vtm-desktop/build.gradle +++ b/vtm-desktop/build.gradle @@ -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 { diff --git a/vtm-desktop/src/org/oscim/awt/AwtSvgBitmap.java b/vtm-desktop/src/org/oscim/awt/AwtSvgBitmap.java index cb8f357c..afc0ea93 100644 --- a/vtm-desktop/src/org/oscim/awt/AwtSvgBitmap.java +++ b/vtm-desktop/src/org/oscim/awt/AwtSvgBitmap.java @@ -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);