net.sourceforge.plantuml.dedication.PSystemDedication 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.dedication;
import java.awt.image.BufferedImage;
import java.util.Objects;
import net.atmp.PixelImage;
import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.PlainDiagram;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.klimt.AffineTransformType;
import net.sourceforge.plantuml.klimt.drawing.UGraphic;
import net.sourceforge.plantuml.klimt.shape.UDrawable;
import net.sourceforge.plantuml.klimt.shape.UImage;
public class PSystemDedication extends PlainDiagram {
private final BufferedImage img;
public PSystemDedication(UmlSource source, BufferedImage img) {
super(source);
this.img = Objects.requireNonNull(img);
}
@Override
protected UDrawable getRootDrawable(FileFormatOption fileFormatOption) {
// return ug -> ug.draw(new UImage(new PixelImage(img,
// AffineTransformType.TYPE_BILINEAR)));
return new UDrawable() {
public void drawU(UGraphic ug) {
ug.draw(new UImage(new PixelImage(img, AffineTransformType.TYPE_BILINEAR)));
}
};
}
public DiagramDescription getDescription() {
return new DiagramDescription("(Dedication)");
}
}