@Test public void testCreateSvgWidthAndHeightNotSetBg() throws Exception { Color backgroundColor = ColorParser.toColor("rgba(214, 214, 214, 200)"); URI file = NorthArrowGraphic.create( new Dimension(200, 200), "file: backgroundColor, Math.PI / 2, getTaskDirectory(), this.requestFactoryWrapper, true); new ImageSimilarity(getFile(BASE_DIR + "expected-north-arrow_10-bg.png")).assertSimilarity( file, 200, 200, 70); }
public static URI create( final Dimension targetSize, final String graphicFile, final Color backgroundColor, final Double rotation, final File workingDir, final MfClientHttpRequestFactory clientHttpRequestFactory, final boolean allowTransparency) throws Exception { try (Closer closer = Closer.create()) { final RasterReference input = loadGraphic(graphicFile, clientHttpRequestFactory, closer); if (graphicFile == null || graphicFile.toLowerCase().trim().endsWith("svg")) { return createSvg(targetSize, input, rotation, backgroundColor, workingDir); } else { return createRaster(targetSize, input, rotation, backgroundColor, workingDir, allowTransparency); } } }
NorthArrowGraphic { public static URI create( final Dimension targetSize, final String graphicFile, final Color backgroundColor, final Double rotation, final File workingDir, final MfClientHttpRequestFactory clientHttpRequestFactory, final boolean allowTransparency) throws Exception { try (Closer closer = Closer.create()) { final RasterReference input = loadGraphic(graphicFile, clientHttpRequestFactory, closer); if (graphicFile == null || graphicFile.toLowerCase().trim().endsWith("svg")) { return createSvg(targetSize, input, rotation, backgroundColor, workingDir); } else { return createRaster(targetSize, input, rotation, backgroundColor, workingDir, allowTransparency); } } } }
NorthArrowGraphic { public static URI create( final Dimension targetSize, final String graphicFile, final Color backgroundColor, final Double rotation, final File workingDir, final MfClientHttpRequestFactory clientHttpRequestFactory, final boolean allowTransparency) throws Exception { try (Closer closer = Closer.create()) { final RasterReference input = loadGraphic(graphicFile, clientHttpRequestFactory, closer); if (graphicFile == null || graphicFile.toLowerCase().trim().endsWith("svg")) { return createSvg(targetSize, input, rotation, backgroundColor, workingDir); } else { return createRaster(targetSize, input, rotation, backgroundColor, workingDir, allowTransparency); } } } private  NorthArrowGraphic(); }
NorthArrowGraphic { public static URI create( final Dimension targetSize, final String graphicFile, final Color backgroundColor, final Double rotation, final File workingDir, final MfClientHttpRequestFactory clientHttpRequestFactory, final boolean allowTransparency) throws Exception { try (Closer closer = Closer.create()) { final RasterReference input = loadGraphic(graphicFile, clientHttpRequestFactory, closer); if (graphicFile == null || graphicFile.toLowerCase().trim().endsWith("svg")) { return createSvg(targetSize, input, rotation, backgroundColor, workingDir); } else { return createRaster(targetSize, input, rotation, backgroundColor, workingDir, allowTransparency); } } } private  NorthArrowGraphic(); static URI create(
            final Dimension targetSize,
            final String graphicFile,
            final Color backgroundColor,
            final Double rotation,
            final File workingDir,
            final MfClientHttpRequestFactory clientHttpRequestFactory,
            final boolean allowTransparency); }
NorthArrowGraphic { public static URI create( final Dimension targetSize, final String graphicFile, final Color backgroundColor, final Double rotation, final File workingDir, final MfClientHttpRequestFactory clientHttpRequestFactory, final boolean allowTransparency) throws Exception { try (Closer closer = Closer.create()) { final RasterReference input = loadGraphic(graphicFile, clientHttpRequestFactory, closer); if (graphicFile == null || graphicFile.toLowerCase().trim().endsWith("svg")) { return createSvg(targetSize, input, rotation, backgroundColor, workingDir); } else { return createRaster(targetSize, input, rotation, backgroundColor, workingDir, allowTransparency); } } } private  NorthArrowGraphic(); static URI create(
            final Dimension targetSize,
            final String graphicFile,
            final Color backgroundColor,
            final Double rotation,
            final File workingDir,
            final MfClientHttpRequestFactory clientHttpRequestFactory,
            final boolean allowTransparency);  }