net.sourceforge.plantuml.klimt.shape.UImageSvg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.klimt.shape;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.sourceforge.plantuml.klimt.UShape;
import net.sourceforge.plantuml.utils.SignatureUtils;
public class UImageSvg implements UShape {
// ::remove file when __HAXE__
private final String svg;
private final double scale;
public UImageSvg(String svg, double scale) {
this.svg = Objects.requireNonNull(svg);
this.scale = scale;
}
public String getMD5Hex() {
return SignatureUtils.getMD5Hex(svg);
}
public boolean containsXlink() {
return svg.contains("xmlns:xlink=\"http://www.w3.org/1999/xlink\"");
}
public String getSvg(boolean raw) {
String result = svg;
if (raw)
return result;
if (result.startsWith("");
result = "