float radius = 5.0f;
GeneralPath gp = new GeneralPath(new Ellipse2D.Float(x,y, radius, radius));

This will create a circle with a radius of 5.
Mike
******************************************
Michael TOULA
Software Engineer

Dalim Software GmbH
Strassburger Str. 6
D-77694
Kehl am Rhein
GERMANY

tel:   +49 7851 919 612
fax:  +49 7851 735 76
web:   www.dalim.com
******************************************



[EMAIL PROTECTED]
Sent by: Discussion list for Java 2D API <[EMAIL PROTECTED]>

06/11/06 17:35

Please respond to
[EMAIL PROTECTED]

To
[EMAIL PROTECTED]
cc
Subject
[JAVA2D] How to create a circle using GeneralPath.





Hi everyone!

 I have to create a circle or a sector using GeneralPath. This class has two methods for draw it: curveTo an quadTo. My problem is that i don´t know how to calculate the controls points. I read some about Bezier curve, but i don´t undertand it very well.

   thanks in advance.
[Message sent by forum member 'fordfarline' (fordfarline)]

http://forums.java.net/jive/thread.jspa?messageID=170756

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to