fixing png export test

This commit is contained in:
Pablo Luna 2011-03-25 17:21:56 +00:00
parent 392176430e
commit 179a76be59
2 changed files with 3 additions and 1 deletions

View File

@ -243,7 +243,7 @@ public class MindMap {
// Add namespace... // Add namespace...
result = result.replaceFirst("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" "); result = result.replaceFirst("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ");
result = result.replaceAll("<image([^>]+)>", "<image$1/>"); // result = result.replaceAll("<image([^>]+)>", "<image$1/>");
return result.toCharArray(); return result.toCharArray();
} }

View File

@ -48,6 +48,8 @@ public class ExportTest {
final ExportProperties properties = ExportProperties.create(format); final ExportProperties properties = ExportProperties.create(format);
final ExportProperties.ImageProperties imageProperties = (ExportProperties.ImageProperties) properties; final ExportProperties.ImageProperties imageProperties = (ExportProperties.ImageProperties) properties;
imageProperties.setSize(ExportProperties.ImageProperties.Size.LARGE); imageProperties.setSize(ExportProperties.ImageProperties.Size.LARGE);
String baseUrl = "file://"+svgFile.getParentFile().getAbsolutePath()+"/../../../main/webapp/images";
properties.setBaseImagePath(baseUrl);
// Write content ... // Write content ...
MindMap mindMap = new MindMap(); MindMap mindMap = new MindMap();