_points = (List<Point>) RessourceManager.getRessource(key);
if (_points == null) {
try {
SVGUniverse svgUniverse = new SVGUniverse();
StringReader reader = new StringReader(svg);
SVGDiagram diagram = svgUniverse.getDiagram(svgUniverse.loadSVG(reader, "svgImage"));
int imgWidth = Tools.FTOI(diagram.getWidth() * resolution_multiplier);
int imgHeight = Tools.FTOI(diagram.getHeight() * resolution_multiplier);
// SVGRoot root = diagram.getRoot();
// root.setAttribute("width", AnimationElement.AT_XML, Integer.toString(imgWidth));
// root.setAttribute("height", AnimationElement.AT_XML, Integer.toString(imgHeight));
// root.build();
SimpleImage imgMap = new SimpleImage(imgWidth, imgHeight);
Graphics2D g = imgMap.getBufferedImg().createGraphics();
g.scale(resolution_multiplier, resolution_multiplier);
if (pre_antialias != 0) {
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
}
else {
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
}
diagram.render(g);
Pixel pixel = new Pixel();
_points = new ArrayList<Point>();
int xMin = imgMap.getImageWidth() - 1, xMax = 0;