diff --git a/pom.xml b/pom.xml index 03e41f7..4c98298 100755 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.orbisgis demat 1.0.0-SNAPSHOT - jar + pom Demat is breton word to said "Hello". Demat is library to run Vega-lite specifications. @@ -26,8 +26,11 @@ 3.0.0 + 3.0.2 3.3.0 5.1.2 + 3.1.0 + 3.8.1 3.0.0 3.0.1 3.2.0 @@ -387,8 +390,8 @@ https://github.com/ebocher/demat - The GNU General Public License, Version 3.0 - http://www.gnu.org/licenses/gpl-3.0.txt + GNU Lesser General Public License (LGPLV3+) + http://www.gnu.org/licenses/lgpl-3.0.html repo diff --git a/src/main/java/org/orbisgis/demat/SvgRasterizer.java b/src/main/java/org/orbisgis/demat/SvgRasterizer.java index d311e45..1d86439 100755 --- a/src/main/java/org/orbisgis/demat/SvgRasterizer.java +++ b/src/main/java/org/orbisgis/demat/SvgRasterizer.java @@ -58,32 +58,30 @@ import java.net.URL; import java.util.Map; -import static java.awt.RenderingHints.*; -import static java.awt.image.BufferedImage.TYPE_INT_ARGB; /** * @author Erwan Bocher, CNRS 2023-2024 */ public class SvgRasterizer { public final static Map RENDERING_HINTS = Map.of( - KEY_ANTIALIASING, - VALUE_ANTIALIAS_ON, - KEY_ALPHA_INTERPOLATION, - VALUE_ALPHA_INTERPOLATION_QUALITY, - KEY_COLOR_RENDERING, - VALUE_COLOR_RENDER_QUALITY, - KEY_DITHERING, - VALUE_DITHER_DISABLE, - KEY_FRACTIONALMETRICS, - VALUE_FRACTIONALMETRICS_ON, - KEY_INTERPOLATION, - VALUE_INTERPOLATION_NEAREST_NEIGHBOR, - KEY_RENDERING, - VALUE_RENDER_QUALITY, - KEY_STROKE_CONTROL, - VALUE_STROKE_PURE, - KEY_TEXT_ANTIALIASING, - VALUE_TEXT_ANTIALIAS_ON + RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_ON, + RenderingHints.KEY_ALPHA_INTERPOLATION, + RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY, + RenderingHints.KEY_COLOR_RENDERING, + RenderingHints.VALUE_COLOR_RENDER_QUALITY, + RenderingHints.KEY_DITHERING, + RenderingHints.VALUE_DITHER_DISABLE, + RenderingHints.KEY_FRACTIONALMETRICS, + RenderingHints.VALUE_FRACTIONALMETRICS_ON, + RenderingHints.KEY_INTERPOLATION, + RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR, + RenderingHints.KEY_RENDERING, + RenderingHints.VALUE_RENDER_QUALITY, + RenderingHints.KEY_STROKE_CONTROL, + RenderingHints.VALUE_STROKE_PURE, + RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_ON ); private final static SVGUniverse sRenderer = new SVGUniverse(); @@ -108,7 +106,7 @@ public BufferedImage rasterize(final InputStream path, final float ratio ) final int wScaled = (int) scaled.getWidth(); final int hScaled = (int) scaled.getHeight(); - final BufferedImage image = new BufferedImage( wScaled, hScaled, TYPE_INT_ARGB ); + final BufferedImage image = new BufferedImage( wScaled, hScaled, BufferedImage.TYPE_INT_ARGB ); final Graphics2D g = image.createGraphics(); g.setRenderingHints( RENDERING_HINTS );