United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8004859 Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.
JDK-8004859 : Graphics.getClipBounds/getClip return difference nonequivalent bounds, depending from transform.

Details
Type:
Bug
Submit Date:
2012-12-11
Status:
Closed
Updated Date:
2013-11-14
Project Name:
JDK
Resolved Date:
2013-07-03
Component:
client-libs
OS:
Sub-Component:
2d
CPU:
Priority:
P1
Resolution:
Fixed
Affected Versions:
7u40,8
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Duplicate:
Relates:

Sub Tasks

Description
Graphics.getClipBounds/getClip internally uses transformShape/untransformShape which are not symmetric in some cases.
Also getClipBounds() sometimes uses usrClip directly(if usrClip is a Rectangle) and sometimes uses getBounds(). But getBounds() returns empty Rectangle if width and height is negative.

This caused jck failure, if default graphics transform is not an identity. 
                                    

Comments
Suggested fix: http://cr.openjdk.java.net/~serb/8004859/webrev.03/
                                     
2013-06-10
who are reviewers?
                                     
2013-06-27
tck-red is removed as TCK test is challenged and needs to be exlcuded (JCK-7301067 ) 
                                     
2013-06-28
Should we close this bug as a duplicate of JCK-7301159  ?
                                     
2013-07-01
URL:   http://hg.openjdk.java.net/jdk8/2d/jdk/rev/cacfc77655c8
User:  serb
Date:  2013-07-03 15:07:19 +0000

                                     
2013-07-03
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/cacfc77655c8
User:  lana
Date:  2013-07-23 18:11:27 +0000

                                     
2013-07-23
Verified in jdk8b115
OS X 10.9 x64

java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b115)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b57, mixed mode)

Tests
api/java_awt/Graphics/index_GetClipBounds
api/java_awt/Graphics/index_SetGetClip
passed successful

Graphics2010_14: Passed. headless
Graphics2011_14: Passed. headless
Graphics2012_14: Passed. headless
Graphics2013_14: Passed. headless
Graphics2014_14: Passed. headless
STATUS:Passed.test cases: 5; all passed

Graphics2004_14: Passed. headless
Graphics2005_14: Passed. headless
STATUS:Passed.test cases: 2; all passed
                                     
2013-11-14



Hardware and Software, Engineered to Work Together