JavaFX build Arc To Path - Java javafx.scene.shape

Java examples for javafx.scene.shape:Path

Description

JavaFX build Arc To Path

Demo Code


//package com.java2s;

import javafx.scene.shape.ArcTo;

public class Main {


    /**/*ww  w  .  j a v  a  2s .  c  o m*/
     *
     * @param x
     * @param y
     * @param rX
     * @param rY
     * @return
     */
    public static ArcTo buildArcTo(double x, double y, double rX, double rY) {
        ArcTo arcTo = new ArcTo();
        arcTo.setX(x);
        arcTo.setY(y);
        arcTo.setRadiusX(rX);
        arcTo.setRadiusY(rY);
        return arcTo;
    }

    /**
     *
     * @param x
     * @param y
     * @param rX
     * @param rY
     * @param sweepFlag
     * @return
     */
    public static ArcTo buildArcTo(double x, double y, double rX,
            double rY, boolean sweepFlag) {
        ArcTo arcTo = buildArcTo(x, y, rX, rY);
        arcTo.setSweepFlag(sweepFlag);
        return arcTo;
    }
}

Related Tutorials