-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.2.0
-
x86
-
windows_nt
Name: rm29839 Date: 02/03/98
The following is code excerpted from the java sources;
it shows that you guys are taking the control coordinates
into account when calculating the bounds. This approach
results in a bounding box that is consistently larger than
the curve's true bounding box.
public Rectangle2D getBounds2D() {
float left = Math.min(Math.min(x1, x2),
Math.min(ctrlx1, ctrlx2));
float top = Math.min(Math.min(y1, y2),
Math.min(ctrly1, ctrly2));
float right = Math.max(Math.max(x1, x2),
Math.max(ctrlx1, ctrlx2));
float bottom = Math.max(Math.max(y1, y2),
Math.max(ctrly1, ctrly2));
.. yada yada ..
}
}
(Review ID: 24378)
======================================================================
- duplicates
-
JDK-8176501 Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box
-
- Resolved
-