I understand that, and that is what Sun has done. However, including the
control points means I can't use the bounding box to determine the size of
the shape -- and I don't know how to calculate the smallest rectangle.
-----Original Message-----
From: Discussion list for Java 2D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Alexandre Sieira Vilar
Sent: Saturday, September 25, 1999 2:20 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA2D] How do you calculate more exact bounds for a
shape?
Using the control points to calculate _a_ bounding box of a curve
always works. You will obtain a rectangle that encloses the curve. The
only problem with that method is that it is not guaranteed to give you
_the_ bounding box, which is usually defined the _smallest_ rectangle
that encloses the curve.
For most applications, however, the control point method is good
enough. It is also much faster than obtaining a precise bounding box,
not to mention a lot easier to implement.
===========================================================================
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".