-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.1.3
-
Fix Understood
-
sparc
-
solaris_2.5.1
Name: paC48320 Date: 09/18/97
java.awt.Graphics.fillRoundRect does not correctly
round the corners of the rectangle - the upper
left corner looks fine, the upper right and lower
left corners are somewhat worse, and the lower
right is much less rounded than the others. This
problem is most obvious with a relatively small
rectangle size (say around 24 pixels wide/tall).
Sample code:
Rectangle r = new Rectangle(100,100,24,24);
g.fillRoundRect(r.x,r.y,r.width,r.height,8,8);
The lower right corner is very nearly square, much
more so than the others.
I suspect this might be an off-by-one error, since
the drawRoundRect method (which produces the
expected results) says the right (bottom) edge of
the rect is at x+width (y+height) but the
fillRoundRect method says the right (bottom) edge
of the rect is at x+width-1 (y+height-1).
This problem occurs with both JDK 1.0.2 and 1.1.3.
It might possibly be related to bug 4061440 - it
references these same methods but I am not sure
what kind of problem "PostScript printing
incorrectly when using AWT API drawRoundRect,
fillRoundRect" refers to.
company - , email - ###@###.###
======================================================================