net.sourceforge.plantuml.klimt.drawing.hand.UDotPathHand 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.hand;
import java.util.Random;
import net.sourceforge.plantuml.klimt.UPath;
import net.sourceforge.plantuml.klimt.geom.XCubicCurve2D;
import net.sourceforge.plantuml.klimt.shape.DotPath;
public class UDotPathHand {
private final UPath path;
public UDotPathHand(DotPath source, Random rnd) {
final HandJiggle jiggle = HandJiggle.create(source.getStartPoint(), 2.0, rnd);
for (XCubicCurve2D curve : source.getBeziers())
jiggle.curveTo(curve);
this.path = jiggle.toUPath();
}
public UPath getHanddrawn() {
return this.path;
}
}