![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.klimt.drawing.AbstractUGraphicHorizontalLine 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;
import net.sourceforge.plantuml.klimt.UChange;
import net.sourceforge.plantuml.klimt.UClip;
import net.sourceforge.plantuml.klimt.UShape;
import net.sourceforge.plantuml.klimt.UTranslate;
import net.sourceforge.plantuml.klimt.shape.UHorizontalLine;
public abstract class AbstractUGraphicHorizontalLine extends UGraphicDelegator {
// ::remove file when __HAXE__
private UTranslate translate = UTranslate.none();
public UGraphic apply(UChange change) {
final AbstractUGraphicHorizontalLine result;
if (change instanceof UTranslate) {
result = copy(getUg());
result.translate = this.translate.compose((UTranslate) change);
} else if (change instanceof UClip) {
final UClip clip = ((UClip) change).translate(translate);
result = copy(getUg().apply(clip));
result.translate = this.translate;
} else {
result = copy(getUg().apply(change));
result.translate = this.translate;
}
return result;
}
protected abstract AbstractUGraphicHorizontalLine copy(UGraphic ug);
protected AbstractUGraphicHorizontalLine(UGraphic ug) {
super(ug);
}
protected abstract void drawHline(UGraphic ug, UHorizontalLine line, UTranslate translate);
public void draw(UShape shape) {
if (shape instanceof UHorizontalLine) {
drawHline(getUg(), (UHorizontalLine) shape, UTranslate.dy(translate.getDy()));
} else {
getUg().apply(translate).draw(shape);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy