So, to append a rectangle to a Path, you can do this
    Path2D rect = new Path2D.Double();
    rect.append(new Rectangle(10, 10, 100, 10), true);
What I want to do is something like this:
    Path2D circ = new Path2D.Double();
    circ.append(new Circle(... params) true);
Is there a way to do this? Thanks.
You would use an Ellipse2D and give it symmetric parameters.
e.g..,
circ.append(new Ellipse2D.Double(x, y, w, h), true); // where w == h
To see all the classes that inherit from java.awt.Shape please check out its API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With