public void CompareSvgImageWithReference(ImageTestDataSource.TestData testData) { // W3C Test Suites use external references to local fonts SvgDocument.ResolveExternalXmlEntites = ExternalType.Local; SvgDocument.ResolveExternalElements = ExternalType.Local; SvgDocument.ResolveExternalImages = ExternalType.Local; var basePath = testData.BasePath; while (!basePath.ToLower().EndsWith("svg")) { basePath = Path.GetDirectoryName(basePath); } basePath = Path.Combine(Path.Combine(basePath, "Tests"), "W3CTestSuite"); var svgBasePath = Path.Combine(basePath, "svg"); var baseName = testData.BaseName; bool testSaveLoad = !baseName.StartsWith("#"); if (!testSaveLoad) { baseName = baseName.Substring(1); } var svgPath = Path.Combine(Path.Combine(basePath, "svg"), baseName + ".svg"); var pngPath = Path.Combine(Path.Combine(basePath, "png"), baseName + ".png"); CompareSvgImageWithReferenceImpl(baseName, svgPath, pngPath, testSaveLoad); }
public void CompareSvgImageWithReference(ImageTestDataSource.TestData testData) { string basePath = testData.BasePath; string baseName = testData.BaseName; bool testSaveLoad = !baseName.StartsWith("#"); if (!testSaveLoad) { baseName = baseName.Substring(1); } var svgPath = Path.Combine(basePath, "svg", baseName + ".svg"); var pngPath = Path.Combine(basePath, "png", baseName + ".png"); CompareSvgImageWithReferenceImpl(baseName, svgPath, pngPath, testSaveLoad); }
public void CompareSvgImageWithReference(ImageTestDataSource.TestData testData) { var basePath = testData.BasePath; while (!basePath.ToLower().EndsWith("svg")) { basePath = Path.GetDirectoryName(basePath); } basePath = Path.Combine(Path.Combine(basePath, "Tests"), "W3CTestSuite"); var svgBasePath = Path.Combine(basePath, "svg"); var baseName = testData.BaseName; bool testSaveLoad = !baseName.StartsWith("#"); if (!testSaveLoad) { baseName = baseName.Substring(1); } var svgPath = Path.Combine(Path.Combine(basePath, "svg"), baseName + ".svg"); var pngPath = Path.Combine(Path.Combine(basePath, "png"), baseName + ".png"); CompareSvgImageWithReferenceImpl(baseName, svgPath, pngPath, testSaveLoad); }