How can I draw the control points of a Bézier Path in Java?
Posted
by Sanoj
on Stack Overflow
See other posts from Stack Overflow
or by Sanoj
Published on 2010-03-28T16:19:52Z
Indexed on
2010/03/28
16:23 UTC
Read the original article
Hit count: 166
I have created a Path of Bézier curves and it works fine to draw the path. But I don't know How I can draw the Control Points together with the Path. Is that possible or do I have to keep track of them in another datastructure?
I am creating the path with:
Path2D.Double path = new Path2D.Double();
path.moveTo(0,0);
path.curveTo(5, 6, 23, 12, 45, 54);
path.curveTo(34, 23, 12, 34, 2, 3);
And drawing it with:
g2.draw(path);
© Stack Overflow or respective owner