![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.png.PngRotation 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.png;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import net.sourceforge.plantuml.utils.Log;
public class PngRotation {
// ::remove file when __CORE__
public static BufferedImage process(BufferedImage im) {
Log.info("Rotation");
final BufferedImage newIm = new BufferedImage(im.getHeight(), im.getWidth(), BufferedImage.TYPE_INT_RGB);
final Graphics2D g2d = newIm.createGraphics();
final AffineTransform at = new AffineTransform(0, 1, 1, 0, 0, 0);
at.concatenate(new AffineTransform(-1, 0, 0, 1, im.getWidth(), 0));
g2d.setTransform(at);
g2d.drawImage(im, 0, 0, null);
g2d.dispose();
return newIm;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy