net.sourceforge.plantuml.klimt.font.UFontContext 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.font;
import java.awt.font.TextLayout;
import net.sourceforge.plantuml.FileFormat;
import net.sourceforge.plantuml.klimt.shape.UText;
public enum UFontContext {
EPS, SVG, G2D, TIKZ;
// ::comment when __HAXE__
public TextLayout createTextLayout(UText shape) {
return createTextLayout(shape.getFontConfiguration().getFont(), shape.getText());
}
public TextLayout createTextLayout(UFont font, String string) {
return new TextLayout(string, font.getUnderlayingFont(this), FileFormat.gg.getFontRenderContext());
}
}