@Test public void testCreateSvgWidthAndHeightSet() throws Exception { URI file = NorthArrowGraphic.create( new Dimension(200, 200), "file: this.bgColor, 90.0, getTaskDirectory(), this.requestFactoryWrapper, true); new ImageSimilarity(getFile(BASE_DIR + "expected-north-arrow.png")) .assertSimilarity(file, 200, 200, 4); }
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);  }