build JavaFX Quad Curve - Java javafx.scene.shape

Java examples for javafx.scene.shape:QuadCurve

Description

build JavaFX Quad Curve

Demo Code


//package com.java2s;

import javafx.scene.shape.QuadCurve;

public class Main {

    /**/*from   w  ww.  java2s  . c  o  m*/
     *
     * @param sx
     * @param sy
     * @param ex
     * @param ey
     * @param cx
     * @param cy
     * @return
     */
    public static QuadCurve buildQuadCurve(double sx, double sy, double ex,
            double ey, double cx, double cy) {
        QuadCurve quad = new QuadCurve();
        quad.setStartX(sx);
        quad.setStartY(sy);
        quad.setEndX(ex);
        quad.setEndY(ey);
        quad.setControlX(cx);
        quad.setControlY(cy);
        return quad;
    }
}

Related Tutorials