Example usage for javafx.scene.shape CubicCurveTo setControlY1

List of usage examples for javafx.scene.shape CubicCurveTo setControlY1

Introduction

In this page you can find the example usage for javafx.scene.shape CubicCurveTo setControlY1.

Prototype

public final void setControlY1(double value) 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.setTitle("ComboBoxSample");
    Scene scene = new Scene(new Group(), 450, 250);

    Path path = new Path();

    MoveTo moveTo = new MoveTo();
    moveTo.setX(0.0f);//ww  w .  j  av  a2 s . c om
    moveTo.setY(0.0f);

    CubicCurveTo cubicTo = new CubicCurveTo();
    cubicTo.setControlX1(0.0f);
    cubicTo.setControlY1(0.0f);
    cubicTo.setControlX2(100.0f);
    cubicTo.setControlY2(100.0f);
    cubicTo.setX(100.0f);
    cubicTo.setY(50.0f);

    path.getElements().add(moveTo);
    path.getElements().add(cubicTo);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(path);
    stage.setScene(scene);
    stage.show();
}