net.sourceforge.plantuml.klimt.font.FontPosition 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;
public enum FontPosition {
NORMAL, EXPOSANT, INDICE;
public int getSpace() {
if (this == EXPOSANT)
return -6;
if (this == INDICE)
return 3;
return 0;
}
public UFont mute(UFont font) {
if (this == NORMAL)
return font;
int size = font.getSize() - 3;
if (size < 2)
size = 2;
return font.withSize((float) size);
}
// ::comment when __HAXE__
public String getHtmlTag() {
if (this == EXPOSANT)
return "sup";
if (this == INDICE)
return "sub";
throw new UnsupportedOperationException();
}
}