![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.klimt.drawing.svg.DriverImagePng 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.svg;
import java.io.IOException;
import net.sourceforge.plantuml.klimt.ClipContainer;
import net.sourceforge.plantuml.klimt.UClip;
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.utils.Log;
public class DriverImagePng implements UDriver {
// ::remove file when __HAXE__
private final ClipContainer clipContainer;
public DriverImagePng(ClipContainer clipContainer) {
this.clipContainer = clipContainer;
}
public void draw(UImage image, double x, double y, ColorMapper mapper, UParam param, SvgGraphics svg) {
final UClip clip = clipContainer.getClip();
if (clip != null) {
if (clip.isInside(x, y) == false) {
return;
}
if (clip.isInside(x + image.getWidth(), y + image.getHeight()) == false) {
return;
}
}
try {
svg.svgImage(image.getImage(1), x, y);
} catch (IOException e) {
Log.error("Error in svg for image " + e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy