build JavaFX Ellipse - Java javafx.scene.shape

Java examples for javafx.scene.shape:Ellipse

Description

build JavaFX Ellipse

Demo Code


//package com.java2s;

import javafx.scene.shape.Ellipse;

public class Main {

    /**/*from w ww.j  a v  a2  s  .  c  o  m*/
     *
     * @param cx
     * @param cy
     * @param rx
     * @param ry
     * @return
     */
    public static Ellipse buildEllipse(double cx, double cy, double rx,
            double ry) {
        Ellipse ellipse = new Ellipse();
        ellipse.setCenterX(cx);
        ellipse.setCenterY(cy);
        ellipse.setRadiusX(rx);
        ellipse.setRadiusY(ry);
        return ellipse;
    }
}

Related Tutorials