Java examples for javafx.scene.shape:Path
JavaFX add Horizontal Line To Path
import java.util.ArrayList; import java.util.List; import javafx.scene.shape.ArcTo; import javafx.scene.shape.ClosePath; import javafx.scene.shape.HLineTo; import javafx.scene.shape.LineTo; import javafx.scene.shape.MoveTo; import javafx.scene.shape.Path; import javafx.scene.shape.PathElement; import javafx.scene.shape.QuadCurveTo; import javafx.scene.shape.Shape; import javafx.scene.shape.VLineTo; import javafx.scene.transform.Affine; public class Main{ /**//from ww w .j a v a 2 s .c om * @param pathSegment * @param x */ public static void addHLineTo(List<PathElement> pathSegment, double x) { pathSegment.add(builddHLineTo(x)); } /** * * @param x * @return */ public static HLineTo builddHLineTo(double x) { HLineTo hLineTo = new HLineTo(); hLineTo.setX(x); return hLineTo; } }