Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6729351
Votes 0
Synopsis RoundRectangle2D has non-round corner when filled
Category java:classes_2d
Reported Against b53
Release Fixed
State 11-Closed, Not a Defect, bug
Priority: 3-Medium
Related Bugs
Submit Date 24-JUL-2008
Description
FULL PRODUCT VERSION :
java version "1.6.0_10-beta"
Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b24)
Java HotSpot(TM) Client VM (build 11.0-b12, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux localhost.localdomain 2.6.20.1 #3 SMP Sun Mar 25 22:45:33 CEST 2007 i686 i686 i386 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
> RoundRectangle2D.Float rect = new RoundRectangle2D.Float(10, 10, 20, 20, 5, 5);
> g2d.fill(rect);

The code fills a RoundRectanlge but the upper-right round corner is too small and the lower-right corner is not round at all.
The RoundRectangle is filled correctly with 1.4.2 and 1.5, I don't have JDK6 (non u10) to test, sorry.
When antialiasing is enabled, everything looks fine.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run the code mentioned above, with antialiasing disabled

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
round rectangle with equal round corners
ACTUAL -
round rectangle with degenrated corners

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
RoundRectangle2D.Float rect = new RoundRectangle2D.Float(10, 10, 20, 20, 5, 5);
g2d.fill(rect);
---------- END SOURCE ----------

Release Regression From : 5.0
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.
Posted Date : 2008-07-24 10:51:18.0
Work Around
N/A
Evaluation
This is not a bug. The behaviour of fill operation was changed within the fix of
 4151279 to match draw operation with the same shape. To get old behaviour please
 use STROKE_CONTROL rendering hint. So, for the example from this report just add
 following line before the fill operation:

g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
                     RenderingHints.VALUE_STROKE_PURE);
Posted Date : 2008-08-14 20:07:35.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang