![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.klimt.drawing.tikz.DriverImageTikz 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.drawing.tikz;
import net.sourceforge.plantuml.klimt.UParam;
import net.sourceforge.plantuml.klimt.color.ColorMapper;
import net.sourceforge.plantuml.klimt.drawing.UDriver;
import net.sourceforge.plantuml.klimt.shape.UImage;
import net.sourceforge.plantuml.tikz.TikzGraphics;
public class DriverImageTikz implements UDriver {
public void draw(UImage shape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) {
final String rawFileName = shape.getRawFileName();
if (rawFileName != null) {
final double scale = shape.getScale();
final String raw;
if (scale == 1)
raw = "\\includegraphics{" + rawFileName + "}";
else
raw = "\\includegraphics[scale=" + TikzGraphics.format(scale) + "]{" + rawFileName + "}";
tikz.appendRaw(x, y, raw);
return;
}
final String formula = shape.getFormula();
if (formula != null) {
tikz.appendRaw(x, y, formula);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy